Skip to content

Commit 21b5032

Browse files
authored
Faster high-level Meataxe functions for irreducible modules (e.g. MTX.IsomorphismModules, MTX.Indecomposition, MTX.BasisModuleEndomorphisms, MTX.BasisModuleHomomorphisms) (#6276)
Several high-level Meataxe functions were much, much slower for irreducible modules than their low-level counterparts (the ones which *only* work for irreducible modules). As an example, consider this test input: n:=10;; # increase this to make the effect even stronger G:=GL(56,GF(25));; H:=Subgroup(G, Concatenation(GeneratorsOfGroup(G),List([1..n],i->PseudoRandom(G))));; Then before these changes, we had: gap> MTX.Indecomposition(NaturalGModule(H));; time; 1818 gap> MTX.IsomorphismModules(NaturalGModule(H),NaturalGModule(H));; time; 5408 After these changes: gap> MTX.Indecomposition(NaturalGModule(H));; time; 22 gap> MTX.IsomorphismModules(NaturalGModule(H),NaturalGModule(H));; time; 23 To some extent this papers over a deeper issue: the general code in MTX.Indecomposition and MTX.BasisModuleEndomorphisms ought to be way faster: it is trivial to take the example here and e.g. form a direct sum of modules to make it slow again.
1 parent 4a308b8 commit 21b5032

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

lib/meatauto.gi

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1320,6 +1320,10 @@ local n, hc1, hc2, nc, b1, b2, map, remain, j, found, hom, i, k;
13201320
Length(SMTX.BasisEndomorphismsRadical(M2)) ) then
13211321
# different endomorphism algebra dimensions
13221322
return fail;
1323+
elif MTX.IsIrreducible(M1) and MTX.IsIrreducible(M2) then
1324+
return MTX.IsomorphismIrred(M1, M2);
1325+
elif MTX.IsIrreducible(M1) <> MTX.IsIrreducible(M2) then
1326+
return fail;
13231327
fi;
13241328

13251329
hc1:=SMTX.HomogeneousComponents(M1);
@@ -1637,7 +1641,9 @@ end;
16371641
SMTX.BasisModuleHomomorphisms:=function(m1,m2)
16381642
local b;
16391643
TestModulesFitTogether(m1,m2);
1640-
if m1.dimension>5 then
1644+
if MTX.IsIrreducible(m1) then
1645+
b:=MTX.Homomorphisms(m1,m2);
1646+
elif m1.dimension>5 then
16411647
b:= SpinHom(m1,m2);
16421648
Assert(1,Length(b)=Length(SmalldimHomomorphismsModules(m1,m2)));
16431649
else
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Handling of irreducible Meataxe modules with lots of generators was far
2+
# slower than necessary at least via the "high level" Meataxe APIs.
3+
# See also <https://github.com/gap-system/gap/issues/6271>.
4+
#
5+
# The main test here is for performance: before the fix for issue #6271 this
6+
# would have run for minutes, with the fix it should take far less than a
7+
# second on a modern computer.
8+
gap> n:=200;; # increase this to make the effect even stronger
9+
gap> G:=GL(56,GF(25));;
10+
gap> H:=Subgroup(G, Concatenation(GeneratorsOfGroup(G),List([1..n],i->PseudoRandom(G))));;
11+
gap> MTX.IsomorphismModules(NaturalGModule(H), NaturalGModule(H)) <> fail;
12+
true

0 commit comments

Comments
 (0)