# Revision history [back]

### How to convert an element in a Symmetric group to a one-line notation in Sage

Let $S_n$ be the symmetric group over ${1,2,\ldots,n}$. Let $w=s_{i_1} \cdots s_{i_m} \in S_n$, where $s_i$'s are simple reflections. How to convert $w$ to a one-line notation in Sage? The following are my codes.

W = WeylGroup("A7", prefix="s") [s1,s2,s3,s4,s5,s6,s7] = W.simple_reflections()

w=s2s4s6

I want to convert $w$ to a one line nation. Thank you very much.

### How to convert an element in a Symmetric group to a one-line notation in Sage

Let $S_n$ be the symmetric group over ${1,2,\ldots,n}$. Let $w=s_{i_1} \cdots s_{i_m} \in S_n$, where $s_i$'s are simple reflections. How to convert $w$ to a one-line notation in Sage? The following are my codes.

W = WeylGroup("A7", prefix="s")
[s1,s2,s3,s4,s5,s6,s7] = W.simple_reflections() w=s2s4s6W.simple_reflections()
w=s2*s4*s6


I want to convert $w$ to a one line nation. Thank you very much.