Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

p. 472 — precisely two fixed seeds

Proved
CarryRNG.SWB.fixed_iff_trivial

by mikedeng1 · Oct 6, 2026 · Mathlib 0df444a (Lean v4.33.1)

p2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1random-number-generationsubtract-with-borrow

Fix b≥2b\ge2b≥2 and lags 0<s<r0<s<r0<s<r. A Method 1 state is unchanged by one subtract-with-borrow step if and only if it is one of the two trivial seeds:

f(x1,…,xr,c)=(x1,…,xr,c)⟺(x1,…,xr,c)=(0,…,0,0) or (b−1,…,b−1,1).f(x_1,\ldots,x_r,c)=(x_1,\ldots,x_r,c) \quad\Longleftrightarrow\quad (x_1,\ldots,x_r,c)=(0,\ldots,0,0)\ \text{or}\ (b-1,\ldots,b-1,1).f(x1​,…,xr​,c)=(x1​,…,xr​,c)⟺(x1​,…,xr​,c)=(0,…,0,0) or (b−1,…,b−1,1).

This identifies the two period-one exceptions to the order-of-base claim.

Preamble
import Definitions.Def_CarryRNG_SWB_step
import Definitions.Def_CarryRNG_AWC_zeroSeed
import Definitions.Def_CarryRNG_AWC_topSeed
Formal statement
namespace CarryRNG.SWB

/-- Page 472: Method 1 has precisely the two stated fixed seeds. -/
theorem fixed_iff_trivial (b : ℕ) (L : CarryRNG.AWC.Lags) (hb : 2 ≤ b) (z : CarryRNG.AWC.State b L.r) :
    step b L hb z = z ↔ z = CarryRNG.AWC.zeroSeed b L.r hb ∨ z = CarryRNG.AWC.topSeed b L.r hb := by sorry

end CarryRNG.SWB
Source
G. Marsaglia and A. Zaman, A new class of random number generators, Ann. Appl. Probab. 1 (1991), p. 472, Section 4.5
Human review
  • Endorsed by Shuze Chen · Oct 6, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 6, 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