Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make GroupWithMemory behave more like Group, and e.g. make the wrapped generators immutable, and for matrices try to convert them to a better representation #5480

Merged
merged 1 commit into from
Aug 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions lib/memory.gi
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,14 @@

InstallGlobalFunction( GroupWithMemory,
function(gens)
# gens a list of generators
# gens a list of generators or a group
local g,memgens;
if IsGroup(gens) then
memgens := GeneratorsWithMemory(GeneratorsOfGroup(gens));
else
memgens := GeneratorsWithMemory(gens);
if not IsGroup(gens) then

Check warning on line 128 in lib/memory.gi

View check run for this annotation

Codecov / codecov/patch

lib/memory.gi#L128

Added line #L128 was not covered by tests
# trick: ensure all transformations that GroupWithGenerators applies
# to the generators are applied here, too
gens := GroupWithGenerators(gens);

Check warning on line 131 in lib/memory.gi

View check run for this annotation

Codecov / codecov/patch

lib/memory.gi#L131

Added line #L131 was not covered by tests
fi;
memgens := GeneratorsWithMemory(GeneratorsOfGroup(gens));

Check warning on line 133 in lib/memory.gi

View check run for this annotation

Codecov / codecov/patch

lib/memory.gi#L133

Added line #L133 was not covered by tests
g := GroupWithGenerators(memgens);
return g;
end);
Expand Down
2 changes: 1 addition & 1 deletion tst/testinstall/memory.tst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#@local G, H, g, h, tmp, stabChain, s1, s2
gap> G := GroupWithMemory(GroupByGenerators([ (1,2,3,4,5), (1,2) ]));;
gap> G := GroupWithMemory([ (1,2,3,4,5), (1,2) ]);;
gap> H := GroupWithMemory(GL(IsMatrixGroup, 3, 3));;
gap> g := H.1 ^ 2;; h := H.2 ^ 2;;
gap> StripMemory(g);
Expand Down