Entropy of the Zipf distribution
ProvedZipfLaw.zipfPMF_entropyharmonic-numberspower-lawzipf-law
For and real , the Shannon entropy (in nats) of the Zipf distribution is
Preamble
import Mathlib import Definitions.Def_ZipfLaw_Defs
Formal statement
namespace ZipfLaw
theorem zipfPMF_entropy (N : ℕ) (hN : 1 ≤ N) (s : ℝ) :
-(∑ k ∈ Finset.Icc 1 N, zipfPMF N s k * Real.log (zipfPMF N s k)) =
s / genHarmonic N s * (∑ k ∈ Finset.Icc 1 N, Real.log k / (k : ℝ) ^ s) +
Real.log (genHarmonic N s) := by sorry
end ZipfLawSource
Wikipedia, "Zipf's law" (https://en.wikipedia.org/wiki/Zipf%27s_law), snapshot uploaded by the proposer, infobox (Entropy ).
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 natural and real :
with natural log (Lean's , which satisfies and ; all arguments here are positive).
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.