Allow multiple labels in Find boxes for elliptic curves, modular curves, CMF, and abstract groups - #7170
Open
roed-math wants to merge 4 commits into
Open
Allow multiple labels in Find boxes for elliptic curves, modular curves, CMF, and abstract groups#7170roed-math wants to merge 4 commits into
roed-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>
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>
Contributor
Author
|
The separately-proposed group-name search referenced above is now #7173. The two compose: this PR's block sits at the top of |
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 #6882.
Generalizes the multi-label Find-box support added for number fields in #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 single entry 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. Invalid entries 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 it composes with the separately-proposed group-name search coming later in this series.Tests added per section; existing single-entry jump and fiber-product behavior is unchanged.
Ported from roed-math#36, where the full write-up and comment history live.
🤖 Generated with Claude Code