Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Log–log plot of the Zipf distribution is affine with slope −s-s−s

Proved
ZipfLaw.log_zipfPMF_affine

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

harmonic-numberspower-lawzipf-law

For 1≤k≤N1\le k\le N1≤k≤N and real sss,

ln⁡f(k;N,s)=−sln⁡k−ln⁡HN,s,\ln f(k;N,s)=-s\ln k-\ln H_{N,s},lnf(k;N,s)=−slnk−lnHN,s​,

so on a log–log plot (log rank against log frequency) the Zipf distribution lies on a straight line of slope −s-s−s.

Preamble
import Mathlib
import Definitions.Def_ZipfLaw_Defs
Formal statement
namespace ZipfLaw

theorem log_zipfPMF_affine (N : ℕ) (s : ℝ) (k : ℕ) (hk1 : 1 ≤ k) (hkN : k ≤ N) :
    Real.log (zipfPMF N s k) = -s * Real.log k - Real.log (genHarmonic N s) := by sorry

end ZipfLaw
Source
Wikipedia, "Zipf's law" (https://en.wikipedia.org/wiki/Zipf%27s_law), snapshot uploaded by the proposer, section "Empirical testing" ("The data conform to Zipf's law with exponent s to the extent that the plot approximates a linear (more precisely, affine) function with slope −s").
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 all naturals NNN, kkk with 1≤k≤N1\le k\le N1≤k≤N and every real sss: ln⁡(zipfPMF(N,s,k))=−sln⁡k−ln⁡(genHarmonic(N,s))\ln\big(\mathrm{zipfPMF}(N,s,k)\big)=-s\ln k-\ln\big(\mathrm{genHarmonic}(N,s)\big)ln(zipfPMF(N,s,k))=−slnk−ln(genHarmonic(N,s)).

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