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