sagemath / sage

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

List of completely split primes is incomplete #28113

Open a6be518e-e92a-4ea3-ad2e-c326b54a0773 opened 5 years ago

a6be518e-e92a-4ea3-ad2e-c326b54a0773 commented 5 years ago

For number fields, the method completely_split_primes may be incomplete.

Example:

K.<a> = QuadraticField(17)
K.completely_split_primes(20)
[13, 19]

However,

K.<a> = QuadraticField(17)
K.ideal(2).factor()
(Fractional ideal (-1/2*a - 3/2)) * (Fractional ideal (-1/2*a + 3/2))

The reason is that the factorization of the defining polynomial mod p does not always give the correct answer. It does in all but finitely many cases, the exception being primes that divide the index of ZZ[a] in the ring of integers of K.

A possible solution would be to use the function K.ideal(p).factor() and determine the length of the splitting (at least for those finitely many primes in case we can easily determine them).

CC: @koffie @slel @mckenziewest

Component: number fields

Keywords: splitting of primes

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

embray commented 4 years ago
comment:1

Ticket retargeted after milestone closed

mkoeppe commented 4 years ago
comment:2

Moving tickets to milestone sage-9.2 based on a review of last modification date, branch status, and severity.

mkoeppe commented 3 years ago
comment:4

Moving to 9.4, as 9.3 has been released.

slel commented 2 years ago

Description changed:

--- 
+++ 
@@ -1,29 +1,31 @@
-For number fields, the method `completely_split_primes` may be incomplete.
+For number fields, the method `completely_split_primes`
+may be incomplete.

-## Example
+Example:

 ```python
-  K.<a> = QuadraticField(17)
-  K.completely_split_primes(20)
-  [13, 19]
+K.<a> = QuadraticField(17)
+K.completely_split_primes(20)
+[13, 19]

However,

-  K.<a> = QuadraticField(17)
-  K.ideal(2).factor()
-  (Fractional ideal (-1/2*a - 3/2)) * (Fractional ideal (-1/2*a + 3/2))
+K.<a> = QuadraticField(17)
+K.ideal(2).factor()
+(Fractional ideal (-1/2*a - 3/2)) * (Fractional ideal (-1/2*a + 3/2))

-The reason is that the factorization of the defining polynomial mod p does -not always give the correct answer. -It does in all but finitely many cases, the exception being primes that divide -the index of ZZ[a] in the ring of integers of K. +The reason is that the factorization of the defining polynomial +mod p does not always give the correct answer. +It does in all but finitely many cases, the exception +being primes that divide the index of ZZ[a] +in the ring of integers of K.

A possible solution would be to use the function -K.ideal(p).factor() and determine the length -of the splitting (at least for those finitely many primes -in case we can easily determine those primes). +K.ideal(p).factor() and determine the length of +the splitting (at least for those finitely many +primes in case we can easily determine them).

slel commented 2 years ago
comment:7

Reported again at #32982. The example there might serve as a doctest here.

dimpase commented 2 years ago
comment:9

CC-ing the code author