sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.22k stars 427 forks source link

Construct a quaternion algebra over a number field by specifying its ramification #16948

Open mmasdeu opened 9 years ago

mmasdeu commented 9 years ago

There is a need for the constructor QuaternionAlgebra to take as input a number field F and a ramification (specified by an ideal D in F and a set of real places S of F) and which constructs a quaternion algebra over F with ramified precisely at the primes dividing D and at the places in S.

We have code to add here, which is now being tested and documented.

CC: @tornaria

Component: number theory

Keywords: quaternion algebra, ramification

Author: Marc Masdeu, Xavier Guitart

Branch/Commit: u/mmasdeu/16948-review @ fcf1a69

Issue created by migration from https://trac.sagemath.org/ticket/16948

mmasdeu commented 9 years ago

Commit: 2d2cfa9

mmasdeu commented 9 years ago
comment:1

The code passes all doctests and runs in reasonable time. I think it is ready for review.

mmasdeu commented 9 years ago

Branch: u/mmasdeu/16948-quatalg-from-ramification

jdemeyer commented 9 years ago
comment:2

Just a remark: this functionality is in PARI now, so you could just try to wrap PARI.

fchapoton commented 9 years ago
comment:3

Please use python3 raise syntax: raise Error('msg')

see patchbot report in plugin raise_statement for the lines with a bad raise syntax

fchapoton commented 9 years ago

New commits:

de9cb12Merge branch 'u/mmasdeu/16948-quatalg-from-ramification' into 6.8
2c21a0bcorrect py3 syntax for raise
fchapoton commented 9 years ago

Changed branch from u/mmasdeu/16948-quatalg-from-ramification to public/ticket/16948

fchapoton commented 9 years ago

Changed commit from 2d2cfa9 to 2c21a0b

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 9 years ago

Changed commit from 2c21a0b to b29e4f8

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 9 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

b29e4f8trac #16948 some details in code and documentation
mmasdeu commented 8 years ago

Changed commit from b29e4f8 to e5c0916

mmasdeu commented 8 years ago

New commits:

e5c0916Added missing docstrings in number_field.py so that patchbot is happy.
mmasdeu commented 8 years ago

Changed branch from public/ticket/16948 to u/mmasdeu/16948

roed314 commented 8 years ago
comment:9

This no longer merges with sage 7.2 (according to trac).

fchapoton commented 8 years ago
comment:10

merge done, was easy


New commits:

fe1008aMerge branch 'u/mmasdeu/16948' in 7.3.b7
fchapoton commented 8 years ago

Changed commit from e5c0916 to fe1008a

fchapoton commented 8 years ago

Changed branch from u/mmasdeu/16948 to public/16948

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 7 years ago

Changed commit from fe1008a to cdae032

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 7 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

cdae032Merge branch 'public/16948' in 7.4.b5
nsirolli commented 7 years ago
comment:14

A small remark regarding the ValueError in line 636: the exponents in the discriminant factorization should be equal to 1, and not just odd.

By the way, is there a reason why the input is an ideal of F instead of a list of prime ideals of F? If I want to construct a quaternion algebra with a prescribed ramification set of finite primes, I'd have to use their product as input, and then the constructor would have to factor it back (see line 634).

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 7 years ago

Changed commit from cdae032 to 5284a37

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 7 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

5284a37Merge branch 'public/16948' in 7.6.b4
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 7 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

73272e3trac 16948 fixing bad merge
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 7 years ago

Changed commit from 5284a37 to 73272e3

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 7 years ago

Changed commit from 73272e3 to 355c58d

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 7 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

355c58dtrac 16498 some details in weak_approximation
mmasdeu commented 7 years ago

Changed commit from 355c58d to fcf1a69

mmasdeu commented 7 years ago
comment:18

Thanks for the comments! Please take a look at the changes I have introduced.

Replying to @nsirolli:

A small remark regarding the ValueError in line 636: the exponents in the discriminant factorization should be equal to 1, and not just odd.

By the way, is there a reason why the input is an ideal of F instead of a list of prime ideals of F? If I want to construct a quaternion algebra with a prescribed ramification set of finite primes, I'd have to use their product as input, and then the constructor would have to factor it back (see line 634).


New commits:

fcf1a69Trac 16948: adopted changes proposed by nsirolli.
mmasdeu commented 7 years ago

Changed branch from public/16948 to u/mmasdeu/16948-review

nsirolli commented 7 years ago
comment:19

Thanks for accepting my proposal.

Now the new input format, QuaternionAlgebra(K, "list of primes", S) is quite different from the one you are extending to number fields other than QQ, QuaternionAlgebra(D). I feel this controversy should be avoided. The problem could be addressed by letting this new constructor accept both a discriminant and a list of primes as input. A more radical solution would be to change the classical QuaternionAlgebra(D) to take a list of primes as input, but I guess that it could cause trouble.

Besides this, here are some remarks about the changes introduced in this commit:

fchapoton commented 6 years ago
comment:20

needs rebase, does not apply