Allow multiple labels in Find boxes for elliptic curves, modular curves, CMF, and abstract groups (LMFDB#6882) - #36
Allow multiple labels in Find boxes for elliptic curves, modular curves, CMF, and abstract groups (LMFDB#6882)#36roed-math wants to merge 4 commits into
Conversation
…es, CMF, and abstract groups (LMFDB#6882) Generalizes the multi-label jump support added for number fields in LMFDB#6964 to four more sections, using the merged multi_entry_jump_search/parse_labels infrastructure. Each section's jump function first tries the comma-separated multi-entry path (returning a ?labels= search page) and otherwise falls through unchanged to the existing single-entry logic. Section parsers: EC accepts LMFDB/Cremona labels and coefficient vectors; modular curves accept labels and names via modcurve_lmfdb_label; CMF accepts newform labels (incl. the colon form); abstract groups accept group labels, wired before name resolution so it composes with group-name search proposals. Verified with flask test client (single label still jumps to the object page, lists redirect to ?labels= results, invalid entries flash and are dropped, fiber products and untouched sections unchanged) and pytest: EC 3 passed, modular curves 2 passed, CMF 2 passed, groups 2 passed; pyflakes clean on all changed files. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ind (LMFDB#6882) The generic top-level comma splitter in the elliptic-curve Find box was intercepting the established two-polynomial Weierstrass input "f, h" (e.g. "x^3 + 10*x + 17, x", the curve y^2 + x*y = x^3 + 10x + 17): split_top_level_commas split it into two entries, so multi_entry_jump_search treated it as a label list, failed to parse either, and broke the pre-existing test_browse_page::HomePageTest::test_jump. Fix: attempt the established single-curve parser first by guarding the multi_entry_jump_search call with 'if not match_weierstrass_polys(label)'. The two-polynomial Weierstrass form is the only established single-curve EC syntax carrying a top-level comma; genuine label lists never fullmatch it (LMFDB labels have a dot, coefficient vectors are bracketed, Cremona labels do not fullmatch POLY_RE), so comma-separated label lists still enter multi-entry mode. The other three sections (modular curves, CMF, groups) have no single-entry syntax with a top-level comma (group family constructors keep their comma inside parens), so no guard is needed there. Verified: pre-existing test_jump and EC test_search_multiple_curves pass (with a byte-for-byte regression assertion for 'x^3 + 10*x + 17, x' added); modcurve/CMF/groups jump + multi tests pass (6); flask client confirms 'x^3 + 10*x + 17, x' -> single curve /EllipticCurve/Q/35305/c/1 while '11.a2, 389.a1' -> ?labels= search; pyflakes clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Addressed the external review's P1 finding (EC Weierstrass comma syntax broken): commit 518e42b guards the EC multi-entry path with the established Also audited the other three sections for the same ambiguity: modular curves, CMF, and groups have no established top-level-comma single-entry syntax (all 52 group family constructor patterns in the DB keep commas inside parentheses), so no guard is needed there. As noted in the ticket, at merge time with #39 the groups multi-entry path should call its name resolver so mixed label+name lists work — deliberately not wired here to keep the PRs independent. |
This PR changes the elliptic-curve Find-box prompt from "Label or coefficients" to "Label, coefficients, or comma-separated list", but HomePageTest.test_page still asserted the old text. The old string is not a substring of the new one, so the assertion fails. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
GPT signed off. |
|
Superseded by LMFDB#7170, opened upstream from this same branch. Closing here; review continues upstream. |
Generalizes the multi-label Find-box support added for number fields in LMFDB#6964 to four more sections:
elliptic curves over Q, modular curves, classical modular forms (newforms), and abstract groups. A
comma-separated list of labels in a section's Find box now returns a search-results page listing
those objects (via the existing
?labels=query andmulti_entry_jump_searchhelper), while a singleentry still jumps straight to the object page exactly as before. Each section supplies a small parser that
turns one entry into a canonical label (elliptic curves also accept Cremona labels and coefficient vectors;
modular curves accept names and alternate label systems; CMF accepts the
:-separated form), and invalidentries in a list are dropped with an informational flash, or an error is shown if none are valid. The
abstract-groups change is an additive block at the top of
group_jump, placed before name resolution so itcomposes with the separately-proposed group-name search. Tests added per section; existing single-entry jump
and fiber-product behavior is unchanged. Addresses LMFDB#6882.
🤖 Generated with Claude Code