KnuthClassRepresentative
The row reading word of σ's RSK insertion tableau — the canonical word of its Knuth (plactic) class.
KnuthClassRepresentative(Permutation)
Details
- Takes a `Permutation` and returns a `Permutation` — a typed map, so a wrong carrier is a type error rather than a wrong answer.
- Two permutations are Knuth-equivalent exactly when they share an insertion tableau (Schensted), so reading that tableau back out — bottom row to top, left to right — picks one fixed representative per class. Idempotent: the representative's own insertion tableau is the same P, so applying this again changes nothing.