If $f : A[X] \to B[X]$ is a ring homomorphism, then what can be said about $\text{deg}[f(P(X))]$? Let $A,B$ be two rings and $f : A[X] \to B[X]$ is a ring homomorphism.
The main question is:

What should be assumed on $f$ (or on $A$ and $B$) so that the degree of a polynomial $P(X) \in A[X]$ equals the degree of the polynomial $f(P(X)) \in B[X]$?

If I take $f=\text{ev}_0 : P \longmapsto P(0)$ then my condition is clearly not satisfied.
If I assume $f(1)=1$, $A = \Bbb Z$ (or $A=\Bbb Q$ I think) and if $f$ is bijective then $f(a_nX^n+...+a_1X+a_0)=a_nf(X)^n+...+a_1f(X)+a_0$ implies that the degree is preserved, I think.
But in general, does bijectivity of $f$ (and $f(1)=1$) is a sufficient condition? I only know that 
$$f(a_nX^n+...+a_1X+a_0)=f(a_n)f(X)^n+...+ f(a_1) f(X)+ f(a_0)$$
If I could show that $f(a) \in B$ for all $a\in A$ then I think that the degree is preserved.
Moreover, is bijectivity a necessary condition (this is just out of curiosity... I didn't found a counterexample)?
Thank you very much!
 A: I first point that you should always assume that $f(1) = 1$, that is part of the definition of a ring morphism.  I will also assume that $A$ and $B$ are commutative (otherwise it gets a little trickier).
Then an obvious necessary condition for $f$ to preserve degree is that $f$ sends constants to constants, meaning that the restriction of $f$ to $A$ is a ring homomorphism from $A$ to $B$ (it is not automatic !). It should also be injective since otherwise you have $a\in A$ such that $f(a)=0$, hence $f(aX)=0$ so degree is not preserved.
Then the second condition is that $f(X)$ has degree $1$, hence $f(X)=aX + b$, with $a,b\in B$ and $a\neq 0$. Then if $P\in A[X]$ has highest-degree term $a_nX^n$, the highest-degree term of $f(P)$ is $f(a_n)a^nX^n$. Since you want this term to be non-zero, it follows that $a$ should not satisfy $xa^n=0$ for any non-zero $x\in A$ and $n\in \mathbb{N}$ (this is clearly satisfied if $a$ is not a zero divisor, and in particular when $B$ is a domain, but this needs not be the case).
On the other hand, if you want $f$ to be invertible, then first obviously you need its restriction to $A$ to be invertible, so $f$ is an isomorphism between $A$ and $B$. You also need $a$ to be invertible, and this is enough, since then you can define its inverse by the inverse of $f_{|A}$ on the elements of $B$, and $f^{-1}(X) = a^{-1}(X-b)$.
In conclusion : for $f$ to preserve degree is equivalent to $f_{ |A}$ being an injective homomorphism from $A$ to $B$, and $f(X) = aX+b$ with $a,b\in B$ and no power of $a$ being annihilated by an element of $f(A)\setminus \{0\}$ ; on the other hand, for $f$ to be bijective is equivalent to $f_{|A}$ being an isomorphism from $A$ to $B$ and $f(X) = aX + b$ with $a,b\in B$ and $a$ invertible. So clearly the second condition is stronger, and they are almost never equivalent (you would need huge restrictions on $A$ and $B$, though it does work for $A=B=\mathbb{Q}$).
A: One necessary condition is that the induced ring homomorphism in degree $0$. $f_0\colon A\to B$ is injective. This allows us to consider $A$ as a subring of $B$ from now on.
Another necessary condition is that $f(X)=b_1X+b_0$ with $b_1\ne 0$.
As an implication we have $f(a_nX^n+\ldots+a_0)=a_nb_1^nX^n+\ldots$, so what we additionally need is that multiplication with $b_1^n$ is injective on $A$. This is most easily achieved if $B$ has no divisors of zero at all ...
