add quotients for direct product elements
This commit is contained in:
parent
b089e131d1
commit
6428dddf56
@ -641,6 +641,33 @@ InstallOtherMethod(DirectProductOp, "for a list and non-quasigroup magma",
|
|||||||
return MagmaByGenerators(gens);
|
return MagmaByGenerators(gens);
|
||||||
end);
|
end);
|
||||||
|
|
||||||
|
# Make sure that we can take quotients properly in the direct product
|
||||||
|
InstallOtherMethod(LeftQuotient,
|
||||||
|
IsIdenticalObj,
|
||||||
|
[IsDirectProductElement, IsDirectProductElement],
|
||||||
|
function (l,r)
|
||||||
|
local i, comps;
|
||||||
|
comps := [];
|
||||||
|
for i in [1..Length(l)] do
|
||||||
|
Add(comps, LeftQuotient(l![i],r![i]));
|
||||||
|
od;
|
||||||
|
return DirectProductElement(comps);
|
||||||
|
end);
|
||||||
|
|
||||||
|
InstallOtherMethod(\/,
|
||||||
|
IsIdenticalObj,
|
||||||
|
[IsDirectProductElement, IsDirectProductElement],
|
||||||
|
function (l,r)
|
||||||
|
local i, comps;
|
||||||
|
comps := [];
|
||||||
|
for i in [1..Length(l)] do
|
||||||
|
Add(comps, l![i] / r![i]);
|
||||||
|
od;
|
||||||
|
return DirectProductElement(comps);
|
||||||
|
end);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Coversions among the structure types
|
## Coversions among the structure types
|
||||||
InstallMethod(AsLeftQuasigroup, "for a left quasigroup",
|
InstallMethod(AsLeftQuasigroup, "for a left quasigroup",
|
||||||
[IsLeftQuasigroup], IdFunc);
|
[IsLeftQuasigroup], IdFunc);
|
||||||
|
Loading…
Reference in New Issue
Block a user