Dear GAP Forum
One of the delights of GAP is the ability to overlay functions
using operations records. I think I understand how to do this
with functions which take a single parameter but I have queries
in two more complicated cases.
Assume I am constructing functions for TestOps, and that X
is an object and f a morphism in the correcponding category.
1. I define a function TestOps.Image
and then call >TestOps.Image( f, X );
This results in an error message which I believe comes from
GroupOps.Image or MappingOps.Image.
However >TestOps.Image( f, X ); works ok.
The obvious difference is that Kernel takes a single parameter,
so it is clear which operations record should be used,
whereas Image takes two parameters. What am I missing?
2. I also wish to define TestOps.DirectProduct
and call this function by >DirectProduct( X, Y );
However, the dispatcher function DirectProduct in file gprprods.g
appears to insist that all the arguments should be groups:
( ... if nor ForAll( arg, IsGroup ) then Error ... )
Again, >TestOps.DirectProduct( X, Y ); is ok.
The objects X,Y are not groups, but contain groups,
so the term DirectProduct is an appropriate one.
All suggestions welcomed.