Skip to content

Write the k-subset actions of Alt(n) and Sym(n) as calls - #85

Open
fingolfin wants to merge 3 commits into
masterfrom
mh/ksubsets
Open

Write the k-subset actions of Alt(n) and Sym(n) as calls#85
fingolfin wants to merge 3 commits into
masterfrom
mh/ksubsets

Conversation

@fingolfin

Copy link
Copy Markdown
Member

PGAltOnSets(n,k) and PGSymOnSets(n,k) return a whole PRIMGRP entry. The order, the transitivity, the socle, the name and the suborbits all follow from n and k, so nothing is stored but the call. The suborbits are the subdegrees of the Johnson scheme: the stabiliser of a k-set S has one orbit for each i, holding the k-sets that agree with S in all but i of its points. At n = 45, k = 2 that replaces a 56-digit order and the pair 86, 903 written out beside it.

Field 9 becomes ["sets", <inner>, <k>], where <inner> describes the group being acted with rather than being it. A family with a different inner group, such as PSL(2,q) on the 2-subsets of the projective line, then needs a case in PRIMGRP_InnerGroup and not a form of its own. PGOnSetsGroup checks that the inner group really is k-homogeneous rather than assuming it, since otherwise the degree would silently be wrong, and sorts the orbit before acting on it, since Orbit promises no order and which permutation group comes out depends on it.

All 258 such entries are converted. data/ falls by 2.3 MB.

Two fields change besides field 9, and both are declared:

  • 72 entries are renamed. Three conventions were in the data at once: A(n) up to degree 50, Alt(n) above it, and no name at all for the 58 entries past degree 2555. They collapse to A(n) and S(n), which is what PrimitiveGroup already displayed for the natural actions.
  • 162 have their suborbits sorted. They were held in whatever order the generators produced them; field 5 is compared as a set at its one use in PrimitiveIdentification, so the order carries no information.

Everything else is unchanged: fields 1 to 8 of all 24558 entries were dumped before and after and compared. Which of the two constructors an entry is was decided by evaluating both and comparing, then by building the group and measuring its degree, order, primitivity, transitivity and suborbits, because field 9 stops holding permutations and the group afterwards is a different conjugate.

Co-Authored-By: Claude Opus 5 noreply@anthropic.com


As before, this PR has three commits: one which adds scripts for doing the conversion, one which applies them, one which drops the scripts again (I've retained a local copy of those scripts so we can re-use them for the order 8191 import)

fingolfin and others added 3 commits August 31, 2026 09:12
PGAltOnSets(n,k) and PGSymOnSets(n,k) are whole entries: the order, the Johnson
suborbits Binomial(k,i)*Binomial(n-k,i), the transitivity, the name and the
socle all follow from n and k, so the entry is the call.  At n = 45, k = 2 that
replaces a 56-digit order and the pair 86, 903 spelled out beside it.

Field 9 is ["sets", inner, k], where inner names a construction rather than
being one, so that PSL(2,q) on the 2-subsets of the projective line needs a
case in PRIMGRP_InnerGroup rather than a form of its own.  PGOnSetsGroup checks
that the inner group really is k-homogeneous instead of assuming it, since
otherwise the degree would silently be wrong, and sorts the orbit before acting
on it, since Orbit promises no order and which group comes out depends on it.

dev/convert-ksets.g decides which of the two a given entry is by evaluating
both and comparing, and then builds the group and measures it, because field 9
stops holding permutations and the group afterwards is a different conjugate.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
All 258 of them, degrees 10 to 4095, converted by dev/convert-ksets.g:

    gap -q -b -A --quitonbreak -l "ROOT;" -c 'conv_dir:="data";;' \
        dev/convert-ksets.g

data/ falls from 16.97 MB to 14.65 MB.  None was left behind.

196 entries change, and only in two fields, which was checked by dumping fields
1 to 8 of all 24558 entries before and after and comparing them field by field.

162 have their suborbits sorted.  They were held in whatever order the
generators produced them; field 5 is compared as a set at its one use in
PrimitiveIdentification, so the order carries no information.

244 are renamed.  Three conventions were in use at once -- "A(n)" up to degree
50, "Alt(n)" above it, and no name at all for the 58 entries past degree 2555 --
and they collapse to the first, which is what the natural alternating and
symmetric groups have always shown.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Sep 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.12%. Comparing base (5deb588) to head (e18de68).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #85      +/-   ##
==========================================
+ Coverage   99.11%   99.12%   +0.01%     
==========================================
  Files          46       46              
  Lines       38323    38360      +37     
==========================================
+ Hits        37984    38025      +41     
+ Misses        339      335       -4     
Files with missing lines Coverage Δ
data/gps1.g 100.00% <100.00%> (ø)
data/gps10.g 100.00% <100.00%> (ø)
data/gps11.g 100.00% <100.00%> (ø)
data/gps12.g 100.00% <ø> (ø)
data/gps14.g 100.00% <ø> (ø)
data/gps15.g 100.00% <ø> (ø)
data/gps16.g 100.00% <ø> (ø)
data/gps17.g 100.00% <ø> (ø)
data/gps18.g 100.00% <ø> (ø)
data/gps19.g 100.00% <100.00%> (ø)
... and 27 more

... and 1 file with indirect coverage changes

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

@ThomasBreuer ThomasBreuer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good.

I would suggest to replace the function calls of the form PGAltOnSets(6,2) by descriptions of the form ["PGAltOnSets",6,2] (likewise for PGSymOnSets), and to postpone the evaluation until the entry in question is really accessed. There are already similar situations, the functions PGAlt and PGSym occur as entries.

(I understand that the drawback of this idea is that it may be more complicated to verify that the situations before and after the changes are the same.)

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