In Algebra by Hungerford, page 237 the sketch of proof for Theorem 1.10:
Theorem 1.10: If $K$ is a field and $f\in K[x]$ polynomial of degree $n$, then there exists a simple extension field $F = K(u)$ of $K$ such that $u\in F$ is a root of $f$.
In the proof I could not understand one part:
Let $\pi:K[x]\to K[x]/(f) = F$ be the canonical projection, then $f(\pi(x)) = 0$
I understand all the theorems before this point and every sentence until this one. If I understood correctly, $\pi$ maps $g(x)$ to $r(x)$ where $g = fs+r$ by division algorithm. I can only see why $\pi(f) = 0$ but I cannot see why $f(\pi(x)) = 0$. Some explanation please. Thank you.
EDIT: Also I don't know how to prove that $F = K(\pi(x))$.
The canonical $\,K$- homomorphism we're talking about is (check that the following stuff follows from the basic definition of operations in quotient rings!):
$$\pi(p(x))=\pi\left(\sum_{i=0}^m c_ix^i\right):=\left(\sum_{i=0}^mc_i\,x^i\right)+(f)=\sum_{i=0}^mc_i\left(x^i+(f)\right)=$$
$$=\sum_{i=0}^mc_i\left(x+(f)\right)^i=p(\pi(x))$$