# Check if element is irreducible in algebraic number field

If I have an algebraic number field

sage: S.<x> = NumberField(x^2+13)


is there a way to find out if an element is irreducible? There seems to be only a function to check if it is prime:

sage: (S(7)).is_prime()
False


But 7 is irreducible in $\mathbb{Q}(\sqrt{-13})$... how could I find that out?

edit retag close merge delete

There does not seem to be such a functionality implemented yet. A side note is that what you want is probably to decide whether a given element is prime in the ring of integers of your number field. You can construct it using "sage: R = S.rings_of_integers()". Still there is no is_irreducible method for rings of integers of number fields.

( 2015-05-04 07:05:20 -0600 )edit

Sort by » oldest newest most voted

In this special situation one can ask for the following:

sage: K.<a> = QuadraticField( -13 )
sage: ideal = K.ideal( K(7) )
sage: ideal.factor()
(Fractional ideal (7, a + 1)) * (Fractional ideal (7, a + 6))
sage: for factor in ideal.factor():
print factor, "with norm", factor[0].norm()
....:
(Fractional ideal (7, a + 1), 1) with norm 7
(Fractional ideal (7, a + 6), 1) with norm 7


The ideal has the above decomposition, but the factors are not principal. Strictly speaking, we are performing arithmetics not in the field, but in its ring of integers or in some subring / order. Then a non-trivial representation $7 = st$ with $s, t$ non-units would lead to $7^2 = N(7)=N(st)=N(s)\, N(t)$, and the only way to arrange for two non-unit norms would be with $N(s) = N(t) = 7$. So one can equivalently search for such elements without asking sage to factor. The search is quickly done for small values to be factorized. And there is in general a quick theoretical answer if a prime $p$ is of the shape $a^2 +13 b^2$ (in a non-trivial way). We look at $p=a^2 +13 b^2$ as an equality in integers and pass modulo $13$. So $p$ must be a quadratic residue modulo $13$ if there is such a representation. And the theory takes care of the other direction. For our situation we have the choice to alternatively ask for:

sage: legendre_symbol( 7, 13 )
-1
sage: jacobi_symbol( 7, 13 )
-1
sage: kronecker_symbol( 7, 13 )
-1
sage: GF(13)(7).is_square()
False


(For an order we have to continue investigations.)

more