a commutative ring statisfying an integer polynomial Let $p(X)\in\mathbb{Z}[X]$ be a monic polynomial and let $A$ be a commutative ring in which every element is a zero of $p(X)$. 
Prove that all prime ideals in $A$ are maximal.

By definition, give any prime ideal $I\leq A$, we are left to prove $A/I$ is field, i.e., for any $a\not\in I$, we want to find a nonzero element $z\in A$, such that $az-1\in I$.
$p(0)=0$ implies $p(X)=X^k(X^l+a_{l-1}X^{l-1}+\cdots+a_1X+a_0)$, such that $k\geq 1, a_0\neq 0$.
If $l=1$, then $p(a)=0, p(1)=0$ implies $a^k(a+a_0)=0,1+a_0=0$, so we can take $z=1$.
If $l\geq 2$, then $p(1+az)=0,\forall z\in A$, but how to proceed? 
I have tried to use $\frac{p(x)-p(y)}{x-y}$ is also a polynomial with integers also in $\mathbb{Z}$, but got stuck, any hint?
 A: By hypothesis the unique morphism $f:\mathbb Z\to A$ makes $A$ integral over $\mathbb Z$.
Let $\ker(f)=n\mathbb Z $.
If $n\neq 0$, we have an inclusion of rings $\bar f:\mathbb Z/n\mathbb Z \hookrightarrow A$ with $A$ integral over $\mathbb Z/n\mathbb Z$, so that [Qing Liu, Prop. 2.5.10 (b)] $\dim(A)=\dim(\mathbb Z/n\mathbb Z)=0$,   which means that all prime ideals in $A$ are maximal.   
And the worrying case $n=0$ ?  It fortunately cannot happen because it is already impossible that all elements of the subring $ f(\mathbb Z)\cong \mathbb Z$ of $A$ be roots of some non-zero polynomial in $\mathbb Z[X]$  
Note carefully
It is perfectly posssible for $A$ to satisfy the hypothesis of the question and be (hugely) infinite.
For example every element of $(\mathbb Z/2\mathbb Z)^{\mathbb R}$ is a zero of $p(X)=X^2-X$
A: Let $I$ be a prime ideal and let $F:=A/I$.
Thus $F$ is a domain and want to show that $F$ is a field.
From $p\in\mathbb Z[X]$ we obtain $\overline p\in F[X]$ with $\overline p(a)=0$ for all $a\in F$.
Since $p$ is monic, so is $\overline p$, especially,  $\overline p\ne 0$.
Let $q\in F[X]\setminus\{0\}$ be of minimal degree among all nontrivial polynomials with $q(a)=0$ for all $a\in F$. (We only need $\overline p$ for the existence of such $q$).
From $q(0)=0$ we see that $q=X r $ for some $r\in F[X]\setminus\{0\}$. 
Since $F$ is a domain, we have $r(a)=0$ for all $a\ne 0$.
By minimality of $q$, we conclude $r(0)\ne 0$, i.e. $r=Xs-c$ with $s\in F[X]$ and $c\in F\setminus\{0\}$.
Thus $a\cdot s(a)=c$ for all $a\ne 0$.
By substituting $ac$ for $a$, we find  $ac\cdot s(ac)=c$ and hence $a\cdot s(ac)=1$ for all $a\ne 0$, i.e $F$ is indeed a field.
