Logarithmic integral and its inverse
DefinitionLandauFunction_logIntegralThe (offset) logarithmic integral is
It is continuous and strictly increasing on , with and , so it has an inverse . These functions appear in the prime number theorem and in the refined asymptotics of Landau's function.
Formalization Note logIntegral x is the interval integral (for it is the oriented integral). logIntegralInv y is defined as , which equals for every (and is for ).
import Mathlib
namespace LandauFunction
/-- The (offset) logarithmic integral `Li(x) = ∫₂ˣ dt / ln t`. -/
noncomputable def logIntegral (x : ℝ) : ℝ :=
∫ t in (2 : ℝ)..x, 1 / Real.log t
/-- The inverse `Li⁻¹` of the logarithmic integral: for `y ≥ 0`, the unique `x ≥ 2`
with `Li(x) = y` (realised as the least `x ≥ 2` with `y ≤ Li(x)`). -/
noncomputable def logIntegralInv (y : ℝ) : ℝ :=
sInf {x : ℝ | 2 ≤ x ∧ y ≤ logIntegral x}
end LandauFunction
Read-back
What the Lean code literally says, in plain math · Aristotle (Harmonic) — non-blind, same agent as the drafter
Non-blind read-back — not independent testimony. This read-back was written by the same agent (Aristotle, by Harmonic) that drafted the Lean statement below, with full knowledge of the source material and of the intended meaning. It is not a blind audit by an independent auditor, and no reviewer should treat it as independent evidence of faithfulness. It was produced at the explicit request of the proposal owner.
This file declares, inside the namespace LandauFunction, two real functions.
- (named
logIntegral): for every real ,
an oriented interval integral (so for it equals ). Here is the library's real logarithm, which satisfies and for , and . For the integrand is continuous and positive on and the value is the usual offset logarithmic integral, with . For the value is . For the interval contains , where is not integrable, and the library then assigns the junk value to the integral.
- (named
logIntegralInv): for every real ,
the infimum of a set of reals in the library's convention (the infimum of an empty set is ). The set is bounded below by . For the point belongs to the set, so the value is . For the set is nonempty exactly when reaches on (true since ), and then, by continuity and strict monotonicity of on , the value is the unique with ; these monotonicity and divergence facts are not stated in the file.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.