[Math] Element in no prime ideal $\iff$ it is a unit

commutative-algebramaximal-and-prime-ideals

I was working through Atiyah & MacDonald, chapter 1 section 1 problem 17 part iii) where it says

Let $R$ be a ring and $f\in R$. Define $V(f)$ to be all elements of $\mathfrak{p}\in\text{Spec}(R)$ with $f\in\mathfrak{p}$. Define $X_f$ to be the complement of $V(f)$ in $\text{Spec}(R)$.

iii) Show $X_f=\text{Spec(R)} \iff$ $f$ is a unit.

I've seen multiple answers regarding this question but, most use $f\notin \mathfrak{p}\,(\forall\mathfrak{p}\in \text{Spec}(R))\iff f\in R^\times$. I haven't been able to find a proof of the above. Does anyone have reference (or proof) of this?

Edit: I would still be interested in a proof that does not involve Zorn's Lemma, if there is one. If the ring is Noetherian the proof stands. However, is there proof of the general case or-counter examples?

Best Answer

Note that if $f$ is in no prime ideals, then it doesn't lie in any maximal ideals either. However, any non-trivial ideal is contained in a maximal ideal (by Zorn's Lemma). Therefore, $\langle f \rangle$ is equal to the whole ring $R$. However, $1\in \langle f \rangle$ implies $1 = fr$ for some $r\in R$, as desired.

According to the first answer of this this MO question and its commentary, the statement that any proper ideal in a unital ring is contained in some prime ideal is equivalent to the Boolean Prime Ideal axiom (weaker than choice) , without which there are unital rings with no prime ideals whatsoever. Any non-unit elements in such a ring would provide a counterexample, so this axiom at least is necessary for the result to be true.