Don't test distributivity just to print

This commit is contained in:
Glen Whitney 2017-10-19 02:38:07 +02:00
parent 25672bad38
commit b366588fa1

View File

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