[GAP Forum] Programming Question.

Alexander Hulpke hulpke at math.colostate.edu
Tue May 4 20:51:39 BST 2010




On May 4, 2010, at 5/4/10 10:49, German Combariza wrote:
> In the free group group
> f:= FreeGroup("x", "y");
> I have a element w. How Can ask to GAP if   w=x*(something) or y*(something).
> I need to split the word w.

If you want to split the whole word, you can simply access the internal storage via
LetterRepAssocWord(w)
which returns a list of integers. E.g. w=x^2yx^-1y^-1 would be
1,1,2,-1,-2

Best,

    Alexander Hulpke
 


-- Colorado State University, Department of Mathematics,
Weber Building, 1874 Campus Delivery, Fort Collins, CO 80523-1874, USA
email: hulpke at math.colostate.edu, Phone: ++1-970-4914288
http://www.math.colostate.edu/~hulpke






More information about the Forum mailing list