Thanks. But in this ring, I can not find gcd. N=7 p=3
R2.<b> = PolynomialRing(GF(p)) S.<x> = R2.quotient(b^N - 1) f=x^6-x^4+x^3+x^2-1 g=x^6+x^4-x^2-x print gcd(f,g),xgcd(f,g) Traceback (click to the left of this block for traceback) ... TypeError: unable to find gcd On 23 August 2013 03:10, Stefan van Zwam <stefanvanz...@gmail.com> wrote: > On Thursday, August 22, 2013 4:06:22 PM UTC-4, Santanu wrote: > >> How to define polynomial ring like Z[x]/(x^10-1) & Z_5[x]/(x^10-1) in >> Sage? >> >> > sage: R1.<a> = PolynomialRing(ZZ) > sage: R.<x> = R1.quotient(a^10 - 1) > > sage: R2.<b> = PolynomialRing(GF(5)) > sage: S.<y> = R2.quotient(b^10 - 1) > > Now you can do: > > sage: x^12 > x^2 > > sage: y^14 + 7 * y > y^4 + 2*y > > -- > You received this message because you are subscribed to the Google Groups > "sage-support" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sage-support+unsubscr...@googlegroups.com. > To post to this group, send email to sage-support@googlegroups.com. > Visit this group at http://groups.google.com/group/sage-support. > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/groups/opt_out.