# 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 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.