> < ^ Date: Thu, 17 Sep 1998 19:56:37 -0700
< ^ From: Jacob Hirbawi <hirbawi@commquest.com >
> < ^ Subject: Re: Overloading Operations in GAP4

Dear GAP Forum,

Thanks for the response; the examples given were exactly the kind
I was hoping to see; I now see how operator overloading is done in
GAP4.

This leads me to a somewhat related question about constructing
algebras with a user defined type and a user defined multiplication.
So for example if I defined :

A := MyObject(3);
B := MyObject(5);

and GAP4 understands how to caclulate A*B; is there a "natural" way
to get GAP4 to understand statements of the form

7*A + 12*B + 9*(A*B)  or  (A+3*B)*A

I have existing GAP3 code that does that; but it is inefficient in the
sense that I have to rewrite a lot of similar code for every new type
I define; hopefully there's something better in GAP4.

If the question is too general; a special case of the above would be
constructing the group algebra of a permutation or finitely presented
group; the construction would invlove the same type of definitions.

Thanks for any suggestions,

Jacob Hirbawi.


> < [top]