Played with ChatGPT to see if it could give code for the of reduced words of a permutation w (a hard problem). Actually gave me an interesting (wrong) solution: product(i!: i is a descent of w)/product(j! : j is an exceedence of w) Ended up going in circles. Fun though...