ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 08 Feb 2016 08:04:16 -0600Number field arithmetic in Pari/gphttp://ask.sagemath.org/question/32487/number-field-arithmetic-in-parigp/Hi all,
I would like to do number field arithmetic in Pari. To be more precise, I would like let Pari do the following job as Sage does,
K.<a> = NumberField(f(x))
L.<b> = NumberField(g(x))
where f(x), g(x) are irreducible polynomials over the rational. I would like to do arithmetic with a,b. This is easily done in Sage. How can I do this by Pari?
ThanksSun, 07 Feb 2016 17:04:39 -0600http://ask.sagemath.org/question/32487/number-field-arithmetic-in-parigp/Answer by vdelecroix for <p>Hi all,</p>
<p>I would like to do number field arithmetic in Pari. To be more precise, I would like let Pari do the following job as Sage does,</p>
<pre><code>K.<a> = NumberField(f(x))
L.<b> = NumberField(g(x))
</code></pre>
<p>where f(x), g(x) are irreducible polynomials over the rational. I would like to do arithmetic with a,b. This is easily done in Sage. How can I do this by Pari?</p>
<p>Thanks</p>
http://ask.sagemath.org/question/32487/number-field-arithmetic-in-parigp/?answer=32496#post-id-32496 You can *convert* the given number field into pari number field with
sage: K.<a> = NumberField(x^2 - 2)
sage: K.pari_nf()
[y^2 - 2, [2, 0], 8, 1,
[[1, -1.41421356237310; 1, 1.41421356237310],
[1, -1.41421356237310; 1, 1.41421356237310],
[1, -1; 1, 1], [2, 0; 0, 4], [4, 0; 0, 2], [2, 0; 0, 1], [2, [0, 2; 1, 0]], []],
[-1.41421356237310, 1.41421356237310], [1, y], [1, 0; 0, 1], [1, 0, 0, 2; 0, 1, 1, 0]]Mon, 08 Feb 2016 08:04:16 -0600http://ask.sagemath.org/question/32487/number-field-arithmetic-in-parigp/?answer=32496#post-id-32496