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 ## View and print and such
LeftObjString@ := function(Q) LeftObjString@ := function(Q)
# Don't test distributivity if we haven't already # 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"; return "LeftQuasigroup";
end; end;
RightObjString@ := function(Q) RightObjString@ := function(Q)
# Don't test distributivity if we haven't already # 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"; return "RightQuasigroup";
end; end;
@ -324,12 +324,14 @@ InstallMethod(Display, "for a right quasigroup with multiplication table",
end); end);
LeftObjView@ := function(Q) 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"; return "<left quasigroup";
end; end;
RightObjView@ := function(Q) 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"; return "<right quasigroup";
end; end;