Skip to content

Expand the completeness checker with more number field, Dirichlet, and local field cases - #7167

Open
roed-math wants to merge 2 commits into
LMFDB:mainfrom
roed-math:ai/t42-completeness-cases
Open

Expand the completeness checker with more number field, Dirichlet, and local field cases#7167
roed-math wants to merge 2 commits into
LMFDB:mainfrom
roed-math:ai/t42-completeness-cases

Conversation

@roed-math

Copy link
Copy Markdown
Contributor

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 = 0 means the field is unramified (e = 1), giving n = f.

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 and via new complete/not-complete assertions in test_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

roed314 and others added 2 commits July 19, 2026 12:20
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>
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.

Expand the completeness checker to handle more cases

2 participants