Skip to content

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
LMFDB:mainfrom
roed-math:ai/t44-multi-label-find
Open

Allow multiple labels in Find boxes for elliptic curves, modular curves, CMF, and abstract groups#7170
roed-math wants to merge 4 commits into
LMFDB:mainfrom
roed-math:ai/t44-multi-label-find

Conversation

@roed-math

Copy link
Copy Markdown
Contributor

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 and multi_entry_jump_search helper), 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

roed314 and others added 4 commits July 19, 2026 13:41
…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>
@roed-math

Copy link
Copy Markdown
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 group_jump, before name resolution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow for multiple labels to be entered in Find box

2 participants