Clarify genus 2 minimal/simplified model snippets - #21
Open
roed-math wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The genus 2 curve-page snippets defined a
C(minimal model) and anX(simplified model)without saying which was which. Following the suggestion in the issue, the snippets now use
CminandCsimwith// minimal equation/// simplified equationcomments, and thesimplified-model snippet displays the resulting curve. The simplified-model rational points
snippet now constructs points on
Csimrather than on the minimal model, and the download filegains 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