higher_bruhat_right_coord
For a subset Q ⊆ {0, ..., n-1} and a family X, the right coordinate rho_Q(X) is the list of boolean values 1_{Q ∪ {x} ∈ X} for elements x ∉ Q satisfying x > min Q, ordered in increasing order, or the empty list if Q is empty.
Statement
def higher_bruhat_right_coord (n : ℕ) (Q : Finset (Fin n)) (X : Finset (Finset (Fin n))) : List Bool- Defined in
- arXiv:2611.17465 Definition 4
- Verified
- 23 Nov 2026
- Axioms
- none listed
- Built on 2
- LinearOrder.toTotalPreorderEvery
LinearOrderis aTotalPreorder. - TotalPreorderA total preorder: a preorder where
≤is total (complete). This is weaker thanLinearOrder— it does NOT require antisymmetry or…
- LinearOrder.toTotalPreorderEvery
- Used by 1
- higher_bruhat_right_coord_monotoneFor any subset Q ⊆ {0, ..., n-1}, the right coordinate map rho_Q is monotone with respect to family inclusion under the lexicographical…
Read back from the Lean
Given a natural number n, a finite subset Q of Fin n, and a collection X of finite subsets of Fin n, higher_bruhat_right_coord n Q X evaluates to a List Bool defined as follows:
- If Q is nonempty (with proof hQ), it considers all elements x : Fin n such that x ∉ Q and x > Q.min' hQ, sorts them in increasing order into a list D, and returns the list of booleans decide (insert x Q ∈ X) for each x in D.
- If Q is empty, it returns the empty list [].
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 long right coordinate binary word rho_Q(X) for Q in (Fin n choose k). -/ def higher_bruhat_right_coord (n : ℕ) (Q : Finset (Fin n)) (X : Finset (Finset (Fin n))) : List Bool := if hQ : Q.Nonempty then let D := (Finset.univ.filter (fun x : Fin n => x ∉ Q ∧ Q.min' hQ < x)).sort (· ≤ ·) D.map (fun x => decide (insert x Q ∈ X)) else []