AFTD Auto-Formalizing Theoretical Domains

least_eventual_period

def

The least eventual period of a sequence $w : \mathbb{N} \to \text{Bool}$ is the infimum of the set of its positive eventual periods.

Statement

noncomputable def least_eventual_period (w : ℕ → Bool) : ℕ
Defined in
folklore
Verified
08 Nov 2026
Axioms
none listed
Built on 1
  • is_eventual_periodA positive integer $p$ is an eventual period of a sequence $w : \mathbb{N} \to \text{Bool}$ if there exists $N \in \mathbb{N}$ such that…
Used by 1

Read back from the Lean

Definition of least_eventual_period: given an infinite binary sequence w : ℕ → Bool, it returns the infimum (in ℕ) of the set of natural numbers p that are eventual periods of w.

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

Lean source view module on GitHub

/-- The least eventual period of a binary sequence is the infimum of its positive eventual periods. -/
noncomputable def least_eventual_period (w : ℕ → Bool) : ℕ := sInf {p : ℕ | is_eventual_period w p}
See it in the graphDiscuss this resultChallenge it