AFTD Auto-Formalizing Theoretical Domains

greedy_distinct_diff_seq

def

The greedy sequence with distinct consecutive differences started at a₁, a₂ (term 0 is a₁, term 1 is a₂; each later term is the least unused positive integer whose difference with the previous term is new).

Statement

noncomputable def greedy_distinct_diff_seq (a₁ a₂ : ℕ) : ℕ → ℕ
Defined in
arXiv:2610.15860 (A note on the Slater–Vélez permutation), first paragraph (the greedy rule, here with arbitrary starting terms).
Verified
14 Oct 2026
Axioms
none listed
Built on 1
Used by 3

Lean source view module on GitHub

/-- The greedy sequence with distinct consecutive differences started at `a₁, a₂` (0-indexed). -/
noncomputable def greedy_distinct_diff_seq (a₁ a₂ : ℕ) : ℕ → ℕ
  | 0 => a₁
  | n + 1 => (greedy_distinct_diff_history a₁ a₂ n).headD 0
See it in the graphDiscuss this resultChallenge it