Ask Your Question
0

Generating (Z/nZ[x])/(x^N-1)

asked 2015-10-08 12:57:14 +0200

bruno171092 gravatar image

updated 2015-10-08 12:57:55 +0200

Hey Guys, i am absolutely new to sage but want to use it for some algebraic calculations. Therefore i must generate the Polynomial ring R=$(Z/nZ[x])/(x^N-1)$ to calcuate some inverses and products of some polynomials in R.

I hope it's not a too stupid question and apologize for bothering you guys with this but i still hope someone can give me an answer :).

(ofc for some given n and N)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-10-08 14:24:43 +0200

vdelecroix gravatar image

You should have a look at the documentation.

sage: A = Zmod(4)
sage: P = PolynomialRing(A, 'x')
sage: x = P.gen()
sage: R = R.quotient(x^7 - 1)
sage: xbar = R.gen()
sage: xbar ** 7
1
sage: 4 * xbar
0

But note that computation of inverses does not work at all:

sage: 1 / xbar
Traceback (most recent call last):
...
NotImplementedError: The base ring (=Ring of integers modulo 4) is not a field
edit flag offensive delete link more

Comments

first of thanks. i dont know why haven't found that documentation... is there no possibility to compute inverses?

bruno171092 gravatar imagebruno171092 ( 2015-10-08 16:19:13 +0200 )edit

Probably because Sage doesn't want to try to compute inverses when there is no guarantee there will be an inverse to a given element?

kcrisman gravatar imagekcrisman ( 2015-10-09 12:40:35 +0200 )edit

is there another computer algebra system that tries it even though its not a field?

bruno171092 gravatar imagebruno171092 ( 2015-10-09 16:33:47 +0200 )edit

Can you explain me what that "xbar" means?

bruno171092 gravatar imagebruno171092 ( 2015-11-21 17:25:46 +0200 )edit

xbar is just the name of the variable given by @vdelecroix As you can see, it is defined as R.gen() which means that it is the generator or the quitient ring of P by x^7 - 1, more precisely, it is the image of x under the quotient map.

tmonteil gravatar imagetmonteil ( 2015-11-21 17:46:13 +0200 )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: 2015-10-08 12:57:14 +0200

Seen: 568 times

Last updated: Oct 08 '15