Skip to content

Faster high-level Meataxe functions for irreducible modules (e.g. MTX.IsomorphismModules, MTX.Indecomposition, MTX.BasisModuleEndomorphisms, MTX.BasisModuleHomomorphisms)#6276

Merged
fingolfin merged 2 commits intomasterfrom
mh/meataxe-irred-faster
Mar 23, 2026

Conversation

@fingolfin
Copy link
Copy Markdown
Member

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. But this is out of scope for this PR (and to an extent a known issue).

Resolves #6271

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.
@fingolfin fingolfin requested a review from ThomasBreuer March 23, 2026 10:48
@fingolfin fingolfin added kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements topic: performance bugs or enhancements related to performance (improvements or regressions) topic: library release notes: use title For PRs: the title of this PR is suitable for direct use in the release notes labels Mar 23, 2026
@fingolfin fingolfin changed the title Faster high-level Meataxe functions for irreducible modules Faster high-level Meataxe functions for irreducible modules (e.g. MTX.IsomorphismModules, MTX.Indecomposition, MTX.BasisModuleEndomorphisms, MTX.BasisModuleHomomorphisms) Mar 23, 2026
Copy link
Copy Markdown
Contributor

@ThomasBreuer ThomasBreuer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.
Thanks.

Co-authored-by: Thomas Breuer <sam@math.rwth-aachen.de>
@fingolfin fingolfin enabled auto-merge (squash) March 23, 2026 19:13
@fingolfin fingolfin merged commit 21b5032 into master Mar 23, 2026
32 checks passed
@fingolfin fingolfin deleted the mh/meataxe-irred-faster branch March 23, 2026 20:42
fingolfin added a commit to gap-packages/ClassicalMaximals that referenced this pull request Mar 30, 2026
This started to fail since gap-system/gap#6276

But I tripled check everything there: the GAP change is fine, it
just happens to return a different isomorphism which is not
symmetric (however, it is symmetrizable). We could try to fix this
properly, but since the underlying module is also not absolutely
irreducible, it is not clear whether this test is even meaningful.
So just disabling it seems fine.
fingolfin added a commit to gap-packages/ClassicalMaximals that referenced this pull request Mar 30, 2026
This started to fail since gap-system/gap#6276

But I tripled check everything there: the GAP change is fine, it
just happens to return a different isomorphism which is not
symmetric (however, it is symmetrizable). We could try to fix this
properly, but since the underlying module is also not absolutely
irreducible, it is not clear whether this test is even meaningful.
So just disabling it seems fine.
cdwensley pushed a commit to cdwensley/gap that referenced this pull request Apr 1, 2026
…X.IsomorphismModules`, `MTX.Indecomposition`, `MTX.BasisModuleEndomorphisms`, `MTX.BasisModuleHomomorphisms`) (gap-system#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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements release notes: use title For PRs: the title of this PR is suitable for direct use in the release notes topic: library topic: performance bugs or enhancements related to performance (improvements or regressions)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Meataxe: should MTX.IsomorphismModules automatically delegate to MTX.IsomorphismIrred if appropriate?

3 participants