Skip to content

Clarify genus 2 minimal/simplified model snippets - #21

Open
roed-math wants to merge 1 commit into
mainfrom
ai/t27-g2c-snippet-comments
Open

Clarify genus 2 minimal/simplified model snippets#21
roed-math wants to merge 1 commit into
mainfrom
ai/t27-g2c-snippet-comments

Conversation

@roed-math

Copy link
Copy Markdown
Owner

The genus 2 curve-page snippets defined a C (minimal model) and an X (simplified model)
without saying which was which. Following the suggestion in the issue, the snippets now use
Cmin and Csim with // minimal equation / // simplified equation comments, and the
simplified-model snippet displays the resulting curve. The simplified-model rational points
snippet now constructs points on Csim rather than on the minimal model, and the download file
gains a matching "Simplified equation" step. Along the way this fixes a bug in
simplify_hyperelliptic_point/comp_poly (y-coordinate divided by the content n of 4f+h²
instead of sqrt(n/squarefree_part(n))): for the 3160 curves with h = 0 the displayed
simplified-model points were not actually on the curve (e.g. (0 : -1/2 : 1) on 400.a.409600.1),
and the corrected points are needed for the new snippet to run. Verified by running the generated
Magma/Sage snippets for 169.a.169.1, 400.a.409600.1 and 336.a.172032.1, rendering the affected
pages and the Magma download with the test client, and the genus2_curves test suite (42 passed).
Addresses LMFDB#5344.

🤖 Generated with Claude Code

Rename C/X to Cmin/Csim in the genus 2 curve code snippets and add
// minimal equation and // simplified equation comments, so it is clear
which model each variable refers to; display Csim after defining it.
Point the simplified-model rational points snippet at Csim instead of
Cmin, and fix simplify_hyperelliptic_point/comp_poly to divide the
y-coordinate by sqrt(n/squarefree_part(n)) rather than n, so the
displayed simplified-model points (and the snippet) actually lie on the
simplified model when h = 0.  Mirror the renaming in the Code-to-Magma
download and add a Simplified equation step to it.

Verified by running the generated Magma snippets for 169.a.169.1,
400.a.409600.1 and 336.a.172032.1 (all pass except pre-existing Magma
package issues), the sage snippets in a sage REPL, page renders and the
Magma download via the flask test client, and the genus2_curves test
suite (42 passed).

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