Loading [MathJax]/jax/output/HTML-CSS/jax.js
Ask Your Question
0

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

asked 9 years ago

bruno171092 gravatar image

updated 9 years ago

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])/(xN1) 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)

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 9 years ago

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
Preview: (hide)
link

Comments

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

bruno171092 gravatar imagebruno171092 ( 9 years ago )

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 ( 9 years ago )

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

bruno171092 gravatar imagebruno171092 ( 9 years ago )

Can you explain me what that "xbar" means?

bruno171092 gravatar imagebruno171092 ( 9 years ago )

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 ( 9 years ago )

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: 9 years ago

Seen: 720 times

Last updated: Oct 08 '15