Fix number-field code-snippet errors: Magma Galois assignment & Q-collapse, PARI high-degree Galois (LMFDB#6759)#32
Open
roed-math wants to merge 1 commit into
Open
Conversation
Running the number field snippets across a spread of fields (Q, quadratic, cubic, quartic, degree 12) surfaced three genuine errors that the snippet CI harness cannot catch, since it only tests degree <= 2 fields and skips Magma: - The Magma galois_group snippet used `=` (equality) instead of `:=` (assignment), erroring on every field. - Magma's NumberField collapses a degree-1 polynomial to the rationals, so the Q field page (1.1.1.1) broke on unit rank, regulator, subfields and the class number formula; fixed with `DoLinearExtension := true` in the field and class-number-formula snippets. - PARI's polgalois hard-errors above degree 11; now guarded with an if() that returns an explanatory message (degree <= 11 is unchanged). Updates the two committed gp snippet-test logs for the new PARI Galois command line (its output is unchanged). Verified by executing the fixed snippets in sage, sage --gp and Magma across the field spread. 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.
Some auto-generated code snippets on number-field pages error when run. Building on the already-merged
Oscar
automorphism_groupfix (LMFDB#6867), this addresses errors that the snippet CI harness cannot catchbecause it only exercises degree <= 2 fields and skips Magma. Running every snippet across a spread of
fields (Q, imaginary/real quadratic, monogenic & non-monogenic cubics, a quartic, and a degree-12 field)
surfaced three genuine bugs, all fixed in
lmfdb/number_fields/code.yaml: (1) the Magma Galois-groupsnippet used
=instead of:=, erroring on every field; (2) Magma'sNumberFieldcollapses a degree-1polynomial to the rationals, so the Q page (1.1.1.1) broke on unit rank, regulator, subfields and the
class-number formula — fixed by
DoLinearExtension := true; (3) PARI'spolgaloishard-errors abovedegree 11, now guarded to return an explanatory message. The two committed gp snippet-test logs are updated
for the new PARI Galois line (its output is unchanged). One issue is intentionally left as a documented
limitation: the PARI analytic-class-number-formula snippet overflows the default PARI stack on high-degree
fields (a resource limit, not a code error). Verified by executing the fixed snippets in Sage,
sage --gp,and Magma across the field spread. Addresses LMFDB#6759.
🤖 Generated with Claude Code