Add NC versions of quasigroup constructors to support uniform Print() syntax

This commit is contained in:
Glen Whitney 2017-10-19 02:26:18 +02:00
parent a70224afae
commit 25672bad38
2 changed files with 18 additions and 13 deletions

View File

@ -82,8 +82,10 @@ DeclareAttribute("RightDivisionTable", HasMultiplicationTable);
# And the builders
DeclareGlobalFunction("LeftQuasigroupByMultiplicationTable");
DeclareGlobalFunction("LeftQuasigroupByMultiplicationTableNC");
DeclareGlobalFunction("LeftRackByMultiplicationTable");
DeclareGlobalFunction("LeftRackByMultiplicationTableNC");
DeclareGlobalFunction("RightQuasigroupByMultiplicationTable");
DeclareGlobalFunction("RightQuasigroupByMultiplicationTableNC");
DeclareGlobalFunction("RightRackByMultiplicationTable");
DeclareGlobalFunction("RightRackByMultiplicationTableNC");

View File

@ -30,7 +30,7 @@ InstallGlobalFunction(LeftQuasigroup, function(arg)
fi;
return CloneOfTypeByGenerators(IsLeftQuasigroup, fam, arg,
GeneratorsOfLeftQuasigroup,
LeftQuasigroupByMultiplicationTable);
LeftQuasigroupByMultiplicationTableNC);
end);
InstallGlobalFunction(LeftRack, function(arg)
@ -68,7 +68,7 @@ InstallGlobalFunction(RightQuasigroup, function(arg)
fi;
return CloneOfTypeByGenerators(IsRightQuasigroup, fam, arg,
GeneratorsOfRightQuasigroup,
RightQuasigroupByMultiplicationTable);
RightQuasigroupByMultiplicationTableNC);
end);
InstallGlobalFunction(RightRack, function(arg)
@ -116,26 +116,29 @@ InstallGlobalFunction(LeftQuasigroupByMultiplicationTable,
Error("Multiplication table <T> must have each row a permutation of ",
"the same entries.");
fi;
return MagmaByMultiplicationTableCreatorNC(
CanonicalCayleyTableOfLeftQuasigroupTable(T),
LeftQuasigroup,
IsLeftQuotientElement and IsMagmaByMultiplicationTableObj
);
return LeftQuasigroupByMultiplicationTableNC(
CanonicalCayleyTableOfLeftQuasigroupTable(T));
end);
InstallGlobalFunction(LeftQuasigroupByMultiplicationTableNC,
T -> MagmaByMultiplicationTableCreatorNC(T, LeftQuasigroup,
IsLeftQuotientElement and IsMagmaByMultiplicationTableObj)
);
InstallGlobalFunction(RightQuasigroupByMultiplicationTable,
function(T)
if not IsRightQuasigroupTable(T) then
Error("Multiplication table <T> must have each column a permutation of ",
Error("Multiplication table <T> must have each row a permutation of ",
"the same entries.");
fi;
return MagmaByMultiplicationTableCreatorNC(
CanonicalCayleyTable(T),
RightQuasigroup,
IsRightQuotientElement and IsMagmaByMultiplicationTableObj
);
return RightQuasigroupByMultiplicationTableNC(CanonicalCayleyTable(T));
end);
InstallGlobalFunction(RightQuasigroupByMultiplicationTableNC,
T -> MagmaByMultiplicationTableCreatorNC(T, RightQuasigroup,
IsRightQuotientElement and IsMagmaByMultiplicationTableObj)
);
InstallGlobalFunction(LeftRackByMultiplicationTable,
function(T)
if not IsLeftQuasigroupTable(T) then