add opposites for quasigroups, racks, and quandles
This commit is contained in:
parent
03f36dd672
commit
68d20cf850
1 changed files with 60 additions and 0 deletions
|
@ -456,3 +456,63 @@ InstallMethod(Opposite, "for a finitely generated magma with inverse",
|
||||||
fam := CollectionsFamily(OppositeFamily(ElementsFamily(FamilyObj(M))));
|
fam := CollectionsFamily(OppositeFamily(ElementsFamily(FamilyObj(M))));
|
||||||
return MagmaWithInverses(fam, elts);
|
return MagmaWithInverses(fam, elts);
|
||||||
end);
|
end);
|
||||||
|
|
||||||
|
# Do we need Opposite() methods for Semigroups, Monoids, and Groups? Or have
|
||||||
|
# we copied enough properties that those filters will simply carry over? The
|
||||||
|
# couple of small tests I did the Opposite of a Group was again reported as a
|
||||||
|
# Group, so let's leave those methods out for now, and move on to quasigroups,
|
||||||
|
# racks, and quandles.
|
||||||
|
|
||||||
|
InstallMethod(Opposite, "for a left quasigroup",
|
||||||
|
[IsLeftQuasigroup and HasGeneratorsOfLeftQuasigroup],
|
||||||
|
function (Q)
|
||||||
|
local fam, elts;
|
||||||
|
elts := List(GeneratorsOfLeftQuasigroup(Q), q -> OppositeObj(q));
|
||||||
|
fam := CollectionsFamily(OppositeFamily(ElementsFamily(FamilyObj(Q))));
|
||||||
|
return RightQuasigroupNC(fam, elts);
|
||||||
|
end);
|
||||||
|
|
||||||
|
InstallMethod(Opposite, "for a left rack",
|
||||||
|
[IsLeftRack and HasGeneratorsOfLeftQuasigroup],
|
||||||
|
function (Q)
|
||||||
|
local fam, elts;
|
||||||
|
elts := List(GeneratorsOfLeftQuasigroup(Q), q -> OppositeObj(q));
|
||||||
|
fam := CollectionsFamily(OppositeFamily(ElementsFamily(FamilyObj(Q))));
|
||||||
|
return RightRackNC(fam, elts);
|
||||||
|
end);
|
||||||
|
|
||||||
|
InstallMethod(Opposite, "for a left quandle",
|
||||||
|
[IsLeftQuandle and HasGeneratorsOfLeftQuasigroup],
|
||||||
|
function (Q)
|
||||||
|
local fam, elts;
|
||||||
|
elts := List(GeneratorsOfLeftQuasigroup(Q), q -> OppositeObj(q));
|
||||||
|
fam := CollectionsFamily(OppositeFamily(ElementsFamily(FamilyObj(Q))));
|
||||||
|
return RightQuandleNC(fam, elts);
|
||||||
|
end);
|
||||||
|
|
||||||
|
InstallMethod(Opposite, "for a right quasigroup",
|
||||||
|
[IsRightQuasigroup and HasGeneratorsOfRightQuasigroup],
|
||||||
|
function (Q)
|
||||||
|
local fam, elts;
|
||||||
|
elts := List(GeneratorsOfRightQuasigroup(Q), q -> OppositeObj(q));
|
||||||
|
fam := CollectionsFamily(OppositeFamily(ElementsFamily(FamilyObj(Q))));
|
||||||
|
return LeftQuasigroupNC(fam, elts);
|
||||||
|
end);
|
||||||
|
|
||||||
|
InstallMethod(Opposite, "for a right rack",
|
||||||
|
[IsRightRack and HasGeneratorsOfRightQuasigroup],
|
||||||
|
function (Q)
|
||||||
|
local fam, elts;
|
||||||
|
elts := List(GeneratorsOfRightQuasigroup(Q), q -> OppositeObj(q));
|
||||||
|
fam := CollectionsFamily(OppositeFamily(ElementsFamily(FamilyObj(Q))));
|
||||||
|
return LeftRackNC(fam, elts);
|
||||||
|
end);
|
||||||
|
|
||||||
|
InstallMethod(Opposite, "for a right quandle",
|
||||||
|
[IsRightQuandle and HasGeneratorsOfRightQuasigroup],
|
||||||
|
function (Q)
|
||||||
|
local fam, elts;
|
||||||
|
elts := List(GeneratorsOfRightQuasigroup(Q), q -> OppositeObj(q));
|
||||||
|
fam := CollectionsFamily(OppositeFamily(ElementsFamily(FamilyObj(Q))));
|
||||||
|
return LeftQuandleNC(fam, elts);
|
||||||
|
end);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue