Skip to content

von Mangoldt function ​

The arithmetic weight Λ(n) equal to log p when n is a prime power pᵏ (k ≥ 1) and 0 otherwise, converting multiplicative prime factorizations into additive logarithms.

Diagram illustrating von Mangoldt function
Diagram illustrating von Mangoldt function.

Level 1 — First-Principles ​

Counting integers greater than 1 divisible only by 1 and themselvesprime number with a flat weight of 1 makes multiplication awkward, because the count of primes does not match the structure of factorizations. The von Mangoldt function Λ(n) fixes that by assigning a logarithmic weight to every prime power:

Λ(n)={log⁡pif n=pk for some prime p and integer k≥1,0otherwise.

Thus Λ(1)=0, Λ(2)=log⁡2, Λ(3)=log⁡3, Λ(4)=log⁡2, Λ(6)=0, and Λ(9)=log⁡3.

This choice turns unique factorization into a clean addition law over divisors:

∑d∣nΛ(d)=log⁡n.

For example, the divisors of 12=22⋅3 are 1,2,3,4,6,12, and summing Λ(d) gives 0+log⁡2+log⁡3+log⁡2+0+0=2log⁡2+log⁡3=log⁡12.

In analytic number theory, weighting integers by Λ(n) links prime distribution directly to complex analysis. Forming the unending sum over positive integersinfinite series ∑n=1∞Λ(n)n−s produces the negative logarithmic derivative −ζ′(s)/ζ(s) of the function extending ∑n=1∞n−s across the planeRiemann zeta function, turning zeros of ζ(s) into poles of a prime-power sum. Stage 01 of the proof builds a nonnegative residue-class weight λ(n)=Λ(n)(1−χK(n)) on n≡1(modq0) by pairing Λ(n) with a ±1-valued prime-modulus sign factor (n/d)quadratic twist. Its smoothed partial-sum remainder captures the zeros of character-weighted generalizations L(ψ,s) of ζ(s)Dirichlet L-function and feeds them into a sign-based pole-exclusion theoremLandau's lemma.

Limits of the intuition ​

Calling Λ(n) a "prime detector" misses two structural features. First, Λ(n) remains nonzero on higher prime powers p2,p3,…; discarding those terms would break the exact divisor identity ∑d∣nΛ(d)=log⁡n and sever the exact logarithmic-derivative link to the Riemann zeta function and Dirichlet L-functions. Second, Λ(n) does not treat all primes equally: its jumps grow like log⁡p and occur on sparse integers, so raw partial sums oscillate with jump size log⁡x. Stage 01 therefore smooths the sum using the kernel (1/n−1/x) inside the remainder primeRemainder.

Level 2 — Undergrad Bridge ​

In the ring of arithmetic functions under Dirichlet convolution (f∗g)(n)=∑d∣nf(d)g(n/d), the von Mangoldt function is uniquely determined by

Λ∗1=log,Λ=μ∗log,

where 1(n)=1 and μ is the Möbius function. Taking the logarithmic derivative of the Euler product of a Dirichlet L-function for Re(s)>1 yields

−L′(χ,s)L(χ,s)=∑n=1∞χ(n)Λ(n)ns,

with the special case χ=1 giving −ζ′(s)/ζ(s)=∑n=1∞Λ(n)n−s.

Stage 01 (New.Reduction.Zeros.PrimeError) adapts this machinery to a residue class n≡1(modq) twisted by the Legendre symbol χK(n)=(n/d) of a prime d:

λ(n)={Λ(n)(1−(n/d))if n≡1(modq),0otherwise.

Because (n/d)∈{−1,0,1}, we have 0≤λ(n)≤2Λ(n) for every n. Character orthogonality modulo q expresses its Dirichlet series for Re(s)>1 as

∑n=1∞λ(n)ns=1φ(q)∑ψmodq(−L′(ψ,s)L(ψ,s)+L′(ψ⋅(⋅/d),s)L(ψ⋅(⋅/d),s))=sφ(q)(s−1)+Gq(s),

where Gq is holomorphic at s=1. Integrating against the smoothing kernel (1/n−1/x) defines the Stage 01 error term

Rq(x)=∑n≤xλ(n)(1n−1x)−log⁡xφ(q)−ReGq(1).

Under x=ev, the Laplace transform ∫0∞Rq(ev)e(1−s)vdv has at most simple poles in Re(s)>0, converting zeros of L(ψ,s) into poles of residue (n(s)−n′(s))/(φ(q)s(1−s)).

Level 3 — Formal Lean Contract ​

In Mathlib4 (Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt), ArithmeticFunction.vonMangoldt : ArithmeticFunction ℝ (notation Λ) formalizes Λ(n), together with vonMangoldt_nonneg, vonMangoldt_le_log, vonMangoldt_apply_prime, vonMangoldt_apply_pow, and vonMangoldt_mul_zeta : vonMangoldt * zeta = log.

Upstream src/New/Reduction/Zeros/PrimeError.lean builds the Stage 01 weighted sum directly on vonMangoldt:

  • New.lambdaKResidueClass d q n : ℝ := residueClass (1 : ZMod q) n * (1 - chiK d n), where residueClass restricts vonMangoldt to n≡1(modq).
  • New.lambdaKResidueClass_nonneg and New.lambdaKResidueClass_le_two_mul_vonMangoldt : lambdaKResidueClass d q n ≤ 2 * vonMangoldt n.
  • New.primeRemainder d q x := lambdaKSum d q 0 x - lambdaKSum d q 1 x - x.log / φ q - re (logDerivMean d q 1).
  • New.sum_vonMangoldt_div_le : ∑ n ∈ Ioc 0 N, vonMangoldt n / n ≤ 2 * Real.log N.

Stage 01 anchors this weighted remainder in two main theorems:

  • 01_reduction/criterion.lean#New.LFunction_ne_zero_of_primeRemainder_le (upstream src/New/Reduction/Zeros/Criterion.lean:35-90):
    lean
    theorem New.LFunction_ne_zero_of_primeRemainder_le {q₀ : ℕ} [NeZero q₀] (hq₀ : 8 ∣ q₀) {d₀ : ℕ}
        (hd₀_mod : d₀ % 8 = 7) (hd₀_cop : d₀.Coprime q₀) {β : ℝ} (hβ : 1 / 2 < β)
        (h_bound : ∀ d : Primes, (d : ℕ) ≡ d₀ [MOD q₀] →
          ∃ A : ℝ, ∀ᶠ x : ℝ in atTop, primeRemainder d q₀ x ≤ A * x ^ (β - 1))
        (ψ : DirichletCharacter ℂ q₀) {ρ : ℂ} (hρ_ne : ρ ≠ 1) (hρ_re : β < ρ.re) :
        ψ.LFunction ρ ≠ 0
  • 01_reduction/one_sided_bound.lean#New.eventually_primeRemainder_le_mul_rpow (upstream src/New/Reduction/OneSidedBound.lean:201-235):
    lean
    theorem New.eventually_primeRemainder_le_mul_rpow {q₀ : ℕ} [NeZero q₀] (hq₀ : 18480 ∣ q₀) {d : ℕ}
        [hd_prime : Fact d.Prime] (hd : d ≡ q₀ / 2 - 1 [MOD q₀]) {ε : ℝ} (hε : 0 < ε) :
        ∀ᶠ y : ℝ in atTop, primeRemainder d q₀ y ≤ (128 * q₀.totient + 32) * y ^ (-1 / 2 + ε)

See the page's live verification banner (audit/verification-status.json) for the currently pinned upstream snapshot and local Lean build status (build_status: unverified-locally).

Where this analogy breaks ​

Treating Λ(n) as a pure prime detector overlooks higher prime powers p2,p3,…: although those powers contribute only O(x) to the Chebyshev sum ψ(x)=∑n≤xΛ(n), retaining them is essential for the exact identity ∑d∣nΛ(d)=log⁡n and the logarithmic derivative −ζ′(s)/ζ(s)=∑n=1∞Λ(n)n−s.

Formal Lean Anchors ​

theorem New.LFunction_ne_zero_of_primeRemainder_le — Upstream source (src/New/Reduction/Zeros/Criterion.lean L35-L90)

lean
/-- **One-sided criterion.** Let `q₀` be a positive multiple of `8`, let `d₀ ≡ 7` mod `8` be prime
to `q₀`, and let `β > 1/2`. Suppose that for each prime `d ≡ d₀` mod `q₀` the remainder
`primeRemainder d q₀ x = ∑_{n ≤ x} λ(n) (1/n - 1/x) - log x / φ(q₀) - c` is at most `A * x ^ (β - 1)`
for some `A` and all large `x`. Here `λ(n) = Λ(n) (1 - (n/d))` for `n ≡ 1` mod `q₀` and `0` otherwise,
and `c` is the constant for which the remainder tends to `0`. Then `L(ρ, ψ) ≠ 0` for every
character `ψ` modulo `q₀` and every `ρ ≠ 1` with `re ρ > β`. -/
theorem New.LFunction_ne_zero_of_primeRemainder_le {q₀ : ℕ} [NeZero q₀] (hq₀ : 8 ∣ q₀) {d₀ : ℕ}
    (hd₀_mod : d₀ % 8 = 7) (hd₀_cop : d₀.Coprime q₀) {β : ℝ} (hβ : 1 / 2 < β)
    (h_bound : ∀ d : Primes, (d : ℕ) ≡ d₀ [MOD q₀] →
      ∃ A : ℝ, ∀ᶠ x : ℝ in atTop, primeRemainder d q₀ x ≤ A * x ^ (β - 1))
    (ψ : DirichletCharacter ℂ q₀) {ρ : ℂ} (hρ_ne : ρ ≠ 1) (hρ_re : β < ρ.re) :
    ψ.LFunction ρ ≠ 0 := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Reduction/Zeros/Criterion.lean:35-90 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=45 body_sha256=dee53546115f07956df438a6dd34a213cb6cb1775d14fde132a1c579e7a308de]

theorem New.eventually_primeRemainder_le_mul_rpow — Upstream source (src/New/Reduction/OneSidedBound.lean L201-L235)

lean
/-- **One-sided bound.** Let `q₀ > 0` be a multiple of `18480`, let `d ≡ q₀ / 2 - 1` modulo `q₀` be
a prime, and let `ε > 0`. Then `R = primeRemainder d q₀` satisfies
`R(y) ≤ (128 φ(q₀) + 32) y ^ (-1/2 + ε)` for all large real `y`. -/
theorem New.eventually_primeRemainder_le_mul_rpow {q₀ : ℕ} [NeZero q₀] (hq₀ : 18480 ∣ q₀) {d : ℕ}
    [hd_prime : Fact d.Prime] (hd : d ≡ q₀ / 2 - 1 [MOD q₀]) {ε : ℝ} (hε : 0 < ε) :
    ∀ᶠ y : ℝ in atTop, primeRemainder d q₀ y ≤ (128 * q₀.totient + 32) * y ^ (-1 / 2 + ε) := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Reduction/OneSidedBound.lean:201-235 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=30 body_sha256=3c83f57c4fd982274a17d7539635c9b9dde4053c2c86ead0a79ed97a76a8f4d8]
  • prime number — A whole number greater than 1 whose only positive whole-number divisors are 1 and itself; every integer above 1 factors uniquely into a product of them.
  • infinite series — A limit of partial sums formed by adding infinitely many terms; in number theory, weighting terms by n⁻ˢ produces a Dirichlet series that turns integer arithmetic into a smooth function.
  • Riemann zeta function — The meromorphic function ζ(s) extending ∑ n⁻ˢ to all of ℂ ∖ {1}, linking prime numbers via its Euler product to zeros in the complex plane.
  • Dirichlet L-function — The meromorphic continuation of ∑ χ(n) n⁻ˢ associated to a Dirichlet character χ, generalizing ζ(s) to track primes across residue classes modulo N.
  • quadratic twist — Multiplying a Dirichlet character χ modulo N by the Legendre symbol (·/d) of an odd prime d coprime to N, yielding a non-principal character modulo N·d whose L-function family admits zero-density control.
  • Landau's lemma — A complex-analytic theorem stating that the Laplace or Dirichlet transform of a nonnegative function must have a singularity on the real axis at its abscissa of convergence, turning one-sided error bounds into zero-free half-planes.

Referenced By ​

Authoritative Sources ​

  • Multiplicative Number Theory (book) — H. Davenport, 3rd ed., Springer Graduate Texts in Mathematics 74 (2000), Chapters 17–18.
  • Multiplicative Number Theory I: Classical Theory (book) — H. L. Montgomery and R. C. Vaughan, Cambridge University Press (2007), §2.1 and Chapter 11.
  • Mathlib4: ArithmeticFunction.vonMangoldt (mathlib) — Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt (ArithmeticFunction.vonMangoldt, vonMangoldt_apply_pow, vonMangoldt_mul_zeta).

Page Glossary ​

prime number
A whole number greater than 1 whose only positive whole-number divisors are 1 and itself; every integer above 1 factors uniquely into a product of them.
infinite series
A limit of partial sums formed by adding infinitely many terms; in number theory, weighting terms by n⁻ˢ produces a Dirichlet series that turns integer arithmetic into a smooth function.
Riemann zeta function
The meromorphic function ζ(s) extending ∑ n⁻ˢ to all of ℂ ∖ {1}, linking prime numbers via its Euler product to zeros in the complex plane.
quadratic twist
Multiplying a Dirichlet character χ modulo N by the Legendre symbol (·/d) of an odd prime d coprime to N, yielding a non-principal character modulo N·d whose L-function family admits zero-density control.
Dirichlet L-function
The meromorphic continuation of ∑ χ(n) n⁻ˢ associated to a Dirichlet character χ, generalizing ζ(s) to track primes across residue classes modulo N.
Landau's lemma
A complex-analytic theorem stating that the Laplace or Dirichlet transform of a nonnegative function must have a singularity on the real axis at its abscissa of convergence, turning one-sided error bounds into zero-free half-planes.