Hi,
I have defined my group in maple as

G:=grelgroup({u,v,w},{[u,v,u,1/w],[v,u,v,1/w],[u,u],[v,v],[w,w]})
I now want to define a function on GxGxG. Previously I have used array, i.e. f:=array(0..2,0..3,0..4), but how do I do it for elements in G?
Many thanks,
Jenny
For example
It is more convenient to use a permgroup representation. That can be done as
with(group): G:=grelgroup({u,v,w},{[u,v,u,1/w],[v,u,v,1/w],[u,u],[v,v],[w,w]}): pg:=permrep(subgrel({},G)); pg := permgroup(6, {u = [[1, 2], [3, 6], [4, 5]], v = [[1, 3], [2, 5], [4, 6]], w = [[1, 4], [2, 6], [3, 5]]}) g:=elements(pg); g := {[], [[1, 5, 6], [2, 3, 4]], [[1, 6, 5], [2, 4, 3]], [[1, 2], [3, 6], [4, 5]], [[1, 3], [2, 5], [4, 6]], [[1, 4], [2, 6], [3, 5]]} nops(g); 6Now, the function on GxGxG can be defined using a 3-dimensional Array if one wishes. For example,
f:=Array((1..6)$3,(i,j,k)->nops(g[i])+nops(g[j])+nops(g[k])): f(1,2,3); 4Of course, it can be defined in a usual way as well, as
F:=(i,j,k)->nops(g[i])+nops(g[j])+nops(g[k]): F(1,2,3); 4in this example
Alec