Skip to content

Commit e9f612c

Browse files
roed314claude
andcommitted
Display group hashes and identify groups from a description (LMFDB#5556)
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>
1 parent 5ef81bd commit e9f612c

7 files changed

Lines changed: 707 additions & 6 deletions

File tree

0 commit comments

Comments
 (0)