In most of books on elementary algebra, intermediate algebra and college algebra, the degree of the non-zero polynomial $$f(x)=a_nx^n+\cdots a_1x+a_0$$ with $a_n\neq 0$ is defined to be $n$.
But I am not sure this is well defined. Namely, shall we prove to the students that if the same $f(x)$ has another expression $b_mx^m+\cdots+b_1x+b_0$ with $b_m\neq 0$, then $m=n$ before we can actually define the degree of the polynomial? Otherwise we say we are defining the degree but the definition is illogical.
It seems to be that at the level of elementary algebra, intermediate algebra and college algebra, this proof may be a bit too complicated to the students. On the other hand, without the proof the definition of the degree of polynomials is not even logically established.
For context to make this question relevant and on topic, adding a comment from the OP, below: "I am not asking about how to define the degree rigorously but how to teach the definition to the students."