Ideal contained in a finite union of prime ideals

Let $I \subset R$ be an ideal and $P_i$ $(i=\{1,...,n\})$ prime ideals with $I\subseteq\bigcup_{i=1}^nP_i$. Prove that then $I$ is contained in one $P_i$.

I don't know how to show this because I don't have any approach.

So I am looking for something to start with or something like a sequence of tips (Since I know this is a large proof)

Thanks in advance!


Since the Prime Avoidance Lemma appears in virtually every commutative algebra text and thousands of places online, we have been pointing elsewhere rather than posting a solution.

To end this avoidance, here is a community wiki proof of the Prime Avoidance Lemma in notes by Florian Enescu [Source] (I chose it because it was the second google hit, and a little more general than the first hit, which was the wikipedia page.) This version allows $I$ to be a ring contained in $A$, and lets at most two of the $P_i$ be nonprime.


Lemma 2.3. [For a ring $A$, let $I$ be a nonempty subset of $A$] closed under multiplication and addition, and let $P = \{P_1, \ldots, P_n\}$ be a set of ideals in A with all but at most two of them prime. Then $I ⊆ \bigcup_{i=1}^n P_i$ implies $\exists k$ such that $I \subseteq P_k$.

Proof. We proceed with induction on $n$. The case $n = 1$ is clear. Now assume $I$ is not contained in $(\bigcup_{i=1}^n P_i)\setminus P_k=Q_k$ (otherwise, after removing one ideal, one can apply the induction step). Let $x_k \in I \setminus Q_k$. Note that this means that $x_k$ belongs to $P_k$ and does not belong to any $P_i$, $i \neq k$.

Case 1: $n = 2$. Let $y = x_1 + x_2 \in I = P_1 \cup P_2$. If $y \in P_1$ then since $x_1 \in P_1$ we get that $x_2 \in P_1$, a contradiction.

Case 2: $n > 2$. Without loss of generality, let $P_1$ be prime. Set $z = x_1 + x_2 \cdots x_n \in I$. Then $z \notin P_1$ since $x_2, \ldots, x_n \notin P_1$ implies $x_2\cdots x_n \notin P_1$. In fact, each $x_i ∈ P_i$ for $i ≥ 2$, so $z − x_1 ∈ P_i$ for $i ≥ 2$. But since $x_1 \notin P_i$ for $i ≥ 2$ we must also have that $z \notin P_i$ for $i ≥ 2$, a contradiction with $z \in I$.

In conclusion, one cannot choose such elements $x_k$ and hence one of the ideals $P_i$ appears redundantly in the union. By removing it, we get to the case of $n−1$ ideals and the induction step can now be applied.