diff --git a/gap/byconj.gd b/gap/byconj.gd new file mode 100644 index 0000000..fbd9642 --- /dev/null +++ b/gap/byconj.gd @@ -0,0 +1,24 @@ +# byconj.gd RAQ Quandles by conjugation + +# The following outline of defining c + +DeclareCategory( "IsConjugatorObject", + IsMultiplicativeElement and IsLeftQuotientElement and + IsLDistributiveElement and IsIdempotent); +DeclareCategoryCollections("IsConjugatorObject"); + +DeclareAttribute("ConjugatorFamily", IsFamily); + +DeclareSynonym("IsDefaultConjugatorObject", + IsConjugatorObject and IsPositionalObjectOneSlotRep); + +DeclareAttribute("ConjugatorObj", + IsMultiplicativeElement and IsLeftQuotientElement and + IsRightQuotientElement + ); + +DeclareAttribute("UnderlyingMultiplicativeElement", IsConjugatorObject); + +# The meat of the matter: + +DeclareAttribute("ConjugationQuandle", IsGroup); diff --git a/gap/byconj.gi b/gap/byconj.gi new file mode 100644 index 0000000..c0f4069 --- /dev/null +++ b/gap/byconj.gi @@ -0,0 +1,79 @@ +# byconj.gi RAQ Implementation of quandles by conjugation + +InstallMethod(ConjugatorFamily, "for a family", + [IsFamily], + function(fam) + local F; + # Does GAP provide any way to get at the name of a family other than + # fam!.NAME ? + F := NewFamily(Concatenation("ConjugatorFamily(", fam!.NAME, ")"), + IsConjugatorObject); + F!.ConjType := NewType(F, IsDefaultConjugatorObject); + return F; +end); + +ConjugatorType@ := obj -> ConjugatorFamily(FamilyObj(obj))!.ConjType; + + +InstallMethod(ConjugatorObj, + "for a mult element that allows left quotients (and should be assoc)", + [IsMultiplicativeElement and IsLeftQuotientElement], + obj -> Objectify(ConjugatorType(Obj), Immutable(obj)) +); + +## 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] +); + +InstallMethod( \=, "for two conjugator objects", + IsIdenticalObj, + [IsDefaultConjugatorObject, IsDefaultConjugatorObject], + function(l,r) return l![1] = r![1]; end +); + +InstallMethod( \<, "for two conjugator objects", + IsIdenticalObj, + [IsDefaultConjugatorObject, IsDefaultConjugatorObject], + function(l,r) return l![1] < r![1]; end +); + +InstallMethod( \*, "for two conjugator objects", + IsIdenticalObj, + [IsDefaultConjugatorObject, IsDefaultConjugatorObject], + function(l,r) return LeftQuotient(l![1],r![1])*l![1]; end +); + +InstallMethod(LeftQuotient, "for two conjugator objects", + IsIdenticalObj, + [IsDefaultConjugatorObject,IsDefaultConjugatorObject], + function(l,r) return (l*r)/l; end +); + +InstallMethod("ConjugationQuandle", "for a group", + [IsGroup and IsFinite], + function(G) + local fam, elts; + fam := CollectionFamily(ConjugatorFamily(ElementsFamily(FamilyObj(G)))); + # Question: how do we easily/quickly determine a set of generators of + # Conj(G) from a set of generators of G, so that we can handle infinite + # conj-quandles here? + elts := List(Elements(G), g -> ConjugatorObj(g)); + # What we would like to do is + # return AsLeftQuandle[NC?](elts); + # but that's NIY. + return LeftQuandleNC(fam, elts); +end); + + diff --git a/init.g b/init.g index 67f3b53..0e8e1cb 100644 --- a/init.g +++ b/init.g @@ -7,5 +7,5 @@ ReadPackage("raq", "gap/structure.gd"); ReadPackage("raq", "gap/bytable.gd"); # Quandles by conjugation -#Readpackage("raq", "gap/byconj.gd"); +Readpackage("raq", "gap/byconj.gd"); diff --git a/read.g b/read.g index bee88fd..dee3b28 100644 --- a/read.g +++ b/read.g @@ -5,3 +5,6 @@ ReadPackage("raq", "gap/structure.gi"); # Quasigroups, racks, and quandles by multiplication tables ReadPackage("raq", "gap/bytable.gi"); + +# Quandles by conjugation +Readpackage("raq", "gap/byconj.gi");