5.1 The witness construction
For \(n, k \in \mathbb {N}\), \(\texttt{witness\_ perm}(n, k)\) is an explicit sequence whose cd-monomial is \(c^{k-1}\, d\, c^{n-2-k}\) and whose \(S_w\)-set equals \(\{ k\} \).
This is exactly Stanley’s witness from the proof of Proposition 1.6.4 (EC1 p. 61):
“If \(i \in \omega (T) \setminus \omega (S)\) then let \(\Phi _{w} = c^{i-1}\, d\, c^{n-2-i}\), so \(S_w = \{ i\} \).”