[GAP Forum] AssocWordByLetterRep
Alexander Hulpke
hulpke at mac.com
Fri Dec 22 08:25:48 GMT 2006
Dear GAP Forum,
On Dec 21, 2006, at 8:23 PM, Dmytro Savchuk wrote:
> I have a question about the function AssocWordByLetterRep. Here is a
> code:
>
> gap> f:=FreeGroup(2);
> <free group on the generators [ f1, f2 ]>
>
> gap> w:=AssocWordByLetterRep(FamilyObj(f.1),[1,-1]);
> f1^0
>
> gap> IsOne(w);
> false
>
> Should it be like that or it should return <identity ...>?
No. AssocWordByLetterRep simply creates a word with the internal
representation given. It is the lowest level function to create words
and does minimal checking of the argument to be fast.
No cancellation takes place (so one could argue that it is an element
in the monoid on X and X^-1). The user (or the code that creates
words) must take care of this.
I suppose you have code that creates free group elements as lists.
Unless your interface is extremely time critical I would just use a
small `for' loop to multiply together generators of f according to
the values in the list, then the internal multiplication routine
(written in the kernel) takes care of cancellation.
If you feel there should be a rountine analogous to
`AssocWordByLetterRep' which *does* cancellation please let me know
and I'll look at it for future releases.
All the best and Merry Christmas!
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