Ask Your Question
2

Trouble defining polynomial ring over Gaussian integers

asked 2022-03-26 12:05:56 +0100

FKalker gravatar image

updated 2022-03-26 16:41:16 +0100

Hello,

I would like to define a polynomial ring over ZZ[I], e.g. like this:

sage: R.<x> = PolynomialRing(ZZ[I])

If I run this on sage 9.4 I get the following:

 sage: R
Univariate Polynomial Ring in x over Order in Number Field in I0 with defining polynomial x^2 + 1 with I0 = 1*I

If I now try to define a polynomial with complex coefficients I get:

sage: f = I*x
TypeError: unsupported operand parent(s) for *: 'Number Field in I with defining polynomial x^2 + 1 with I = 1*I' and 'Univariate Polynomial Ring in x over Order in Number Field in I0 with defining polynomial x^2 + 1 with I0 = 1*I'

On SageMath version 9.0 I do not get the same error. Instead it says:

sage: R
Univariate Polynomial Ring in x over Order in Number Field in I with defining polynomial x^2 + 1 with I = 1*I

and i have no issues defining f = I*x. How do I resolve this issue in SageMath version 9.4?

Edit: I have done some further investigation, and the problem lies with this I0 in

sage: ZZ[I]
Order in Number Field in I0 with defining polynomial x^2 + 1 with I0 = 1*I

What is the difference between I0 and I and how do I work with it? Simply typing f = I0 * x also results in an error. Is this maybe a bug in SageMath 9.4? Does the same happen in SageMath 9.5?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2022-03-26 17:51:59 +0100

FrédéricC gravatar image

Carefully define all variables and rings:

sage: A = GaussianIntegers()
sage: I = A.gen(1)
sage: R = PolynomialRing(A,'x')
sage: x = R.gen()
sage: I*x
I*x
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2022-03-26 12:05:56 +0100

Seen: 398 times

Last updated: Mar 26 '22