Skip to content

Fix hypergeometric famhodge search, add Hodge polygon plot, and 404 malformed labels (#3406) - #25

Open
roed-math wants to merge 1 commit into
mainfrom
ai/t30-hgm-fixes
Open

Fix hypergeometric famhodge search, add Hodge polygon plot, and 404 malformed labels (#3406)#25
roed-math wants to merge 1 commit into
mainfrom
ai/t30-hgm-fixes

Conversation

@roed-math

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

Copy link
Copy Markdown
Owner

This addresses the three open items of the HGM good-first-issue checklist. (a) A bare
family-Hodge-vector query such as ?famhodge=[1,5,1] now runs a family search (the
family Hodge vector is a family-level invariant) and returns the matching families
instead of zero motives; an explicit motive search on a family Hodge vector with no
matching motives flashes a link to the corresponding family search. (b) A Hodge polygon
is now displayed on family and motive pages of positive weight, rendered in the style of
the abelian-variety and local-field Newton polygons (grid, shaded region, convex polygon
line, vertex markers) and scaled to a consistent 2:1 box. (c) Malformed labels now return
a clean 404 instead of a 500 or a redirect-with-flash (this includes the family, motive,
/plot/* and /data routes and the specialization value t), while a full motive label
pasted as a single path segment 301-redirects to the motive page; the unescaped . in
HGM_LABEL_RE was also fixed. New tests cover all three items and the full hypergm
suite passes (35). Note: the hgm.hodge_polygon knowl still needs to be created (proposed
text is in the ticket). Addresses LMFDB#3406.

🤖 Generated with Claude Code

…DB#3406)

Three good-first-issue fixes for hypergeometric motives:
- (a) A bare famhodge query now defaults to a family search (the family Hodge
  vector is a family-level invariant), so it returns matching families instead of
  zero motives; an explicit motive search on famhodge with no matches flashes a
  link to the family search.
- (b) New plot.hodge_polygon_plot renders the Hodge polygon (abelian-variety /
  local-field Newton-polygon style, scaled to a 2:1 box) on family and motive
  pages of positive weight.
- (c) Malformed labels (family, motive, /plot/*, bad t) return 404 instead of 500
  or a redirect-with-flash; a full motive label pasted as one path segment
  301-redirects to the motive page. Escaped the unescaped '.' in HGM_LABEL_RE.

Verified with the flask test client on devmirror and pytest lmfdb/hypergm
(35 passed); pyflakes clean. Added tests for (a), (b) and (c).
Note: the hgm.hodge_polygon knowl does not yet exist (content proposed in PR).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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