in SAGE, how to convert a permutation into coxeter-generators (simple reflections)?

219 Views Asked by At

For example: for the permutation $[6,3,2,4,1,5]$, we know that $[6,3,2,4,1,5]=(56)(45)(34)(23)(12)(23)(34)(45)(23)$ For Weyl Group of A5, that is $s_5*s_4*s_3*s_2*s_1*s_2*s_3*s_4*s_2$, My question is: are there any existed codes to convert any permutation to this form?

1

There are 1 best solutions below

0
On BEST ANSWER

Simply like that

sage: x = Permutation([6,3,2,4,1,5])
sage: x.reduced_word()
[5, 4, 3, 2, 1, 3, 2, 3, 4]

The method "reduced_word" also works with other constructions of finite Coxeter groups.