You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gh-40771: Don't fall back to pari to compute the discriminant of a maximal order.
Fixes#40770.
This only changes sagemath's behavior in the situation where the order
`self` is known to be maximal already. This can be either because pari
computed it for us, or because we computed it with
`assume_maximal=True`.
In the latter case, the existing behavior of sagemath is that we call
pari (the `nfdisc` call), which doesn't know that the order is maximal.
So it does a full-fledged factorization of the discriminant.
Instead, we can compute the discriminant from the trace pairing, which
is correct in all cases.
### 📝 Checklist
<!-- Put an `x` in all the boxes that apply. -->
- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [x] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.
URL: #40771
Reported by: Emmanuel Thomé
Reviewer(s):
deprecation(33386, 'maximal_order(v=[primes], assume_maximal="non-maximal-non-unique") has been deprecated since it can silently produce wrong results and does not play nicely with caching. An order that is maximal at some primes should be created with assume_maximal=None instead to make no assumptions about maximality at other primes.')
0 commit comments