Ask Your Question
1

Equivalent to Singular's minpoly?

asked 2016-08-10 03:21:55 -0500

osr gravatar image

updated 2016-08-10 03:29:38 -0500

Hello everyone

In Singular, one can define a ring such as

ring r = (0,i),(x,y),dp;
minpoly = i2+1;

in order to specify that the parameter i verifies i²+1=0. Can I do this, or is it at all needed to work with Q(i), in Sage?

As of now, I have defined a ring

K.<x,y,I>=QQ[]

but I don't know if defining I as a parameter of the ring in Sage is needed, neither how could I define the minimal polynomial for K.

Thank you.

Edit: I discovered I can simplify each polynomial using .mod(I^2+1) but I guess there has to be a more general solution that applies this to the ring itself.

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
1

answered 2016-08-10 03:45:35 -0500

tmonteil gravatar image

updated 2016-08-10 05:43:21 -0500

Is this what you need ?

sage: R.<I> = QQ[I]
sage: R
Number Field in I with defining polynomial x^2 + 1
sage: K.<x,y> = PolynomialRing(R)
sage: K
Multivariate Polynomial Ring in x, y over Number Field in I with defining polynomial x^2 + 1
sage: P = x+I*y
sage: P^2
x^2 + (2*I)*x*y - y^2

EDIT: For GF(5), you can do similarly, but you have to define the quotient by yourself:

sage: S.<i> = GF(5)[]
sage: S
Univariate Polynomial Ring in i over Finite Field of size 5
sage: R.<I> = S.quotient(i^2+1)
sage: R
Univariate Quotient Polynomial Ring in I over Finite Field of size 5 with modulus i^2 + 1
sage: I
I
sage: I^2
4
sage: K.<x,y> = PolynomialRing(R)
sage: K
Multivariate Polynomial Ring in x, y over Univariate Quotient Polynomial Ring in I over Finite Field of size 5 with modulus i^2 + 1
sage: P = x+I*3*y
sage: P
x + 3*I*y
sage: P^2
x^2 + I*x*y + y^2
edit flag offensive delete link more

Comments

That is exactly what I needed, thank you!

Just one follow-up question, how would I do this for a finite field like GF(5) instead of QQ?

osr gravatar imageosr ( 2016-08-10 04:06:26 -0500 )edit
1

I updated my answer.

tmonteil gravatar imagetmonteil ( 2016-08-10 06:17:42 -0500 )edit

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: 2016-08-10 03:21:55 -0500

Seen: 32 times

Last updated: Aug 10 '16