Skip to content

Fix PossibleClassicalForms for nonzero traces - #88

Open
fingolfin wants to merge 2 commits into
masterfrom
fix-possible-classical-forms
Open

fingolfin wants to merge 2 commits into
masterfrom
fix-possible-classical-forms

Conversation

@fingolfin

Copy link
Copy Markdown
Member

When both trace(g) and trace(g^-1) were nonzero the function returned early without testing the coefficient identities, so it never ruled out a form. Over a large field almost every element has nonzero trace, which left recog's classical recognition of SL(6,257) undecided about half the time (see gap-packages/recog#492).

Nonzero traces determine the scalar lambda relating g^-1 to g directly, so use it in the existing coefficient test instead of returning.

Co-Authored-By: Claude Fable 5.1 noreply@anthropic.com

When both trace(g) and trace(g^-1) were nonzero the function
returned early without testing the coefficient identities, so it
never ruled out a form. Over a large field almost every element
has nonzero trace, which left recog's classical recognition of
SL(6,257) undecided about half the time (recog issue #492).

Nonzero traces determine the scalar lambda relating g^-1 to g
directly, so use it in the existing coefficient test instead of
returning.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@codecov

codecov Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.79%. Comparing base (4532e07) to head (11b885a).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
lib/recognition.gi 80.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #88      +/-   ##
==========================================
+ Coverage   80.40%   81.79%   +1.38%     
==========================================
  Files           8        8              
  Lines        3670     3669       -1     
==========================================
+ Hits         2951     3001      +50     
+ Misses        719      668      -51     
Files with missing lines Coverage Δ
lib/recognition.gi 56.03% <80.00%> (+10.87%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread lib/recognition.gi
Comment on lines -715 to -717
if not IsZero(tM) and not IsZero(tMi) then
return [i0, tM/tMi];
fi;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is the most important bit which previously prevented us from ruling out forms in many cases.

@fingolfin

Copy link
Copy Markdown
Member Author

@jdebeule I'd like to merge this and make a release this week so we can get this into GAP 4.17.0, is that OK?

I discussed it thoroughly with @aniemeyer (who is sitting next to me right now), and this function is not used by forms itself, only by recog; and is not even documented in the forms manual.

The fix is important because before we failed to rule out the presence of non-trivial forms for e.g. SL(6,257) about 50% of the time.

I think future recog versions will not use this anymore, it's easier to just copy this code to recog; but for the sake of already released recog versions, it'd be good to fix it here (and leave it in here for the foreseeable future, the copy in recog will have a different name).

This branch has not been deployed

No deployments
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.

1 participant