rotate element names, helps keep structures separate
This commit is contained in:
parent
6db132346d
commit
4d6be4a083
@ -39,13 +39,32 @@ end);
|
||||
|
||||
## And now create them from multiplication tables
|
||||
|
||||
#First a helper function
|
||||
# First a helper function
|
||||
MagmaNumber@ := 1;
|
||||
MagmaLetters@ := "ABCDEFGHJKMNPSTUV";
|
||||
MagmaBase@ := Length(magmaLetters@);
|
||||
NextMagmaString@ := function(filts)
|
||||
local str, n;
|
||||
str := "l";
|
||||
if filts <> (filts and IsLeftQuotientElement) then
|
||||
str := "r";
|
||||
fi;
|
||||
n := MagmaNumber@;
|
||||
MagmaNumber@ := MagmaNumber@ + 1;
|
||||
while n > 0 do
|
||||
Add(str, MagmaLetters[RemInt(n, MagmaBase@) + 1]);
|
||||
n := QuoInt(n, MagmaBase@);
|
||||
od;
|
||||
return str;
|
||||
end;
|
||||
|
||||
FiniteMagmaCreator@ := function(tbl, cnstr, filts)
|
||||
local M;
|
||||
M := MagmaByMultiplicationTableCreatorNC(
|
||||
tbl, cnstr, filts and IsMagmaByMultiplicationTableObj);
|
||||
# Is there such a thing as a non-finite table in GAP? Anyhow...
|
||||
SetIsFinite(ElementsFamily(FamilyObj(M)), IsFinite(tbl));
|
||||
SpecifyElmNamePrefix(M, NextMagmaString@(filts));
|
||||
return M;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user