plrs_seq
For a list of natural numbers c : List ℕ, the standard positive linear recurrence sequence plrs_seq c : ℕ → ℤ is defined recursively by plrs_seq c 0 = 0, plrs_seq c 1 = 1, and for n : ℕ, if n + 2 ≤ c.length then plrs_seq c (n + 2) = 1 + ∑ i ∈ Finset.range (n + 1), (c.getD i 0 : ℤ) * plrs_seq c (n + 1 - i), and if n + 2 > c.length then plrs_seq c (n + 2) = ∑ i ∈ Finset.range c.length, (c.getD i 0 : ℤ) * plrs_seq c (n + 1 - i).
Statement
def plrs_seq (c : List ℕ) : ℕ → ℤ- Defined in
- arXiv:2611.10200, Section 1
- Verified
- 10 Nov 2026
- Axioms
- none listed
- Used by 4
- leading_unit_monotonicity_length_twoFor any natural number N with 1 ≤ N, if is_complete_sequence (plrs_seq [1, N]) holds, then is_complete_sequence (plrs_seq [1, 1, N]) holds.
- not_leading_unit_monotonicity_conjectureThe statement
leading_unit_monotonicity_conjectureis false: The statement is FALSE. Counterexample: c = [1,0,3,0,3,1]. * c.length = 6 ≥… - plrs_seq_zeroFor any list of natural numbers c : List ℕ, plrs_seq c 0 = 0.
- plrs_seq_eq_leading_unit_hFor all natural numbers g, k, N with 1 ≤ g, 1 ≤ k, and 1 ≤ N, the sequence plrs_seq on List.replicate g 1 ++ List.replicate k 0 ++ [N]…
Read back from the Lean
A definition of a function plrs_seq which, given a list of natural numbers c, produces a sequence of integers indexed by ℕ defined recursively by:
- plrs_seq c 0 = 0
- plrs_seq c 1 = 1
- For an argument of the form $n + 2$ (where $n \in \mathbb{N}$):
- If $n + 2 \le \operatorname{length}(c)$, the value is
$$1 + \sum_{i = 0}^{n} c[i] \cdot \operatorname{plrs\_seq}(c, n + 1 - i)$$
- Otherwise (if $n + 2 > \operatorname{length}(c)$), the value is
$$\sum_{i = 0}^{\operatorname{length}(c) - 1} c[i] \cdot \operatorname{plrs\_seq}(c, n + 1 - i)$$
where $c[i]$ denotes the $i$-th element of the list c (0-indexed, defaulting to 0 if out of bounds), coerced to an integer.
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 standard positive linear recurrence sequence associated with coefficient list c. -/ def plrs_seq (c : List ℕ) : ℕ → ℤ | 0 => 0 | 1 => 1 | n + 2 => if n + 2 ≤ c.length then 1 + ∑ i ∈ Finset.range (n + 1), (c.getD i 0 : ℤ) * plrs_seq c (n + 1 - i) else ∑ i ∈ Finset.range c.length, (c.getD i 0 : ℤ) * plrs_seq c (n + 1 - i)