2017-10-20 09:08:09 +00:00
|
|
|
## structure.gd RAQ Definitions, generation, and elementary ops and props.
|
2017-10-18 10:46:13 +00:00
|
|
|
|
|
|
|
## GAP Categories and representations
|
|
|
|
|
2017-10-22 16:23:45 +00:00
|
|
|
## Info class for RAQ
|
|
|
|
DeclareInfoClass("InfoRAQ");
|
|
|
|
|
2017-10-18 10:46:13 +00:00
|
|
|
## Self-distributivity
|
2017-10-20 09:08:09 +00:00
|
|
|
# Note these are properties that can and therefore should be defined just at
|
|
|
|
# the level of MultiplicativeElements and Magmas, hence although the LOOPS
|
|
|
|
# package defines IsLDistributive and IsRDistributive for quasigroups, they
|
|
|
|
# would be ambiguous in the case of something like a semiring whose
|
|
|
|
# multiplicative structure was a quasigroup
|
|
|
|
# (cf. https://arxiv.org/abs/0910.4760). Hence, we implement them in RAQ with
|
|
|
|
# new, non-conflicting terms.
|
2017-10-18 10:46:13 +00:00
|
|
|
|
|
|
|
# An element that knows that multiplication in its family is left
|
|
|
|
# self-distributive:
|
|
|
|
DeclareCategory("IsLSelfDistElement", IsMultiplicativeElement);
|
|
|
|
DeclareCategoryCollections("IsLSelfDistElement");
|
|
|
|
|
|
|
|
# An element that knows that multiplication in its family is right
|
|
|
|
# self-distributive:
|
|
|
|
DeclareCategory("IsRSelfDistElement", IsMultiplicativeElement);
|
|
|
|
DeclareCategoryCollections("IsRSelfDistElement");
|
|
|
|
|
2017-10-20 13:25:22 +00:00
|
|
|
# Left self-distributive collections of elements:
|
|
|
|
DeclareProperty("IsLSelfDistributive", IsMultiplicativeElementCollection);
|
|
|
|
InstallTrueMethod(IsLSelfDistributive, IsLSelfDistElementCollection);
|
2017-10-18 10:46:13 +00:00
|
|
|
|
2017-10-20 13:25:22 +00:00
|
|
|
# Right self-distributive collections of elements:
|
|
|
|
DeclareProperty("IsRSelfDistributive", IsMultiplicativeElementCollection);
|
|
|
|
InstallTrueMethod(IsRSelfDistributive, IsRSelfDistElementCollection);
|
2017-10-18 10:46:13 +00:00
|
|
|
|
2017-10-20 09:08:09 +00:00
|
|
|
## Idempotence
|
|
|
|
# There is already a property IsIdempotent on elements, but to definw
|
|
|
|
# structures which will automatically be quandles we need a corresponding
|
|
|
|
# collections category:
|
|
|
|
DeclareCategoryCollections("IsIdempotent");
|
|
|
|
|
2017-10-20 13:25:22 +00:00
|
|
|
# Collections in which every element is idempotent
|
|
|
|
DeclareProperty("IsElementwiseIdempotent", IsMultiplicativeElementCollection);
|
|
|
|
InstallTrueMethod(IsElementwiseIdempotent, IsIdempotentCollection);
|
2017-10-20 09:08:09 +00:00
|
|
|
|
|
|
|
## Left and right racks and quandles
|
2017-10-18 10:46:13 +00:00
|
|
|
DeclareSynonym("IsLeftRack", IsLeftQuasigroup and IsLSelfDistributive);
|
|
|
|
DeclareSynonym("IsRightRack", IsRightQuasigroup and IsRSelfDistributive);
|
|
|
|
|
2017-10-20 09:08:09 +00:00
|
|
|
DeclareSynonym("IsLeftQuandle", IsLeftRack and IsElementwiseIdempotent);
|
2017-10-20 13:48:34 +00:00
|
|
|
DeclareSynonym("IsRightQuandle", IsRightRack and IsElementwiseIdempotent);
|
2017-10-20 09:08:09 +00:00
|
|
|
|
|
|
|
## One-sided quasigroups and racks and quandles by generators
|
2017-10-18 10:46:13 +00:00
|
|
|
|
|
|
|
# Returns the closure of <gens> under * and LeftQuotient;
|
|
|
|
# the family of elements of M may be specified, and must be if <gens>
|
|
|
|
# is empty (in which case M will be empty as well).
|
|
|
|
DeclareGlobalFunction("LeftQuasigroup");
|
2017-10-20 13:25:22 +00:00
|
|
|
DeclareGlobalFunction("LeftQuasigroupNC");
|
2017-10-18 10:46:13 +00:00
|
|
|
DeclareGlobalFunction("RightQuasigroup");
|
2017-10-20 13:25:22 +00:00
|
|
|
DeclareGlobalFunction("RightQuasigroupNC");
|
2017-10-18 10:46:13 +00:00
|
|
|
DeclareGlobalFunction("LeftRack");
|
2017-10-20 13:25:22 +00:00
|
|
|
DeclareGlobalFunction("LeftRackNC");
|
2017-10-18 10:46:13 +00:00
|
|
|
DeclareGlobalFunction("RightRack");
|
2017-10-20 13:25:22 +00:00
|
|
|
DeclareGlobalFunction("RightRackNC");
|
2017-10-20 09:08:09 +00:00
|
|
|
DeclareGlobalFunction("LeftQuandle");
|
2017-10-20 13:25:22 +00:00
|
|
|
DeclareGlobalFunction("LeftQuandleNC");
|
2017-10-20 09:08:09 +00:00
|
|
|
DeclareGlobalFunction("RightQuandle");
|
2017-10-20 13:25:22 +00:00
|
|
|
DeclareGlobalFunction("RightQuandleNC");
|
2017-10-18 10:46:13 +00:00
|
|
|
|
|
|
|
# Underlying operation
|
2017-10-18 11:19:57 +00:00
|
|
|
DeclareGlobalFunction("CloneOfTypeByGenerators");
|
2017-10-18 10:46:13 +00:00
|
|
|
|
2017-10-22 16:23:45 +00:00
|
|
|
## Opposite structures
|
|
|
|
DeclareCategory("IsOppositeObject", IsMultiplicativeElement);
|
|
|
|
DeclareCategoryCollections("IsOppositeObject");
|
|
|
|
DeclareAttribute("OppositeFamily", IsFamily);
|
|
|
|
DeclareAttribute("OppositeType", IsFamily);
|
|
|
|
DeclareSynonym("IsDefaultOppositeObject",
|
|
|
|
IsOppositeObject and IsPositionalObjectOneSlotRep);
|
|
|
|
DeclareAttribute("OppositeObj", IsMultiplicativeElement);
|
|
|
|
DeclareAttribute("UnderlyingMultiplicativeElement", IsOppositeObject);
|
|
|
|
|
2017-10-18 10:46:13 +00:00
|
|
|
# Attributes for the generators
|
|
|
|
|
|
|
|
# Generates the structure by \* and LeftQuotient. Note that for finite
|
|
|
|
# structures, these are the same as the GeneratorsOfMagma but in general more
|
|
|
|
# elements might be required to generate the structure just under *
|
|
|
|
DeclareAttribute("GeneratorsOfLeftQuasigroup", IsLeftQuasigroup);
|
|
|
|
|
|
|
|
# Generates the structure by \* and \/, same considerations as above
|
|
|
|
DeclareAttribute("GeneratorsOfRightQuasigroup", IsRightQuasigroup);
|
2017-10-29 03:48:35 +00:00
|
|
|
|
|
|
|
## Conversions into quasigroup/rack/quandle
|
|
|
|
DeclareAttribute("AsLeftQuasigroup", IsCollection);
|
|
|
|
DeclareAttribute("AsLeftRack", IsCollection);
|
|
|
|
DeclareAttribute("AsLeftQuandle", IsCollection);
|
|
|
|
DeclareAttribute("AsRightQuasigroup", IsCollection);
|
|
|
|
DeclareAttribute("AsRightRack", IsCollection);
|
|
|
|
DeclareAttribute("AsRightQuandle", IsCollection);
|