Skip to content

Allow multiple labels in Find boxes for elliptic curves, modular curves, CMF, and abstract groups (LMFDB#6882) - #36

Closed
roed-math wants to merge 4 commits into
mainfrom
ai/t44-multi-label-find
Closed

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

Conversation

@roed-math

@roed-math roed-math commented Jul 19, 2026

Copy link
Copy Markdown
Owner

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 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), and 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. Tests added per section; existing single-entry jump
and fiber-product behavior is unchanged. Addresses LMFDB#6882.

🤖 Generated with Claude Code

roed314 and others added 2 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>
@roed-math

Copy link
Copy Markdown
Owner Author

Addressed the external review's P1 finding (EC Weierstrass comma syntax broken): commit 518e42b guards the EC multi-entry path with the established match_weierstrass_polys pattern — input that fullmatches the two-polynomial equation syntax (the only established single-curve EC syntax with a top-level comma) is parsed as a single curve; genuine label lists never match it and still route to multi-entry. The reviewer's exact input x^3 + 10*x + 17, x is preserved byte-for-byte as a regression test and resolves to /EllipticCurve/Q/35305/c/1; the previously-failing pre-existing test_jump passes again.

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.

roed314 and others added 2 commits August 4, 2026 17:23
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>
@roed314

roed314 commented Aug 5, 2026

Copy link
Copy Markdown

GPT signed off.

@roed-math

Copy link
Copy Markdown
Owner Author

Superseded by LMFDB#7170, opened upstream from this same branch. Closing here; review continues upstream.

@roed-math roed-math closed this Aug 6, 2026
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.

2 participants