give up on cataloguing all properties we expect elements might have, it's just too many

This commit is contained in:
Glen Whitney 2017-10-23 03:09:38 +02:00
parent 2d0e6740ba
commit 030ed9d114

View File

@ -306,54 +306,37 @@ InstallMethod(ViewString, "for a right quasigroup with generators",
## Opposite structures
OFDir@ := NewDictionary("strings", true);
# What property does the Opposite family have for each property of the
# underlying elements? (or fail if there is no implied property)
# underlying elements? Hopefully we have gotten all of the relevant
# properties. What we really want is the implied (and maybe the required)
# properties of the family of the elements that we are taking the Opposite of,
# but there is not any documented way of obtaining those.
AddDictionary(OFDir@, "CanEasilyCompareElements", CanEasilyCompareElements);
AddDictionary(OFDir@, "CanEasilySortElements", CanEasilySortElements);
AddDictionary(OFDir@, "IsAdditiveElement", fail);
AddDictionary(OFDir@, "IsAdditivelyCommutativeElement", fail);
AddDictionary(OFDir@, "IsAssociativeElement", IsAssociativeElement);
AddDictionary(OFDir@, "IsCommutativeElement", IsCommutativeElement);
AddDictionary(OFDir@, "IsCyc", fail);
AddDictionary(OFDir@, "IsCyclotomic", fail);
AddDictionary(OFDir@, "IsExtAElement", fail);
AddDictionary(OFDir@, "IsExtLElement", IsExtRElement);
AddDictionary(OFDir@, "IsExtRElement", IsExtLElement);
AddDictionary(OFDir@, "IsFiniteOrderElement", IsFiniteOrderElement);
AddDictionary(OFDir@, "IsInt", fail);
AddDictionary(OFDir@, "IsLeftQuotientElement", IsRightQuotientElement);
AddDictionary(OFDir@, "IsList", fail);
AddDictionary(OFDir@, "IsLSelfDistElement", IsRSelfDistElement);
AddDictionary(OFDir@, "IsMultiplicativeElement", fail);
AddDictionary(OFDir@, "IsMultiplicativeElementWithInverse",
IsMultiplicativeElementWithInverse);
AddDictionary(OFDir@, "IsMultiplicativeElementWithOne",
IsMultiplicativeElementWithOne);
AddDictionary(OFDir@, "IsNearAdditiveElement", fail);
AddDictionary(OFDir@, "IsNearAdditiveElementWithInverse", fail);
AddDictionary(OFDir@, "IsNearAdditiveElementWithZero", fail);
AddDictionary(OFDir@, "IsPerm", fail);
AddDictionary(OFDir@, "IsPosRat", fail);
AddDictionary(OFDir@, "IsRat", fail);
AddDictionary(OFDir@, "IsRightQuotientElement", IsLeftQuotientElement);
AddDictionary(OFDir@, "IsRSelfDistElement", IsLSelfDistElement);
AddDictionary(OFDir@, "IsZDFRE", fail);
InstallMethod(OppositeFamily, "for a family",
[IsFamily],
function(fam)
local F, elt, elt_props, opp_props, prop, filt, opp_filt;
local F, elt, elt_props, opp_props, prop, opp_filt;
elt := Representative(fam);
elt_props := CategoriesOfObject(elt);
Append(elt_props, KnownTruePropertiesOfObject(elt));
opp_props := [];
for prop in elt_props do
if KnowsDictionary(OFDir@, prop) then
filt := LookupDictionary(OFDir@, prop);
if filt <> fail then Add(opp_props, filt); fi;
else
Info(InfoRAQ, 0,
"Note: RAQ unfamiliar with element property ", prop,
", ignoring.");
Add(opp_props, LookupDictionary(OFDir@, prop);
fi;
od;
opp_filt := IsMultiplicativeElement;