Ask Your Question

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

asked 2020-04-10 16:59:43 +0100

lijr07 gravatar image

updated 2020-04-10 17:01:06 +0100

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()

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

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2020-04-10 18:01:42 +0100

FrédéricC gravatar image

Rather use the symmetric group, in that case.

sage: W = SymmetricGroup(8)
sage: [s1,s2,s3,s4,s5,s6,s7] = W.simple_reflections()
sage: w = s2*s4*s6; w
sage: w.tuple()
(1, 3, 2, 5, 4, 7, 6, 8)
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2020-04-10 16:59:43 +0100

Seen: 52 times

Last updated: Apr 10 '20