Add a maximal subgroups mode to the subgroup diagram and profile - #7171
Open
roed-math wants to merge 3 commits into
Open
Add a maximal subgroups mode to the subgroup diagram and profile#7171roed-math wants to merge 3 commits into
roed-math wants to merge 3 commits into
Conversation
Adds a "maximal subgroups" button next to "all subgroups" and "normal subgroups" on abstract group pages, working for both the diagram and the profile views and crossed with the up-to-conjugacy/up-to-automorphism toggle. The diagram shows the whole group above the classes of maximal subgroups, built from the stored maximal column, so it displays even for groups whose full subgroup diagram is disabled for size (32.45, 1024.dke), and the profile lists maximal subgroups even when inclusions were never computed (1024.dip). Adds /maximal_diagram/<label> and /maximal_autdiagram/<label> fullpage routes and generalizes the mode-toggle javascript from pairs to option groups. Verified with the abstract groups test suites (test_abstract_groups.py 8 passed including a new test, test_browse_page.py 71 passed), pyflakes, and by exercising all mode combinations in a browser on 24.12, 32.45, 1024.dke, 1024.dip, 128.2328, 336.208 and 1.1 with no JS console errors. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The added tests could pass with no maximal graph generated: they matched
the header divs that abstract-show-group.html emits for every group, empty
slot or not, and the fullpage route titles, which render even when
diagram_js_string() returns "".
Test the graphs instead. A helper parses the make_sdiagram payload out of
a page, so a test can assert which of the six graph slots is filled and
with which nodes and edges. We now check the node and edge sets of
subgroup_lattice("maximal", "") and ("maximal", "aut") for 32.45, where 15
classes of maximal subgroups fuse into 2 up to automorphism while the
118-class subgroup diagram is suppressed; the slots embedded in the group
page; the payload of both fullpage routes for 24.12 and 32.45; and the
maximal profile of 1024.dip, whose subgroup inclusions were never computed.
Verified by mutation: ten deliberate defects (maximal slots never filled,
whole group dropped, a maximal class omitted, a nonmaximal class included,
a missing star edge, reversed star edges, no deduplication by aut_label, a
fullpage title with no payload, the profile lost when inclusions are
unknown, altered 24.12 profile contents) each make the tests fail. The
button matrix was also exercised in a browser on all three groups.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Closes #6891.
Adds a "maximal subgroups" button next to "all subgroups"/"normal subgroups" on abstract group pages, as suggested in the issue. The new mode works for both the diagram and the profile views, crossed with the existing up-to-conjugacy/up-to-automorphism toggle, and gets its own fullpage diagram routes.
The diagram shows the whole group on top with the classes of maximal subgroups below it, built directly from the stored
maximalcolumn, so it displays even for groups whose full subgroup diagram is disabled for size (e.g. 32.45, 1024.dke). For groups where inclusions were never computed (e.g. 1024.dip) the profile still lists all maximal subgroup classes.Verified on S4, PGL(2,7), p-groups with huge/partial/missing lattices, and the trivial group; the abstract-groups test suite passes and a new test covers the mode.
Ported from roed-math#37, where the full write-up and comment history live.
🤖 Generated with Claude Code