From d7f394f95789b7f5fb82dd299fc6a4169680b39b Mon Sep 17 00:00:00 2001 From: Glen Whitney Date: Wed, 12 Sep 2018 08:34:44 -0400 Subject: [PATCH] Correct the TrueMethods: elt must be associate and have inverses to have quotients --- gap/quasigroups.gd | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/gap/quasigroups.gd b/gap/quasigroups.gd index 973f654..1eec631 100644 --- a/gap/quasigroups.gd +++ b/gap/quasigroups.gd @@ -19,11 +19,14 @@ DeclareCategory( "IsRightQuotientElement", IsExtLElement); DeclareCategoryCollections("IsRightQuotientElement"); DeclareCategoryCollections("IsRightQuotientElementCollection"); -## Every element with an inverse can form right quotients +## Every associative element with an inverse can form right quotients ## (in fact, in some sense it might be enough to have just a left inverse, ## but there doesn't seem to be any benefit to delving to that level of ## detail at this point.) -InstallTrueMethod(IsRightQuotientElement, IsMultiplicativeElementWithInverse); +## By noting this property, we can create a RightQuasigroup from, e.g., group +## elements +InstallTrueMethod(IsRightQuotientElement, + IsMultiplicativeElementWithInverse and IsAssociativeElement); ## Now what we would like to do is re-declare ## DeclareOperation( "/", [IsExtRElement, IsRightQuotientElement] ); @@ -37,8 +40,9 @@ DeclareCategory( "IsLeftQuotientElement", IsExtRElement); DeclareCategoryCollections("IsLeftQuotientElement"); DeclareCategoryCollections("IsLeftQuotientElementCollection"); -## Every element with an inverse can form left quotients -InstallTrueMethod(IsLeftQuotientElement, IsMultiplicativeElementWithInverse); +## Every associative element with an inverse can form left quotients +InstallTrueMethod(IsLeftQuotientElement, + IsMultiplicativeElementWithInverse and IsAssociativeElement); ## Again, ideally (in some sense) we'd like to redeclare ## DeclareOperation("LeftQuotient", [IsLeftQuotientElement,IsExtLElement]); @@ -60,10 +64,28 @@ DeclareRepresentation( "IsLoopElmRep", DeclareCategory("IsRightQuasigroup", IsMagma and IsRightQuotientElementCollection); +## Although the following assertion is mathematically correct, unfortunately +## it interferes with method selection for standard group operations +## in GAP. As an example, if it is uncommented, it will no longer be possible +## to construct a CyclicGroup; trying to do so eventually dies in +## GeneratorsOfRightQuasigroup. Those errors could conceivably be corrected by +## delving further into GAP's method selection mechanism and adjusting the +## declarations of various quasigroup operations, but it doesn't seem worth +## the effort as there is unlikely to be much call to consider a group as a +## quasigroup. If it is desirable to do so in a particular case, it should be +## possible to use the elements of the group to form a quasigroup, since they +## will all satisfy IsRightQuotientElement by a TrueMethod installed above. + +## InstallTrueMethod(IsRightQuasigroup, IsGroup); + ## Left quasigroup DeclareCategory("IsLeftQuasigroup", IsMagma and IsLeftQuotientElementCollection); +## We forego the following for the reasons outlined above for right quasigroups. + +## InstallTrueMethod(IsLeftQuasigroup, IsGroup); + ## quasigroup DeclareSynonym( "IsQuasigroup", IsRightQuasigroup and IsLeftQuasigroup );