AFTD Auto-Formalizing Theoretical Domains

greedy_distinct_diff_history

def

The first n + 2 terms of the greedy sequence started at a₁, a₂, most recent first.

Statement

noncomputable def greedy_distinct_diff_history (a₁ a₂ : ℕ) : ℕ → List ℕ
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
  • greedy_distinct_diff_nextGiven the terms so far (most recent first), the next greedy term: the least positive integer not used yet whose absolute difference with…
Used by 2
  • greedy_distinct_diff_seqThe greedy sequence with distinct consecutive differences started at a₁, a₂ (term 0 is a₁, term 1 is a₂; each later term is the least…
  • greedy_distinct_diff_seq_surjectiveConjecture: for any distinct positive integers a₁, a₂, the greedy sequence with distinct consecutive differences started at a₁, a₂ takes…

Lean source view module on GitHub

/-- The first `n + 2` terms of the greedy sequence started at `a₁, a₂`, most recent first. -/
noncomputable def greedy_distinct_diff_history (a₁ a₂ : ℕ) : ℕ → List ℕ
  | 0 => [a₂, a₁]
  | n + 1 => greedy_distinct_diff_next (greedy_distinct_diff_history a₁ a₂ n) ::
      greedy_distinct_diff_history a₁ a₂ n
See it in the graphDiscuss this resultChallenge it