Checking if given polynomials are units in $\mathbb{Z}_7[x]$ [duplicate]

Let $f=\sum_{k=0}^n a_kX^k$ and $g= \sum_{k=0}^m b_kX^k$. If $f g=1$, then clearly $a_0,b_0$ are units and:

$$a_nb_m=0 \tag1$$
$$a_{n-1}b_m+a_nb_{m-1}=0$$

(on multiplying both sides by $a_n$)

$$\Rightarrow (a_n)^2b_{m-1}=0 \tag2$$
$$a_{n-2}b_m+a_{n-1}b_{m-1}+a_nb_{m-2}=0$$ (on multiplying both sides by $(a_n)^2$) $$\Rightarrow (a_n)^3b_{m-2}=0 \tag3$$ $$.....$$ $$.....+a_{n-2}b_2+a_{n-1}b_1+a_nb_0=0$$ (on multiplying both sides by $(a_n)^m$) $$\Rightarrow (a_n)^{m+1}b_{0}=0 \tag{m+1}$$

Since $b_0$ is an unit, it follows that $(a_n)^{m+1}=0$.

Hence, we proved that $a_n$ is nilpotent, but this is enough. Indeed, since $f$ is invertible, $a_nx^n$ being nilpotent implies that $f-a_nX^n$ is unit and we can repeat (or more rigorously, perform induction on $\deg(f)$).


If $R$ is a domain then easily $f(X)$ a unit implies that $a_i = 0$ for $i>0$. Now $R\to R/\mathfrak p$, for $\mathfrak p$ prime, reduces to the domain case, yielding that the $a_i$, $i>0$ are in every prime ideal. But the intersection of all prime ideals is the nilradical, the set of all nilpotent elements - as you proved a few days ago.

Remark $ $ This is a prototypical example of reduction to domains by factoring out prime ideals.