Skip to content

Add deterministic property-based regression suite - #29

Draft
kaashif wants to merge 1 commit into
masterfrom
test/comprehensive-regression-suite
Draft

Add deterministic property-based regression suite#29
kaashif wants to merge 1 commit into
masterfrom
test/comprehensive-regression-suite

Conversation

@kaashif

@kaashif kaashif commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add 94 deterministic invariant assertions across decomposition, centralizer, isomorphism, tensor, BSGS, unitarization, and permutation workflows
  • retain the AutoDoc examples while documenting the literature-derived test strategy
  • fix centralizer coordinate conversion, duplicate-vector orthonormality, permutation canonical decomposition, and trivial-group BSGS behavior exposed by the new tests

Literature basis

The suite follows certification and use-case invariants discussed in RepnDecomp, RepLAB, symmetry-reduced SDP, certified decomposition, and symmetric-group decomposition literature. Links and the mapping to tested properties are documented in tst/README.md.

Verification

  • gap -q tst/testall.g
  • gap -A -q tst/testall.g
  • gap -q < makedoc.g
  • git diff --check

Both test modes pass 11 files with zero failures.

@kaashif
kaashif marked this pull request as draft August 19, 2026 22:53
Comment thread lib/centralizer.gi
Comment on lines +106 to +109
# The standard block generators commute with the block-diagonalized
# representation. Conjugate them back so that this function returns the
# centralizer in the coordinates of the representation supplied by the
# caller.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is a breaking change. Maybe no-one is using this and it's fine. It certainly makes more sense to use the original coordinates though.

Comment thread lib/groupsum.gi
InstallGlobalFunction( GroupSumBSGS, function(G, summand)
local H, n, chain, groups, m, sum, i, cosets, iso, zero, g, S, right_reps;

if IsTrivial(G) then

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I mean sure but this is never going to happen...

@codecov

codecov Bot commented Aug 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.23810% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 66.95%. Comparing base (49bc63b) to head (6343bed).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
lib/serre.gi 80.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master      #29       +/-   ##
===========================================
+ Coverage   54.39%   66.95%   +12.56%     
===========================================
  Files          25       25               
  Lines        1355     1368       +13     
===========================================
+ Hits          737      916      +179     
+ Misses        618      452      -166     
Files with missing lines Coverage Δ
lib/centralizer.gi 85.93% <100.00%> (+1.19%) ⬆️
lib/groupsum.gi 100.00% <100.00%> (ø)
lib/utils.gi 93.08% <100.00%> (+25.99%) ⬆️
lib/serre.gi 92.03% <80.00%> (+10.50%) ⬆️

... and 6 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 lib/serre.gi
# All projector calculations below act on vectors by matrices. Preserve
# the public convenience of accepting permutation representations by
# converting once and then consistently using the linear representation.
rho := ConvertRhoIfNeeded@(rho);

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

naming of the function should be improved - convert permutation to matrix representation would be better

Comment thread lib/utils.gi

InstallGlobalFunction( IsOrthonormalSet, function(S, prod)
return ForAll(S, v1 -> ForAll(S, function(v2)
if v1 = v2 then

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

You know this actually isn't even a bug necessarily, it just assumes that S is really a set and can't contain duplicates. But if it's a list of 2 of the same vector, it'll come out orthonormal even though two of the same vector are obviously not orthonormal - this is because we compare v1 = v2

GAP must have a Set type or something. Using indexes works better as a solution anyway.

More and stronger types are needed!

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