0

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? Thank you very much.

LJR
  • 14,520
  • What dio you mean by "one-line notation"? List of images of points? Cycle form? – ahulpke May 10 '20 at 17:03
  • @ahulpke, thanks! I mean list of images of points. – LJR May 10 '20 at 18:36
  • What I would do is to evaluate w as a proper permutation, and then calculate images of 1..n under that permutation. If it is of help I can show you the GAP code for doing so. – ahulpke May 11 '20 at 15:01
  • @ahulpke, thanks! Yes, your GAP codes will be very helpful. – LJR May 11 '20 at 22:33

1 Answers1

1

You could do so through GAP. Construct an isomorphism from the symmetric group to a finitely presented group (which uses the Weyl generators):

gap> n:=5;; # e.g.
gap> s:=SymmetricGroup(n);
Sym( [ 1 .. 5 ] )
gap> iso:=IsomorphismFpGroup(s);
[ (1,2), (2,3), (3,4), (4,5) ] -> [ S_5.1, S_5.2, S_5.3, S_5.4 ]
gap> fp:=Range(iso);;
gap> s1:=fp.1;s2:=fp.2;s3:=fp.3;s4:=fp.4;
S_5.1
S_5.2
S_5.3
S_5.4

Then use the isomorphism to convert word to permutation and get the image list with ListPerm:

gap> word:=s2*s3*s4*s3*s2; # for example
S_5.2*S_5.3*S_5.4*S_5.3*S_5.2
gap> perm:=PreImagesRepresentative(iso,word);
(2,5)
gap> ListPerm(perm,n);
[ 1, 5, 3, 4, 2 ]
ahulpke
  • 18,416
  • 1
  • 21
  • 38
  • What is wrong with this: S5=SymmetricGroup(5);S5((2,5)),Permutation(S5((2,5))). It evaluates in sagemathcell as ((2,5), [1, 5, 3, 4, 2]) – NameOfTheRose Dec 09 '22 at 08:03
  • This is wrong GAP syntax (and unclear to me what you want to do). No idea about Sage. – ahulpke Dec 09 '22 at 14:13
  • Thank you for the response, I tried to answer the original question (which mentions Sage in the title) in SageMath, using the example in your answer. I am not sure if it will work in general. – NameOfTheRose Dec 09 '22 at 14:33