Is it true that no polynomial (with the exception of constant polynomial) have an inverse in $\mathbb Z/p\mathbb Z$ (where p is prime)?

I was solving the following exercise:

Find the inverse of $$p(x) = 1 + x$$ in $$R[x]$$ over $$\mathbb Z/5\mathbb Z$$ or show that it does not exist.

and finding that it does not exist because if there is a polynomial $$q(x)$$ such that $$p(x)q(x)=1$$. Which will contradict the proposition:

Let $$R$$ be a commutative ring. For every pair of non-zero polynomials $$p$$ and $$q$$ in $$R[x]$$, if the leading coefficient of $$p$$ or $$q$$ is not a zero divisor in $$R$$ then $$\deg(pq)=\deg(p)+\deg(q)$$

my question is it safe to assume that there does not exist an inverse of polynomial of $$\deg>0$$ over $$\mathbb Z/p\mathbb Z$$ where $$p$$ is a prime number?

• I'm confused. You seem to have proved a statement while, at the same time, you are asking whether you can safely assume that the statment is true. – José Carlos Santos Apr 2 at 14:55
• What does "inverse" mean here? Do you mean "reciprocal"? Then, sure. Do you mean "inverse function"? Well, then $q(x)=x-1$ works. – lulu Apr 2 at 15:02
• @lulu I think it's clear from "$p(x)q(x)=1$" that OP means multiplicative inverse. – cansomeonehelpmeout Apr 2 at 15:03
• @cansomeonehelpmeout Well, I think it's clear that the OP approached the problem from that point of view. But was that what was intended? Seems an odd phrasing. Why multiplicative inverse? Additive inverse is simpler. – lulu Apr 2 at 15:13

Yes it is true, this is because $$\deg(PQ)=\deg(P)+\deg(Q)$$ for nonzero polynomials, so both summands must be $$0$$.
Well, for any polynomials $$f,g\in R[x]$$, where $$R$$ is an integral domain (i.e., has no zero divisors), the degree formula $$\deg(f\cdot g) = \deg(f)+\deg(g)$$ holds, since the highest terms do not cancel.
Thus if $$f$$ is a unit in $$R[x]$$, then $$f\cdot g =1$$ for some $$g\in R[x]$$. Then $$0 =\deg (1) = \deg(f\cdot g) =\deg(f) + \deg(g)$$. Since the degrees are nonnegative it follows that $$\deg(f)=0$$ and so $$f$$ is invertible in $$R$$. Done.