You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Modular curves: real Sage download code; fix skip guards querying the wrong table
Reviewer-requested changes:
1. The Sage download emitted Magma code with only the header text changed
(a lang parameter on download_modular_curve_magma_str), post-processed by
fragile string replacements that still left invalid Sage (Magma-style
Pol<x,y,z> ring declaration, true/false booleans). Replace it with a
single shared writer, download_modular_curve_str(label, lang), with proper
per-language templates: comment character (// vs #), assignment (:= vs =),
statement terminator, booleans (true/false vs True/False), and the
polynomial ring constructor (Pol<x,y,z> := PolynomialRing(Rationals(), 3)
vs Pol.<x,y,z> = PolynomialRing(QQ, 3)). While porting, fix small bugs
inherited from main: the fiber-product comment was missing its newline (so
the factors assignment was swallowed into the comment), the factors list
kept Python-style single quotes, stray statement terminators after
r/Ncusps/Nrat_cusps, and the polynomial ring is now also defined when a
curve has maps but no stored models (e.g. the j-map of a P^1 curve uses
x,y) or codomain equations needing more variables. The generated .sage
files for 11.12.1.a.1, 2.3.0.a.1 and 60.11520.409-60.bwm.1.10 were
verified to run under sage's load().
test_download_functionality now asserts the Sage download has # comments,
no // or := anywhere, the Sage-style ring declaration, and actually
executes it through the Sage preparser, checking the resulting values.
2. dims/mults/newforms moved from gps_gl2zhat to modcurve_decomposition
(keyed by Gassmann class), but test_related_objects still guarded on
db.gps_gl2zhat.lookup(label, "newforms"), a condition that would stay
false forever and permanently skip the test. Split it into four focused
tests (siblings 48, siblings 60, elliptic curve, genus 2 isogeny class),
each guarded via a new _skip_if_not_populated helper on exactly the
(table, label, column) triples it needs, querying the table that now owns
each column; skip messages name the precise missing dependency. All
original assertions are preserved. Audited the remaining skip guards:
they only reference columns still owned by gps_gl2zhat.
Also fix the same wrong-table bug in WebModCurve.friends: the sibling
search compared gps_gl2zhat.newforms (now always null) against the
decomposition newforms, so sibling links could never appear once
trace_hash is populated; candidate newforms are now fetched from
modcurve_decomposition by Gassmann class.
Full test file: 39 passed, 22 skipped (all skips are unloaded devmirror
rows/columns still owned by gps_gl2zhat), 0 failed; pyflakes clean.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
0 commit comments