Suppose I have a finite field $\mathbb{F}_{13}$ and I would like to adjoin an element, $\zeta$, with order $3$, since $\mathbb{F}_{13}$ does not contain one. So consider $\mathbb{F}_{13}(\zeta)$. Then $\zeta$ is a solution to $x^3 - 1 \equiv (x - 1)(x^2 + x + 1) \equiv 0 \mod p$ and so $\zeta$ is a solution to $x^2 + x + 1$.
Then $((\zeta - 1)\zeta)^2 \equiv \zeta^2 + \zeta + 11 \equiv \zeta^2 + \zeta + 1 + 10 \equiv 0 + 10 \equiv -3 \mod 13$.
sage: R = PolynomialRing(GF(13),'x')
sage: x = R.gen()
sage: S = R.quotient(x^3 - 1, 'zeta')
sage: zeta = S.gen()
sage: expand ((zeta - 1)*zeta)^2
sage: ((zeta - 1)*zeta)^2 == -3
zeta^2 + zeta + 11
False
Although SAGE recognizes the expansion, it does not recognize that the expansion can be reduced (mod 13) to -3. Is there something wrong with my code or this a limitation of computer algebra systems?
What you have defined is ${\mathbb F}_{13}[x]/(x^3 - 1)$. This is not a field, since $x^3 - 1$ is reducible over ${\mathbb F}_{13}$. Instead $${\mathbb F}_{13}[x]/(x^3 - 1) \cong {\mathbb F}_{13}[x]/(x-1) \times {\mathbb F}_{13}[x]/(x-3) \times {\mathbb F}_{13}[x]/(x - 9) \cong {\mathbb F}_{13}^3.$$ This is similar to ${\mathbb C}[x]/(x^2+1)$, which is isomorphic to ${\mathbb C}^2$.
In Sage you could do
and it will come up with