Have to cut many other methods down to be more specific to element reps

This commit is contained in:
Glen Whitney 2017-10-30 11:23:55 -04:00
parent a69dcd05d3
commit 2696cd6ff2
1 changed files with 21 additions and 21 deletions

View File

@ -30,14 +30,14 @@ end );
InstallMethod( \=, "for two elements of a quasigroup", InstallMethod( \=, "for two elements of a quasigroup",
IsIdenticalObj, IsIdenticalObj,
[ IsQuasigroupElement, IsQuasigroupElement ], [ IsQuasigroupElmRep, IsQuasigroupElmRep ],
function( x, y ) function( x, y )
return FamilyObj( x ) = FamilyObj( y ) and x![ 1 ] = y![ 1 ]; return FamilyObj( x ) = FamilyObj( y ) and x![ 1 ] = y![ 1 ];
end ); end );
InstallMethod( \<, "for two elements of a quasigroup", InstallMethod( \<, "for two elements of a quasigroup",
IsIdenticalObj, IsIdenticalObj,
[ IsQuasigroupElement, IsQuasigroupElement ], [ IsQuasigroupElmRep, IsQuasigroupElmRrep ],
function( x, y ) function( x, y )
return FamilyObj( x ) = FamilyObj( y ) and x![ 1 ] < y![ 1 ]; return FamilyObj( x ) = FamilyObj( y ) and x![ 1 ] < y![ 1 ];
end ); end );
@ -57,7 +57,7 @@ end );
## i.e., a*b*c=(a*b)*c. Powers use binary decomposition. ## i.e., a*b*c=(a*b)*c. Powers use binary decomposition.
InstallMethod( \*, "for two quasigroup elements", InstallMethod( \*, "for two quasigroup elements",
IsIdenticalObj, IsIdenticalObj,
[ IsQuasigroupElement, IsQuasigroupElement ], [ IsQuasigroupElmRep, IsQuasigroupElmRep ],
function( x, y ) function( x, y )
local F; local F;
F := FamilyObj( x ); F := FamilyObj( x );
@ -65,13 +65,13 @@ function( x, y )
end ); end );
InstallOtherMethod( \*, "for a QuasigroupElement and a list", InstallOtherMethod( \*, "for a QuasigroupElement and a list",
[ IsQuasigroupElement , IsList ], [ IsQuasigroupElmRep , IsList ],
function( x, ly ) function( x, ly )
return List( ly, y -> x*y ); return List( ly, y -> x*y );
end ); end );
InstallOtherMethod( \*, "for a list and a QuasigroupElement", InstallOtherMethod( \*, "for a list and a QuasigroupElement",
[ IsList, IsQuasigroupElement ], [ IsList, IsQuasigroupElmRep ],
function( lx, y ) function( lx, y )
return List( lx, x -> x*y ); return List( lx, x -> x*y );
end ); end );
@ -83,7 +83,7 @@ end );
## z=x/y means zy=x ## z=x/y means zy=x
InstallMethod( RightDivision, "for two quasigroup elements", InstallMethod( RightDivision, "for two quasigroup elements",
IsIdenticalObj, IsIdenticalObj,
[ IsQuasigroupElement, IsQuasigroupElement ], [ IsQuasigroupElmRep, IsQuasigroupElmRep ],
function( x, y ) function( x, y )
local F, ycol; local F, ycol;
F := FamilyObj( x ); F := FamilyObj( x );
@ -93,7 +93,7 @@ end );
InstallOtherMethod( RightDivision, InstallOtherMethod( RightDivision,
"for a list and a quasigroup element", "for a list and a quasigroup element",
[ IsList, IsQuasigroupElement ], [ IsList, IsQuasigroupElmRep ],
0, 0,
function( lx, y ) function( lx, y )
return List( lx, x -> RightDivision(x, y) ); return List( lx, x -> RightDivision(x, y) );
@ -101,7 +101,7 @@ end );
InstallOtherMethod( RightDivision, InstallOtherMethod( RightDivision,
"for a quasigroup element and a list", "for a quasigroup element and a list",
[ IsQuasigroupElement, IsList ], [ IsQuasigroupElmRep, IsList ],
0, 0,
function( x, ly ) function( x, ly )
return List( ly, y -> RightDivision(x, y) ); return List( ly, y -> RightDivision(x, y) );
@ -110,7 +110,7 @@ end );
InstallOtherMethod( \/, InstallOtherMethod( \/,
"for two elements of a quasigroup", "for two elements of a quasigroup",
IsIdenticalObj, IsIdenticalObj,
[ IsQuasigroupElement, IsQuasigroupElement ], [ IsQuasigroupElmRep, IsQuasigroupElmRep ],
0, 0,
function( x, y ) function( x, y )
return RightDivision( x, y ); return RightDivision( x, y );
@ -118,7 +118,7 @@ end );
InstallOtherMethod( \/, InstallOtherMethod( \/,
"for a list and a quasigroup element", "for a list and a quasigroup element",
[ IsList, IsQuasigroupElement ], [ IsList, IsQuasigroupElmRep ],
0, 0,
function( lx, y ) function( lx, y )
return List( lx, x -> RightDivision(x, y) ); return List( lx, x -> RightDivision(x, y) );
@ -126,7 +126,7 @@ end );
InstallOtherMethod( \/, InstallOtherMethod( \/,
"for a quasigroup element and a list", "for a quasigroup element and a list",
[ IsQuasigroupElement, IsList ], [ IsQuasigroupElmRep, IsList ],
0, 0,
function( x, ly ) function( x, ly )
return List( ly, y -> RightDivision(x, y) ); return List( ly, y -> RightDivision(x, y) );
@ -135,7 +135,7 @@ end );
## z = x\y means xz=y ## z = x\y means xz=y
InstallMethod( LeftDivision, "for two quasigroup elements", InstallMethod( LeftDivision, "for two quasigroup elements",
IsIdenticalObj, IsIdenticalObj,
[ IsQuasigroupElement, IsQuasigroupElement ], [ IsQuasigroupElmRep, IsQuasigroupElmRep ],
function( x, y ) function( x, y )
local F; local F;
F := FamilyObj( x ); F := FamilyObj( x );
@ -144,7 +144,7 @@ end );
InstallOtherMethod( LeftDivision, InstallOtherMethod( LeftDivision,
"for a list and a quasigroup element", "for a list and a quasigroup element",
[ IsList, IsQuasigroupElement ], [ IsList, IsQuasigroupElmRep ],
0, 0,
function( lx, y ) function( lx, y )
return List( lx, x -> LeftDivision(x, y) ); return List( lx, x -> LeftDivision(x, y) );
@ -152,7 +152,7 @@ end );
InstallOtherMethod( LeftDivision, InstallOtherMethod( LeftDivision,
"for a quasigroup element and a list", "for a quasigroup element and a list",
[ IsQuasigroupElement, IsList ], [ IsQuasigroupElmRep, IsList ],
0, 0,
function( x, ly ) function( x, ly )
return List( ly, y -> LeftDivision(x, y) ); return List( ly, y -> LeftDivision(x, y) );
@ -215,7 +215,7 @@ end );
## ------------------------------------------------------------------------- ## -------------------------------------------------------------------------
InstallMethod( \^, "for a quasigroup element and a permutation", InstallMethod( \^, "for a quasigroup element and a permutation",
[ IsQuasigroupElement, IsPerm ], [ IsQuasigroupElmRep, IsPerm ],
function( x, p ) function( x, p )
local F; local F;
F := FamilyObj( x ); F := FamilyObj( x );
@ -223,7 +223,7 @@ function( x, p )
end ); end );
InstallMethod( OneOp, "for loop elements", InstallMethod( OneOp, "for loop elements",
[ IsLoopElement ], [ IsLoopElmRep ],
function( x ) function( x )
local F; local F;
F := FamilyObj( x ); F := FamilyObj( x );
@ -237,7 +237,7 @@ end );
## If <x> is a loop element, returns the left inverse of <x> ## If <x> is a loop element, returns the left inverse of <x>
InstallMethod( LeftInverse, "for loop elements", InstallMethod( LeftInverse, "for loop elements",
[ IsLoopElement ], [ IsLoopElmRep ],
x -> RightDivision( One( x ), x ) x -> RightDivision( One( x ), x )
); );
@ -248,12 +248,12 @@ InstallMethod( LeftInverse, "for loop elements",
## If <x> is a loop element, returns the left inverse of <x> ## If <x> is a loop element, returns the left inverse of <x>
InstallMethod( RightInverse, "for loop elements", InstallMethod( RightInverse, "for loop elements",
[ IsLoopElement ], [ IsLoopElmRep ],
x -> LeftDivision( x, One( x ) ) x -> LeftDivision( x, One( x ) )
); );
InstallMethod( InverseOp, "for loop elements", InstallMethod( InverseOp, "for loop elements",
[ IsLoopElement ], [ IsLoopElmRep ],
function( x ) function( x )
local y; local y;
y := RightInverse( x ); y := RightInverse( x );
@ -274,7 +274,7 @@ end );
## (xy)z = (x(yz))u. ## (xy)z = (x(yz))u.
InstallMethod( Associator, "for three quasigroup elements", InstallMethod( Associator, "for three quasigroup elements",
[ IsQuasigroupElement, IsQuasigroupElement, IsQuasigroupElement ], [ IsQuasigroupElmRep, IsQuasigroupElmRep, IsQuasigroupElmRep ],
function( x, y, z ) function( x, y, z )
return LeftDivision( x*(y*z), (x*y)*z ); return LeftDivision( x*(y*z), (x*y)*z );
end); end);
@ -288,7 +288,7 @@ end);
## (xy) = (yx)u. ## (xy) = (yx)u.
InstallMethod( Commutator, "for two quasigroup elements", InstallMethod( Commutator, "for two quasigroup elements",
[ IsQuasigroupElement, IsQuasigroupElement ], [ IsQuasigroupElmRep, IsQuasigroupElmRep ],
function( x, y ) function( x, y )
return LeftDivision( y*x, x*y ); return LeftDivision( y*x, x*y );
end); end);