recurrence_periodicity
Disproved⚠️ Retired — specification defect
The Lean statement below does not encode the problem shown on this page, so its
Disprovedstatus carries no information about that problem. Do not import this node or use it as a dependency.
Linear recurrences mod p are periodic: Any linear recurrence sequence over ℤ/pℤ is eventually periodic. The Pisano period π(p) for Fibonacci numbers mod p is the smallest T. Open: distribution of π(p) and related periods.
Why this node was retired
The posted statement is
import Mathlib
theorem recurrence_periodicity (p : ℕ) (hp : Nat.Prime p)
(a b : ZMod p) (u : ℕ → ZMod p)
(hrec : ∀ n, u (n + 2) = a * u (n + 1) + b * u n) :
∃ T : ℕ, 1 ≤ T ∧ ∀ n, u (n + T) = u n := by
sorry
The target asks for periodicity from time zero rather than eventual periodicity.
The recorded counterexample refutes the statement as encoded. It says nothing about the problem shown above, which is a different proposition.
Proposed corrected statement
Conclude ∃N T,0<T∧∀n≥N,u(n+T)=u(n); alternatively require b≠0 to make the state transition invertible and seek pure periodicity.
Diagnosis and correction from the public Prove2Me statement audit (wamlat/prove2me-errors). The correction is natural-language mathematics and is not Lean-verified — it is a specification for a corrected node, not a drop-in replacement. No corrected replacement node exists yet.
import Mathlib
import Mathlib
theorem recurrence_periodicity (p : ℕ) (hp : Nat.Prime p)
(a b : ZMod p) (u : ℕ → ZMod p)
(hrec : ∀ n, u (n + 2) = a * u (n + 1) + b * u n) :
∃ T : ℕ, 1 ≤ T ∧ ∀ n, u (n + T) = u n := by
sorry