# Revision history [back]

Replace t2=t1.reduced_word() with

R = W.simple_reflections()
t2 = [R[s] for s in t1.reduced_word()]


Replace I'm not sure what you mean under "return s1*s2" since s1 and s2 are two transpositions (not symbolic variables) and their product is t2. So, if you want their product, simply take t2. If you want to get them as a list like [s1,s2], then replace t2=t1.reduced_word() with

R = W.simple_reflections()
t2 = [R[s] for s in t1.reduced_word()]


I'm not sure what you mean under "return s1*s2" since s1 and s2 are two transpositions (not symbolic variables) and their product is t2t1. So, if you want their product, simply take t2t1. If you want to get them as a list like [s1,s2], then replace t2=t1.reduced_word() with

R = W.simple_reflections()
t2 = [R[s] for s in t1.reduced_word()]