Ask Your Question
1

Equivalent to Singular's minpoly?

asked 2016-08-10 10:21:55 +0100

osr gravatar image

updated 2016-08-10 10:29:38 +0100

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 10:45:35 +0100

tmonteil gravatar image

updated 2016-08-10 12:43:21 +0100

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 11:06:26 +0100 )edit
1

I updated my answer.

tmonteil gravatar imagetmonteil ( 2016-08-10 13:17:42 +0100 )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 10:21:55 +0100

Seen: 638 times

Last updated: Aug 10 '16