Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

All finite Zipf moments are ratios of shifted harmonic sums

Proved
ZipfLaw.zipfPMF_moment

by Yuxuan Xu · Oct 11, 2026 · Mathlib 0df444a (Lean v4.33.1)

harmonic-numberspower-lawzipf-law

For every cutoff N∈NN\in\mathbb NN∈N, real exponent sss, and integer moment order p≥0p\ge0p≥0, the finite Zipf law satisfies ∑k=1Nkpf(k;s,N)=HN,s−p/HN,s\sum_{k=1}^{N} k^p f(k;s,N)=H_{N,s-p}/H_{N,s}∑k=1N​kpf(k;s,N)=HN,s−p​/HN,s​. The identity includes N=0N=0N=0 under Lean's convention for division by zero. The first and second moment formulas in the mission are its special cases.

Preamble
import Mathlib
import Definitions.Def_ZipfLaw_Defs
Formal statement
namespace ZipfLaw

theorem zipfPMF_moment (N : ℕ) (s : ℝ) (p : ℕ) :
    (∑ k ∈ Finset.Icc 1 N, (k : ℝ) ^ p * zipfPMF N s k) =
      genHarmonic N (s - p) / genHarmonic N s := by sorry

end ZipfLaw
Source
Wikipedia, "Zipf's law", https://en.wikipedia.org/wiki/Zipf%27s_law, section "Formal definition"; auxiliary lemma for the original ZipfLaw mission, derived from its displayed PMF and generalized harmonic sum.

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