Display group hashes and identify groups from a description (LMFDB#5556)#44
Open
roed-math wants to merge 1 commit into
Open
Display group hashes and identify groups from a description (LMFDB#5556)#44roed-math wants to merge 1 commit into
roed-math wants to merge 1 commit into
Conversation
Part (a): surface the isomorphism-invariant hash in the finite groups interface. Abstract group homepages show the stored hash (with a search link) whenever it is informative, i.e. hash is present and differs from the label counter; add an optional, off-by-default "Hash" search column; and linkify the two hash TODO popups in group_data. Subgroup pages get nothing (subgroup_hash/quotient_hash are entirely NULL in the DB). Part (b): new /Groups/Abstract/identify endpoint plus a form on the index page and jump-box wiring for permutation input. The server computes the LMFDB (Magma) hash in-process via libgap -- a faithful port of Hash.m in new file identify.py -- with strict, no-eval parsers for permutation generators, PC codes and matrices, a 10^6 order cap, and cysignals alarm() timeouts. Lookup goes IdGroup (proof) -> gps_smallhash (complete tables) -> (order, hash) on gps_groups, with mathematically honest messaging (a hash match is not an isomorphism proof). Verified: libgap hash port reproduces every stored value tested (512.11, 1536.947, 2016.i, 6561.4, 5120.cs, 1024.a, M11, Sp(4,3), abelian cases); identify redirects/lists/errors and the alarm timeout+recovery exercised via the Flask test client; new pytest cases and the full test_abstract_groups.py (12) and test_browse_page.py (71) pass; pyflakes clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Surfaces the isomorphism-invariant group hash in the finite groups interface and adds a
group-identification tool. Abstract group homepages now show the stored hash (with a search
link) whenever it is informative (present and unequal to the label counter), there is an
optional off-by-default "Hash" search column, and the two hash placeholders in the subgroup
data popups are linkified. A new
/Groups/Abstract/identifyendpoint (with a form on the indexpage and jump-box wiring for permutation input) lets a user enter permutation generators, a PC
code, or matrix generators; the server computes the LMFDB (Magma) hash in-process via libgap —
a faithful port of the FiniteGroups
Hash.m— using strict parsers that never eval user input,a 10^6 order cap, and alarm() timeouts. Results go through GAP identification (a proof), the
complete
gps_smallhashtables (a unique match is a proof), then an (order, hash) lookup ingps_groups, always with mathematically honest messaging that a hash match alone does not proveisomorphism. Verified by reproducing many stored hashes against the database, exercising every
input/lookup/error/timeout path through the Flask test client, and running the abstract-groups
and browse-page test suites (pyflakes clean). Subgroup homepages are unchanged because the
subgroup/quotient hash columns are entirely NULL in the current data.
Addresses LMFDB#5556.
🤖 Generated with Claude Code