Ask Your Question

# Polynomial ring over the ring of integers modulo 3

I am using SageMath and I want to use a polynomial ring in this form: (Z/3)[x]/(x^p - x - 1) , with Z as polynomial ring over integer Ring. How can I build that? Until now I only could declare Z[x]/x^p - x - 1

edit retag close merge delete

## 1 Answer

Sort by » oldest newest most voted The most literal interpretation is to build the quotient ring $(\mathbb{Z}/3\mathbb{Z})[x]/(x^p - x - 1)$:

sage: p = 3
sage: A.<x> = PolynomialRing(Zmod(3))
sage: B.<y> = A.quotient(x^p - x - 1)
sage: B.cardinality().factor()
3^3
sage: B.is_field()
True


Since $3$ is prime you can also replace Zmod(3) by GF(3).

If $x^p - x - 1$ is irreducible (for example for $p=3$) then it is a modulus for the field with $3^p$ elements:

sage: C.<z> = GF(3^p, modulus=x^p - x - 1)

more

## Your Answer

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

Add Answer

## Stats

Asked: 2020-05-08 14:37:31 +0200

Seen: 154 times

Last updated: May 08 '20