Skip to content

Fix bugs in NormalizerPcpGroup#124

Open
stertooy wants to merge 5 commits into
gap-packages:masterfrom
stertooy:fix-norm
Open

Fix bugs in NormalizerPcpGroup#124
stertooy wants to merge 5 commits into
gap-packages:masterfrom
stertooy:fix-norm

Conversation

@stertooy

Copy link
Copy Markdown
Contributor

Resolves #122.

It seems there are two separate bugs at play here: one bug affects this function when USE_CANONICAL_PCS@ is true, and another one affects it when the debug variable is false.

In the former case, it seems cc.sol is not always zero, so it must be subtracted.

In the latter case, the assumption in VectorByComplement, i;e. that "igs and fac fit together", is wrong. We can resolve this by calculating a suitable igs ourselves, though this is slower.

I tested this PR with the following code (based on one of the tests in bugfix.tst). It tries 2000 pairs of groups `G

CHECK_NORM@Polycyclic := true;
P2:=SylowSubgroup(GL(IsPermGroup,7,2),2);;
iso := IsomorphismPcpGroup(P2);;
G:=Image(iso);;
for i in [1..2000] do
    Print("RUN ",i,"\n");
    k := Random([2..4]);
    l := Random([1..3]);
    H := SubgroupNC( G, List([1..k],i -> Random(G)));
    V := SubgroupNC( H, List([1..l],j -> Random(H)));
    M := NormalizerPcpGroup( H, V );
    Hpre := PreImage( iso, H );
    Vpre := PreImage( iso, V );
    Mpre := Normalizer( Hpre, Vpre );
    check := Image( iso, Mpre ) = M;
    if not check then
        Error("NORMALISER WRONG");
    fi;
od;

On the current master branch, testing this with USE_CANONICAL_PCS@ set to true usually causes an error within the first 100-ish normalisers. With USE_CANONICAL_PCS@ set to false, usually within the first 20.

With this PR, both true and false passed all 2000 tests.

@fingolfin

Copy link
Copy Markdown
Member

Should get a changelog entry

@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.44%. Comparing base (86cd79f) to head (564227e).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #124      +/-   ##
==========================================
+ Coverage   56.39%   56.44%   +0.04%     
==========================================
  Files          87       87              
  Lines       12697    12703       +6     
==========================================
+ Hits         7161     7170       +9     
+ Misses       5536     5533       -3     
Files with missing lines Coverage Δ
gap/pcpgrp/normcon.gi 85.05% <100.00%> (+0.47%) ⬆️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@stertooy

Copy link
Copy Markdown
Contributor Author

Changelog entry added, and I improved the tests a bit.

It's going to give a merge conflict with #121 of course, I'll tackle that when it happens :)

@stertooy stertooy mentioned this pull request Jul 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error in NormalizerPcpGroup

2 participants