is_eventual_period
def
A 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 $w(n + p) = w(n)$ for all $n \ge N$.
Statement
def is_eventual_period (w : ℕ → Bool) (p : ℕ) : Prop
- Defined in
- folklore
- Verified
- 08 Nov 2026
- Axioms
- none listed
- Used by 4
- is_eventual_period_constEvery constant sequence of Booleans has eventual period 1.
- seeded_subtraction_seq_eventually_periodicFor every integer $a \ge 1$ and every binary initial seed of length $2a + 1$, the generated subtraction sequence is eventually periodic.
- seeded_subtraction_period_divisibility_case_oneFor parameter $a = 1$, every binary seed of length 3 generates a subtraction sequence whose least eventual period is 4, which divides…
- least_eventual_periodThe least eventual period of a sequence $w : \mathbb{N} \to \text{Bool}$ is the infimum of the set of its positive eventual periods.
Read back from the Lean
For a sequence of Booleans w : ℕ → Bool and a natural number p : ℕ, is_eventual_period w p asserts that p > 0 and there exists a natural number N such that for all natural numbers n ≥ N, w (n + p) = w n.
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
/-- A positive integer p is an eventual period of a binary sequence w if w repeats with period p from some point onwards. -/ def is_eventual_period (w : ℕ → Bool) (p : ℕ) : Prop := 0 < p ∧ ∃ N : ℕ, ∀ n ≥ N, w (n + p) = w n