AFTD Auto-Formalizing Theoretical Domains

permutahedron_slack_matrix

def

For a natural number n, the slack matrix of the standard permutahedron on n elements is the real matrix whose rows are indexed by nonempty proper subsets S of Fin n and whose columns are indexed by permutations σ of Fin n, whose entry at (S, σ) is (∑ i ∈ S, ((σ i).val + 1 : ℝ)) - (Nat.choose (S.card + 1) 2 : ℝ).

Statement

def permutahedron_slack_matrix (n : ℕ) : Matrix {S : Finset (Fin n) // S.Nonempty ∧ S ≠ Finset.univ} (Equiv.Perm (Fin n)) ℝ
Defined in
arXiv:2610.04498 Eq. 18
Verified
23 Oct 2026
Axioms
none listed
Used by 3

Read back from the Lean

For a natural number n, permutahedron_slack_matrix n is the real-valued matrix whose rows are indexed by non-empty proper subsets S of Fin n (i.e., S : Finset (Fin n) with S nonempty and S ≠ Finset.univ) and whose columns are indexed by permutations σ of Fin n (σ : Equiv.Perm (Fin n)). The entry at row S and column σ is: (∑_{i ∈ S} (σ(i).val + 1)) - ((|S| + 1) choose 2) computed in ℝ, where σ(i).val is the natural number in {0, …, n - 1} representing σ(i), and |S| is the cardinality of S.

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 slack matrix of the standard permutahedron on n elements. -/
def permutahedron_slack_matrix (n : ℕ) : Matrix {S : Finset (Fin n) // S.Nonempty ∧ S ≠ Finset.univ} (Equiv.Perm (Fin n)) ℝ := fun S σ => (∑ i ∈ S.val, ((σ i).val + 1 : ℝ)) - (Nat.choose (S.val.card + 1) 2 : ℝ)
See it in the graphDiscuss this resultChallenge it