Don't test SELF distributivity just to print

This commit is contained in:
Glen Whitney 2017-10-19 02:40:48 +02:00
parent b366588fa1
commit 27c5f78120
1 changed files with 6 additions and 4 deletions

View File

@ -253,13 +253,13 @@ InstallMethod(IsRSelfDistributive, "for magma",
## View and print and such
LeftObjString@ := function(Q)
# Don't test distributivity if we haven't already
if HasIsLDistributive(Q) and IsLeftRack(Q) then return "LeftRack"; fi;
if HasIsLSelfDistributive(Q) and IsLeftRack(Q) then return "LeftRack"; fi;
return "LeftQuasigroup";
end;
RightObjString@ := function(Q)
# Don't test distributivity if we haven't already
if HasIsRDistributive(Q) and IsRightRack(Q) then return "RightRack"; fi;
if HasIsRSelfDistributive(Q) and IsRightRack(Q) then return "RightRack"; fi;
return "RightQuasigroup";
end;
@ -324,12 +324,14 @@ InstallMethod(Display, "for a right quasigroup with multiplication table",
end);
LeftObjView@ := function(Q)
if HasIsLDistributive(Q) and IsLeftRack(Q) then return "<left rack"; fi;
if HasIsLSelfDistributive(Q) and IsLeftRack(Q) then return "<left rack"; fi;
return "<left quasigroup";
end;
RightObjView@ := function(Q)
if HasIsRdistributive(Q) and IsRightRack(Q) then return "<right rack"; fi;
if HasIsRSelfDistributive(Q) and IsRightRack(Q) then
return "<right rack";
fi;
return "<right quasigroup";
end;