Skip to content

Let Centralizer( U, g ) work if g is not contained in U#114

Merged
fingolfin merged 2 commits intogap-packages:masterfrom
stertooy:cent-intersect
Apr 8, 2026
Merged

Let Centralizer( U, g ) work if g is not contained in U#114
fingolfin merged 2 commits intogap-packages:masterfrom
stertooy:cent-intersect

Conversation

@stertooy
Copy link
Copy Markdown
Contributor

This supersedes #68, and is related to the discussion in #111.

The functionality is still limited because Intersection does not work in all cases, but it's still an improvement. This should also avoid relying on generic GAP methods that run forever for infinite groups.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.08%. Comparing base (7242fd6) to head (a74c1d3).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #114      +/-   ##
==========================================
+ Coverage   55.82%   56.08%   +0.25%     
==========================================
  Files          87       87              
  Lines       12678    12687       +9     
==========================================
+ Hits         7078     7115      +37     
+ Misses       5600     5572      -28     
Files with missing lines Coverage Δ
gap/pcpgrp/centcon.gi 88.48% <100.00%> (+8.15%) ⬆️

... and 3 files with indirect coverage changes

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

Comment thread tst/cent.tst
Comment on lines +3 to +9
#
gap> G := ExamplesOfSomePcpGroups( 5 );;
gap> H := Subgroup( G, [ G.1 ] );;
gap> C := Centralizer( H, G.2 );
Pcp-group with orders [ 0 ]
gap> C = Subgroup( G, [ G.4 ] );
true
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What specifically is this test testing? Perhaps the comment could indicate that? Or is it just arbitrary?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The goal was to test the calculation of a centralizer of a pair [ H, g ] with g not contained in H. I've added a comment and expanded the tests a bit.

Comment thread tst/cent.tst Outdated
Comment on lines +11 to +16
#
gap> G := PcGroupToPcpGroup( PcGroupCode( 520, 16 ) );;
gap> g := G.1*G.3*G.4;;
gap> H := Subgroup( G,[ G.2, G.3, G.4 ] );;
gap> Centralizer( H, g );
Pcp-group with orders [ 2, 2 ]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Similar question here. Since you moved it here and removed the comment, I assume this is no longer relying on the fallback. So... it's just testing a centralizer in a finite group?

By the way, both tests are element centralizers, not subgroup centralizers; maybe one for that case should also be added? (But it might be too much work, just wondering)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Since you moved it here and removed the comment, I assume this is no longer relying on the fallback. So... it's just testing a centralizer in a finite group?

It's indeed no longer relying on the fallback, but instead on Intersection. Similar to the other example, but for a finite group this time.

I've also added an example where we calculate Centralizer( H, K ) for two subgroups H and K.

@fingolfin fingolfin merged commit 1cb4185 into gap-packages:master Apr 8, 2026
7 checks passed
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.

2 participants