-
-
Notifications
You must be signed in to change notification settings - Fork 594
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Constructor quaternion algebra over number fields from ramification #37189
Conversation
I've seen this other PR #37173 that implements |
8b4220c
to
44fc263
Compare
I'll review this once the necessary checks have completed. |
5be2ea6
to
d96f42e
Compare
Let me know (e.g. by commenting here) once you think this is ready for another full review; in the meantime, Lint recognized some whitespaces in the blank line 302. |
882ba53
to
55809f3
Compare
ready for review |
3be5ad7
to
0844c28
Compare
Great, I'll review it again when I find the time for it; this will probably not be before Friday though. |
0844c28
to
2657bae
Compare
The errors in the tests seemed to be outdated, so I updated the branch to re-trigger the tests |
Whoops, turns out I was looking at the wrong thing - the new commit should fix the errors. |
The timeout in |
Since #37173 should be on its way to get merged, I am putting this PR to |
- Added missing tests for possible errors - Integrated `.ramified_places()` to check that new construction works correctly - Modified input checks to properly reject bad inputs - Added author entry for prior work on sagemath#37173, sagemath#37644 and sagemath#37675
I've added the new tests/examples, including the use of |
failing doctest |
Whoops, should be fixed now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from a tiny nitpick, LGTM.
raise ValueError("quaternion algebra over a number field must have an even number of ramified places") | ||
|
||
# We want to compute the correct quaternion algebra over K with PARI | ||
# As PARI optimizes the polynomial used to define the number field, we need to precompute |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
About the comment: PARI does not optimise the polynomial (by default, it does with flag=2
), but it forces a defining polynomial that is monic and integral. If it is not, the polynomial gets changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the explanation! I adjusted the comment to be more accurate
|
||
# Compute the correct quaternion algebra over L in PARI | ||
A = L.__pari__().alginit([2, [fin_places_pari, [QQ((1,2))] * len(fin_places_pari)], | ||
inv_arch_pari], maxord=0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect that the new fails are due to a rename of the flag maxord
to flag
in pari's alginit
which must have made its way into cypari2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing this out! Hopefully everything should work now
This PR adds a new input format for the constructor of quaternion algebras.
It uses PARI
alginit
function to construct one form the ramification information.Fixes #16948