1 | initial version |
The trick is first to define the ring where your polynomial will live, namely Polynomial Ring in the undeterminate x
over the finite field of size 3, $\mathbf[F}_3[x]$:
sage: R.<x> = GF(3)[]
This defines both R
and x
:
sage: R
Univariate Polynomial Ring in x over Finite Field of size 3
sage: x
x
sage: x.parent()
Univariate Polynomial Ring in x over Finite Field of size 3
Then, you can do:
sage: P = x^8+x^2+1
sage: P.is_irreducible()
False
sage: P.factor()
(x + 1) * (x + 2) * (x^3 + 2*x + 1) * (x^3 + 2*x + 2)
2 | No.2 Revision |
The trick is first to define the ring where your polynomial will live, namely Polynomial Ring in the undeterminate x
over the finite field of size 3, $\mathbf[F}_3[x]$:$\mathbf{F}_3[x]$:
sage: R.<x> = GF(3)[]
This defines both R
and x
:
sage: R
Univariate Polynomial Ring in x over Finite Field of size 3
sage: x
x
sage: x.parent()
Univariate Polynomial Ring in x over Finite Field of size 3
Then, you can do:
sage: P = x^8+x^2+1
sage: P.is_irreducible()
False
sage: P.factor()
(x + 1) * (x + 2) * (x^3 + 2*x + 1) * (x^3 + 2*x + 2)
3 | No.3 Revision |
The trick is first to define the ring R
where your polynomial will live, namely Polynomial Ring in the undeterminate x
over the finite field of size 3, $\mathbf{F}_3[x]$:
sage: R.<x> = GF(3)[]
This defines both R
and x
:
sage: R
Univariate Polynomial Ring in x over Finite Field of size 3
sage: x
x
sage: x.parent()
Univariate Polynomial Ring in x over Finite Field of size 3
Then, you can do:
sage: P = x^8+x^2+1
sage: P.is_irreducible()
False
sage: P.factor()
(x + 1) * (x + 2) * (x^3 + 2*x + 1) * (x^3 + 2*x + 2)