Leading digit
ProvedBenfordLaw.leadingDigit_eq_iff_fract_logbLet , let be real and let . Then has leading digit in base if and only if the fractional part of lies in :
This is the observation behind the logarithmic form of the law: the probability of leading digit is the length of the interval whenever is uniformly distributed.
import Mathlib import Definitions.Def_BenfordLaw_Defs
namespace BenfordLaw
theorem leadingDigit_eq_iff_fract_logb (b : ℕ) (hb : 2 ≤ b) (x : ℝ) (hx : 0 < x)
(d : ℕ) (hd1 : 1 ≤ d) (hdb : d < b) :
leadingDigit b x = d ↔
Real.logb b d ≤ Int.fract (Real.logb b x) ∧
Int.fract (Real.logb b x) < Real.logb b (d + 1) := by sorry
end BenfordLawRead-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 natural with , all real with , and all natural with and :
where the left side is (floor into ), is the fractional part , and with and read as reals.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.