Expand the completeness checker with more number field, Dirichlet, and local field cases - #7167
Open
roed-math wants to merge 2 commits into
Open
Expand the completeness checker with more number field, Dirichlet, and local field cases#7167roed-math wants to merge 2 commits into
roed-math wants to merge 2 commits into
Conversation
Add several new provable-completeness cases to lmfdb/utils/completeness.py, each with a message and a test using the example query from issue LMFDB#7017: - Number fields: a degree-2 field unramified outside S has |disc| dividing 8*prod_{odd p in S} p (factor 8 only if 2 in S), so it is complete when that product is within the degree-2 discriminant bound (new NFBound.clear_S_disc). - Number fields: a CM field is totally imaginary, constraining the signature to [0, n/2] (n even), which e.g. reduces degree 2 + CM to the class-number bound. - Number fields: for imaginary quadratic fields r_1 = 0, so the narrow class number/group equals the ordinary one. - Dirichlet characters: a primitive character has conductor equal to its modulus, so a conductor bound bounds the modulus. - p-adic fields: discriminant exponent c = 0 means unramified (e = 1), giving n = f via MulFiller (new UnramifiedFiller). All additions are gated on specific query keys and use string reasons, leaving clear_S/display_reason/to_rset untouched. Verified with the flask test client on the issue's example queries (before: no message; after: completeness flash) and via lmfdb/tests/test_utils.py::test_complete (new complete and not-complete cases), which passes against devmirror; pyflakes clean. 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.
Closes #7017.
This adds several new provable-completeness cases to
lmfdb/utils/completeness.py, each drawn from the list in the issue and shipped with its example query as a test.For number fields: a degree-2 field unramified outside a set S has absolute discriminant dividing
8 * prod_{odd p in S} p(the factor of 8 only when 2 is in S), so the search is complete when that bound is within the degree-2 discriminant completeness bound; a CM field is totally imaginary, which constrains the signature (reducing e.g. degree 2 + CM to the existing class-number bound); and for imaginary quadratic fields the narrow class number equals the ordinary class number.For Dirichlet characters, a primitive character has conductor equal to its modulus, so a conductor bound bounds the modulus.
For p-adic fields, discriminant exponent
c = 0means the field is unramified (e = 1), givingn = f.All additions are gated on specific query keys and use string reasons, leaving
clear_S/display_reason/to_rsetuntouched. Verified with the flask test client on the issue's example queries and via new complete/not-complete assertions intest_complete(passing against devmirror); pyflakes clean.Note this touches the same file as the congruence-support PR (#7139) and will want a light merge if that one lands first.
Ported from roed-math#31, where the full write-up and comment history live.
🤖 Generated with Claude Code