RAQ/gap/byconj.gi

97 lines
3.1 KiB
Plaintext
Raw Normal View History

2017-10-20 22:51:30 +00:00
# byconj.gi RAQ Implementation of quandles by conjugation
InstallMethod(ConjugatorFamily, "for a family",
[IsFamily],
2017-10-22 16:23:45 +00:00
# Does GAP provide any way to get at the name of a family other than
# fam!.NAME ?
fam -> NewFamily(Concatenation("ConjugatorFamily(", fam!.NAME, ")"),
IsConjugatorObject)
);
2017-10-20 22:51:30 +00:00
2017-10-22 16:23:45 +00:00
InstallMethod(ConjugatorType, "for a family",
[IsFamily],
fam -> NewType(ConjugatorFamily(fam), IsDefaultConjugatorObject)
);
2017-10-20 22:51:30 +00:00
InstallMethod(ConjugatorObj,
"for a mult element that allows quotients (and should be assoc)",
[IsMultiplicativeElementWithInverse],
2017-10-22 16:23:45 +00:00
obj -> Objectify(ConjugatorType(FamilyObj(obj)), [Immutable(obj)])
);
2017-10-20 22:51:30 +00:00
## Printing and viewing
InstallMethod(String, "for conjugator objects",
[IsDefaultConjugatorObject],
obj -> Concatenation("ConjugatorObj( ", String(obj![1]), " )")
);
InstallMethod(ViewString, "for conjugator objects",
[IsDefaultConjugatorObject],
obj -> Concatenation("^", ViewString(obj![1]), ":")
);
InstallMethod(UnderlyingMultiplicativeElement, "for a conjugator object",
[IsDefaultConjugatorObject],
obj -> obj![1]
);
2017-10-22 16:23:45 +00:00
InstallMethod(\=, "for two conjugator objects",
2017-10-20 22:51:30 +00:00
IsIdenticalObj,
[IsDefaultConjugatorObject, IsDefaultConjugatorObject],
function(l,r) return l![1] = r![1]; end
);
2017-10-22 16:23:45 +00:00
InstallMethod(\<, "for two conjugator objects",
2017-10-20 22:51:30 +00:00
IsIdenticalObj,
[IsDefaultConjugatorObject, IsDefaultConjugatorObject],
function(l,r) return l![1] < r![1]; end
);
2017-10-22 16:23:45 +00:00
InstallMethod(\*, "for two conjugator objects",
2017-10-20 22:51:30 +00:00
IsIdenticalObj,
[IsDefaultConjugatorObject, IsDefaultConjugatorObject],
function(l,r) return ConjugatorObj(LeftQuotient(l![1],r![1])*l![1]); end
2017-10-20 22:51:30 +00:00
);
InstallOtherMethod(LeftQuotient, "for two conjugator objects",
2017-10-20 22:51:30 +00:00
IsIdenticalObj,
[IsDefaultConjugatorObject,IsDefaultConjugatorObject],
2017-10-21 18:58:41 +00:00
function(l,r) return ConjugatorObj((l![1]*r![1])/l![1]); end
2017-10-20 22:51:30 +00:00
);
2017-10-20 23:27:37 +00:00
InstallMethod(ConjugationQuandle, "for a group",
2017-10-20 22:51:30 +00:00
[IsGroup and IsFinite],
function(G)
local fam, elts, Q;
2017-10-20 23:17:58 +00:00
fam := CollectionsFamily(ConjugatorFamily(ElementsFamily(FamilyObj(G))));
# Question: how do we feasibly determine a set of generators of
2017-10-20 22:51:30 +00:00
# Conj(G) from a set of generators of G, so that we can handle infinite
# conj-quandles here?
2017-10-20 23:17:58 +00:00
elts := List(Elements(G), g -> ConjugatorObj(g) );
2017-10-20 22:51:30 +00:00
# What we would like to do is
# return AsLeftQuandle[NC?](elts);
# but that's NIY.
Q := LeftQuandleNC(fam, elts);
# We know that elts was actually closed under * and LeftQuotient, and
# since we are in a method only for finite groups, ergo Q is finite:
SetIsFinite(Q, true);
return Q;
2017-10-20 22:51:30 +00:00
end);
## Methods that are easier in conjugator quandles:
InstallMethod(GeneratorsOfMagma,
"for a quandle generated by conjugator objects",
[IsLeftQuasigroup and HasGeneratorsOfLeftQuasigroup and
IsConjugatorObjectCollection],
function(Q)
local gens, invgens;
# idea: ^g^-1: * ^h: = ^g: \ ^h:, so the generators of the quasigroup
# together with their inverses generate the quandle as a magma.
gens := GeneratorsOfLeftQuasigroup(Q);
invgens := Set(gens, g -> ConjugatorObj(Inverse(g![1])));
UniteSet(invgens, gens);
return invgens;
end);
2017-10-20 23:24:13 +00:00