To refresh everyone, the following picture from Pinter's "A Book of Abstract Algebra" details the proof for the theorem that Every Ideal of $F[x]$ is Principal:
This strategy is pretty common, so I have seen it plenty of times. However, my question arises from the fact that:
$\operatorname{deg}(0)$ is undefined
i.e. the degree of the $0$ polynomial is undefined. As such, it almost feels like this proof is comparing oranges to apples...in the sense that it feels like it is saying:
Well, if the $r(x)$ polynomial has this property (i.e. $\neq 0$), its degree is a number that would be contradictory...so, it must be this other thing, whose degree is 'undefined'.
Is something that is undefined still "a number"? Or is it something that is entirely "non-number"? How exactly does one logically evaluate this? Any clarification would be greatly appreciated!
Edit: Another way of reframing this question is:
How does one compare an assumption that describes a numerical property to an object that has an undefined numerical property? i.e. $b(x)$ is described as having some $n \in \mathbb Z$ degree that must be the smallest number...how am I supposed to compare an undefined number (i.e. $\operatorname{deg} (r(x)=0))$ to this $n$?
If I cannot make this comparison, how can I decide whether or not it is a contradiction?

The proof is fine - it's meant (though not explicitly stated) that $b(x)$ has the lowest degree among non-zero polynomials, which avoids that issue at that point in the proof. The later part of the proof never references $\deg 0$ - note that it quotes the remainder theorem in the following sense:
Observe that there are two alternatives: either $r(x)=0$ or we take its degree to be lesser than that of $b(x)$. It finds out that the second alternative is absurd, and thus concludes the first alternative. It's formally just "We know $A$ or $B$ is true and $B$ is not true. Therefore, $A$ is true."
Note that it's also somewhat common to say that $\deg 0 = -\infty$ to preserve various properties of degree and to make the remainder theorem unconditionally state $\deg r(x) < \deg b(x)$. Then we still want to choose $b(x)$ to have the lowest degree among non-zero polynomials, but when we find out that $\deg r(x) < \deg b(x)$, we immediately know that $r(x)$ is not a non-zero polynomial (i.e. $r(x) = 0$)