I am trying to understand the following example that shows that the polynomial division theorem doesn't hold when the coefficients aren't from a field $F$.
So the statement is that it $F$ isn't a field (let's say it's a ring as it is in the example), then if $f,g\in F[x]$, the representation $f=gq+r, \deg(r)<\deg(g)$ isn't unique. And the example is $$f=\overline3x^3\in\mathbb{Z}_6,g=\overline3x^2-\overline1\in\mathbb{Z}_6$$ $$f=\overline3x^3=(\overline3x^2-\overline1)(x+\overline2)+\overline3x+\overline3=g(x+\overline2)+\overline3x+\overline3$$ $$f=(\overline3x^2-\overline1)(x+\overline4)+x+\overline4=g(x+\overline4)+x+\overline4$$
They are trying to show that $q$ and $r$ are not uniquely defined, so we can find many $q$ and $r$. I don't understand the aritmetic in $\mathbb{Z}_6$, though. Isn't $$(\overline3x^2-\overline1)(x+\overline2)+\overline3x+\overline3=\overline3x^3+\overline6x^2-\overline1x-\overline2+\overline3x+\overline3=\\=\overline3x^3+\overline2x+\overline1\ne f$$ How is this equal to $f$?