Let $f :R \to S$ be a surjective ring homomorphism , $M$ be a maximal ideal of $S$ , I am writing a proof showing $f^{-1}(M)$ is a maximal ideal of $R$ , Please verify whether it is correct or not .
Proof :- Let $J$ be an ideal such that $f^{-1}(M) \subset J \subseteq R$ , we want to show $J=R$ i.e. $R \subseteq J$. Now as $f$ is surjective , $M=f(f^{-1}(M)) \subseteq f(J) \subseteq S$ . As $f$ is surjective , $f(J)$ is an ideal of $S$ . Now if it were possible that $M=f(J)$ , then $x \in J \implies f(x) \in f(J)=M \implies x \in f^{-1}(M)$ , so $J \subseteq f^{-1} (M)$ ,contarry to our assumption $f^{-1}(M) \subset J$ . Thus $M \ne f(J)$ , $f(J)$ is an ideal of $S$ containing $M$ ; since $M$ is maximal ideal in $S$ , so $f(J)=S$ . Then $x \in R \implies f(x) \in S=f(J) \implies \exists j \in J : f(x)=f(j) \implies f(x-j)=0_S \in M $
$\implies x-j \in f^{-1} (M) \subset J \implies x=x-j+j \in J$ , so $R \subseteq J$
Is the proof correct . Please comment .