Dear GAP forum readers,
Martin Wursthorn has reported a problem with the operation package.
gap> sl22 := SpecialLinearGroup ( 2, 2 ); SL(2,2) gap> dom := Blocks ( sl22, Elements ( sl22 ), OnLeft ); [ [ [ [ 0*Z(2), Z(2)^0 ], [ Z(2)^0, 0*Z(2) ] ], [ [ Z(2)^0, Z(2)^0 ], [ Z(2)^0, 0*Z(2) ] ] ], [ [ [ 0*Z(2), Z(2)^0 ], [ Z(2)^0, Z(2)^0 ] ], [ [ Z(2)^0, Z(2)^0 ], [ 0*Z(2), Z(2)^0 ] ] ], [ [ [ Z(2)^0, 0*Z(2) ], [ 0*Z(2), Z(2)^0 ] ], [ [ Z(2)^0, 0*Z(2) ], [ Z(2)^0, Z(2)^0 ] ] ] ] gap> g := Operation ( sl22, dom, OnSets ); Error, ...
First of all, we must admit that the function `OnLeft' is really
misleading. Since `OnLeft( obj, elm ) = elm * obj', the so-called
operation `OnLeft' is really an anti-operation, i.e.
OnLeft( OnLeft( obj, elm1 ), elm2 ) = OnLeft( obj, elm2 * elm1 ).
Therefore, in order to explain the problem, I will suppose that
`OnLeft' had been `OnRight' instead. If you feed the above input into
GAP-3.4 with `OnRight', it gives a different error, but for the same
The block system <dom> is constructed for the operation `OnRight'. The
operation `OnBlocks' is therefore, in this case, done setwise, then
`OnRight'. It can be implemented by the following function (`block' in
`dom' and `gen' in `sl22'):
OnBlocks := function( block, gen )
local result, mat;result := [ ]; for mat in block do AddSet( result, OnRight( mat, gen ) ); od; return result; end;
The function `OnSets', which Martin Wursthorn used, is similar to
`OnBlocks' above, but it uses `OnPoints' instead of `OnRight'. For
matrices operating on matrices, `OnRight' denotes multiplication, but
`OnPoints' denotes conjugation. This implies that <dom> is *not* a
block system for the operation `OnPoints' and is therefore *not* an
operation domain for the operation `OnSets' which is specified in the
`Operation' command. The error occurs because the image of an alleged
block is not found in the sorted list <dom>. `PositionSorted' does
*not* return `false' in this case but it returns the position where
the missing element would have to be inserted into the sorted list.
The function `Operation' does not perform a check for this case since
it assumes that the given domain really *is* an operation domain for
the given operation.
(If someone should insist to stick to the anti-operation `OnLeft',
they would have to replace `OnRight' by `OnLeft' in the function
I hope this helps,