How to translate an element in a Coxeter group written as a matrix in Sage to reflections (a list)?

96 Views Asked by At

I am trying to use Sage to reduce a word to a reduced word. For example, consider the word $w=[4, 3, 2, 4, 3, 2, 1, 2, 4, 3, 2, 1, 3]=s_4s_3s_2s_4s_3s_2s_1s_2s_4s_3s_2s_1$. I used the following code to reduce the word. But I don't know how to translate the result back to a list. How could I translate w.reduced_word to a list (a word in $s_i$)? Thank you very much.

W = CoxeterGroup(['D',4])

w = W.from_reduced_word([4, 3, 2, 4, 3, 2, 1, 2, 4, 3, 2, 1, 3])

w

w.reduced_word

1

There are 1 best solutions below

0
On BEST ANSWER

Don't forget the parentheses.

Indeed, w.reduced_word is the method you want to call, and calling it is done as w.reduced_word().

So the usage would look something like this:

sage: W = CoxeterGroup(['D', 4])
sage: w = W.from_reduced_word([4, 3, 2, 4, 3, 2, 1, 2, 4, 3, 2, 1, 3])
sage: w
[-1  0  0  0]
[ 0 -1  0  0]
[ 0 -1  1  0]
[ 0  0  0 -1]
sage: w.reduced_word()
[4, 2, 3, 1, 2, 4, 2, 3, 1, 2, 1]

For a string of s_{i} s_{j} to be LaTeXed as $s_i s_j$, use:

sage: ' '.join('s_{{{}}}'.format(i) for i in w.reduced_word())
's_{4} s_{2} s_{3} s_{1} s_{2} s_{4} s_{2} s_{3} s_{1} s_{2} s_{1}'

or without spaces:

sage: ''.join('s_{{{}}}'.format(i) for i in w.reduced_word())
's_{4}s_{2}s_{3}s_{1}s_{2}s_{4}s_{2}s_{3}s_{1}s_{2}s_{1}'