ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 01 Jul 2014 18:02:06 +0200pariError when computing discriminanthttps://ask.sagemath.org/question/9233/parierror-when-computing-discriminant/Consider the following piece of code:
Qx.<x> = PolynomialRing(Rationals())
K = NumberField(x^2+1, 'a')
OOK = K.ring_of_integers() #K.maximal_order() has same effect
OOa = OOK.extension(x^3+2, 'alpha'); OOa
This returns "`Univariate Quotient Polynomial Ring in alpha over Maximal Order in Number Field in a with defining polynomial x^2 + 1 with modulus alpha^3 + 2`". Why is this the case? I would have expected it to have the same effect as
Qx.<x> = PolynomialRing(Rationals())
00b = ZZ.extension([x^3+2,x^2+1], 'beta,b'); OOb
Namely, that it returns `"Relative Order in Number Field in beta with defining polynomial x^3 + 2 over its base field`".
Moreover, and perhaps more interestingly, when one tries to run the command `OOa.discriminant()` after the first piece of code, "`PariError: (5)`" is returned. Running the analogous command, `OOb.absolute_discriminant()` after the second piece of code, one gets -746496. I presume the fact that these two commands return different results is explained in [Quotients of Univariate Polynomial Rings](http://www.sagemath.org/doc/reference/sage/rings/polynomial/polynomial_quotient_ring.html "Quotients of Univariate Polynomial Rings") when it says
> The discriminant of the quotient polynomial ring need not equal the discriminant of the corresponding number field, since the discriminant of a number field is by definition the discriminant of the ring of integers of the number field.
even though we are not computing the discriminant of a number field in the second piece of code. However, why is a pariError returned when trying to compute the discriminant of `OOa`? Surely this must be somehow linked to the fact that the two blocks of code return completely different things. Is this indeed the case? Any help would be appreciated.
Tue, 14 Aug 2012 09:58:15 +0200https://ask.sagemath.org/question/9233/parierror-when-computing-discriminant/Answer by rws for <p>Consider the following piece of code:</p>
<pre><code>Qx.<x> = PolynomialRing(Rationals())
K = NumberField(x^2+1, 'a')
OOK = K.ring_of_integers() #K.maximal_order() has same effect
OOa = OOK.extension(x^3+2, 'alpha'); OOa
</code></pre>
<p>This returns "<code>Univariate Quotient Polynomial Ring in alpha over Maximal Order in Number Field in a with defining polynomial x^2 + 1 with modulus alpha^3 + 2</code>". Why is this the case? I would have expected it to have the same effect as</p>
<pre><code>Qx.<x> = PolynomialRing(Rationals())
00b = ZZ.extension([x^3+2,x^2+1], 'beta,b'); OOb
</code></pre>
<p>Namely, that it returns <code>"Relative Order in Number Field in beta with defining polynomial x^3 + 2 over its base field</code>". </p>
<p>Moreover, and perhaps more interestingly, when one tries to run the command <code>OOa.discriminant()</code> after the first piece of code, "<code>PariError: (5)</code>" is returned. Running the analogous command, <code>OOb.absolute_discriminant()</code> after the second piece of code, one gets -746496. I presume the fact that these two commands return different results is explained in <a href="http://www.sagemath.org/doc/reference/sage/rings/polynomial/polynomial_quotient_ring.html" title="Quotients of Univariate Polynomial Rings">Quotients of Univariate Polynomial Rings</a> when it says </p>
<blockquote>
<p>The discriminant of the quotient polynomial ring need not equal the discriminant of the corresponding number field, since the discriminant of a number field is by definition the discriminant of the ring of integers of the number field. </p>
</blockquote>
<p>even though we are not computing the discriminant of a number field in the second piece of code. However, why is a pariError returned when trying to compute the discriminant of <code>OOa</code>? Surely this must be somehow linked to the fact that the two blocks of code return completely different things. Is this indeed the case? Any help would be appreciated.</p>
https://ask.sagemath.org/question/9233/parierror-when-computing-discriminant/?answer=23158#post-id-23158With Sage-6.2 I get
sage: OOa.discriminant()
-108
so the PariError seems to be fixed.
Tue, 01 Jul 2014 18:02:06 +0200https://ask.sagemath.org/question/9233/parierror-when-computing-discriminant/?answer=23158#post-id-23158