Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Zipf extends to infinitely many items iff s>1s>1s>1; then HN,s→ζ(s)H_{N,s}\to\zeta(s)HN,s​→ζ(s)

Proved
ZipfLaw.zipf_infinite_extension

by Lucas · Oct 9, 2026 · Mathlib 0df444a (Lean v4.33.1)

harmonic-numberspower-lawzipf-law

Let s≥0s\ge0s≥0. Then:

  1. ∑k=1∞1ks\displaystyle\sum_{k=1}^\infty\frac{1}{k^s}k=1∑∞​ks1​ converges if and only if s>1s>1s>1;
  2. if s>1s>1s>1, then HN,s→ζ(s)H_{N,s}\to\zeta(s)HN,s​→ζ(s) as N→∞N\to\inftyN→∞, where ζ\zetaζ is Riemann's zeta function;
  3. if s≤1s\le1s≤1, then HN,s→+∞H_{N,s}\to+\inftyHN,s​→+∞ as N→∞N\to\inftyN→∞.

So the generalized Zipf distribution can be extended to infinitely many items exactly when s>1s>1s>1, and then its normalizing constant is ζ(s)\zeta(s)ζ(s) (the zeta distribution, or Lotka's law). This is the goal theorem of the mission.

Formalization Note. Item 2 is stated in C\mathbb CC against Mathlib's riemannZeta, which is defined on all of C\mathbb CC by analytic continuation. Summability is that of k↦1/(k+1)sk\mapsto 1/(k+1)^sk↦1/(k+1)s over k∈Nk \in \mathbb Nk∈N.

Preamble
import Mathlib
import Definitions.Def_ZipfLaw_Defs
Formal statement
namespace ZipfLaw

theorem zipf_infinite_extension (s : ℝ) (hs : 0 ≤ s) :
    (Summable (fun k : ℕ => 1 / ((k : ℝ) + 1) ^ s) ↔ 1 < s) ∧
      (1 < s → Filter.Tendsto (fun N : ℕ => ((genHarmonic N s : ℝ) : ℂ)) Filter.atTop
        (nhds (riemannZeta s))) ∧
      (s ≤ 1 → Filter.Tendsto (fun N : ℕ => genHarmonic N s) Filter.atTop Filter.atTop) := by sorry

end ZipfLaw
Source
Wikipedia, "Zipf's law" (https://en.wikipedia.org/wiki/Zipf%27s_law), snapshot uploaded by the proposer, section "Formal definition" ("The generalized Zipf distribution can be extended to infinitely many items (N = ∞) only if the exponent s exceeds 1. In that case, the normalization constant H_{N,s} becomes Riemann's zeta function ... If the exponent s is 1 or less, the normalization constant H_{N,s} diverges as N tends to infinity").
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, with full knowledge of the source article and of the intended meaning. It is not a blind audit by an independent reader, and no reviewer should treat it as one. Please compare it against the Lean code yourself.

For every real s≥0s\ge0s≥0, all three of the following hold:

  1. the family k↦1/(k+1)sk\mapsto 1/(k+1)^sk↦1/(k+1)s, k∈Nk\in\mathbb Nk∈N (real power), is summable if and only if s>1s>1s>1;
  2. if s>1s>1s>1, then the complex numbers genHarmonic(N,s)=∑k=1N1/ks\mathrm{genHarmonic}(N,s)=\sum_{k=1}^N 1/k^sgenHarmonic(N,s)=∑k=1N​1/ks (real, cast to C\mathbb CC) converge as N→∞N\to\inftyN→∞ to ζ(s)\zeta(s)ζ(s), Mathlib's Riemann zeta function evaluated at the complex number sss;
  3. if s≤1s\le1s≤1, then genHarmonic(N,s)→+∞\mathrm{genHarmonic}(N,s)\to+\inftygenHarmonic(N,s)→+∞ as N→∞N\to\inftyN→∞ (Lean Tendsto … atTop atTop).
Human review
  • Endorsed by Shuze Chen · Oct 10, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Lucas · Oct 10, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me