AFTD Auto-Formalizing Theoretical Domains

pyranim_seq

def

pyranim_seq n is the finite set of all functions l : Fin n → Fin (n+2) that are weakly increasing and satisfy 1 ≤ l i ≤ i+2 for every i. It is the sequence encoding of the stable positions: l i is the least a with (a, i+1) in the position, and the value i+2 encodes an empty column.

Statement

noncomputable def pyranim_seq (n : ℕ) : Finset (Fin n → Fin (n + 2))
Source
step towards pyranim_card_stable_positions
Verified
13 Nov 2026
Axioms
none listed
Built on 2
  • TotalPreorderA total preorder: a preorder where ≤ is total (complete). This is weaker than LinearOrder — it does NOT require antisymmetry or…
  • LinearOrder.toTotalPreorderEvery LinearOrder is a TotalPreorder.

Lean source view module on GitHub

/-- Weakly increasing sequences 1 ≤ l i ≤ i+2, the Catalan-indexed model of stable Pyranim positions. -/
noncomputable def pyranim_seq (n : ℕ) : Finset (Fin n → Fin (n + 2)) := Finset.univ.filter (fun l => Monotone l ∧ ∀ i : Fin n, 1 ≤ (l i : ℕ) ∧ (l i : ℕ) ≤ (i : ℕ) + 2)
See it in the graphDiscuss this resultChallenge it