Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

p. 472 — every orbit enters a cycle within r steps

Proved
CarryRNG.SWB.periodic_after_r

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

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

For every base b≥2b\ge2b≥2, lags 0<s<r0<s<r0<s<r, and Method 1 seed zzz, the state reached after rrr steps is periodic under the same step map:

fr(z)∈PeriodicPts⁡(f).f^r(z)\in\operatorname{PeriodicPts}(f).fr(z)∈PeriodicPts(f).

Equivalently, the initial transient has length at most rrr. This is the paper’s explicit bound on when the periodic cycle begins; it includes the two trivial seeds.

Preamble
import Definitions.Def_CarryRNG_SWB_step
Formal statement
namespace CarryRNG.SWB

/-- Page 472: the orbit is strictly periodic after at most `r` steps. -/
theorem periodic_after_r (b : ℕ) (L : CarryRNG.AWC.Lags) (hb : 2 ≤ b) (z : CarryRNG.AWC.State b L.r) :
    (step b L hb)^[L.r] z ∈ Function.periodicPts (step b L 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