# Proof for prime avoidance lemma.

In an homework of mine, I gave the following proof for the prime avoidance lemma, i.e the lemma saying if $R$ is a commutative ring and $I$ an ideal of $R$ and $$I \subseteq \bigcup_{i=1}^{n} P_i$$ for a finite collection a finite collection of prime ideals $\{P_1,...,P_n \}$, then $I \subseteq P_i$ for some $i$. I got full points on the proof, but afterwards I discovered what seem to be a mistake. My conclusion in the proof is that $I$ is contained in $T_k$ for some $k$ (see below), but this is not true! Since $T_k$ does not include $0$. Is there a mistake in my proof? I really cant find it and neither could my teacher, but the conclusion is obvivously false!

This is the proof I gave:

We proceed by induction on the number of prime ideals. If $n=1$, the result is trivial. Now, suppose the result is true for $n-1$ primes. Now, let $I$ be an ideal such that $I \subseteq P_1 \cup...\cup P_n$. For each $k=1,...,n$ define the set $$T_k := (\bigcup_{i=1}^{n} P_i) \setminus P_k.$$ Now, assume $I$ is not contained in $T_k$ for any $k$, otherwise removing $P_k$ from the union would let us apply the induction hypothesis. Furthermore, pick an element $x_k \in I \setminus T_k$ for each $k$ (so that $x_k$ is contained in $P_k$ but no other $P_i$)

Let $a =x_1 + \prod_{j=2}^{n} x_j$, since $x_k \in I$ it follows that $a \in I$. Moreover, $a \notin P_1$ because if $a \in P_1$ then so is $a-x_1$ so that one factor in $\prod_{j=2}^{n} x_j$ is in $P_1$ which is a contradiction. I claim that $a \notin P_k$ for $k \geq 2$. Suppose $a \in P_i$ for some $i$, then $$-x_1 = \prod_{j=2}^{n} x_j-a \in P_i.$$ So, $a \notin P_k$ for any $k$, but this is a contradiction since $a \in I \subseteq P_1 \cup...\cup P_n$. Hence the assumption is not true, so we can remove one ideal from the union and apply the induction hypothesis.

If you define $T_k$ to be $\bigcup_{i\neq k}\,P_i$, then everything is good. If you want to know why your definition of $T_k$ doesn't work, then look at "Now, assume $I$ is not contained in $T_k$ [...]." You can't derive a contradiction from here since $I$ is never contained in any $T_k$ (in your definition).
Your conclusion (so that $x_k$ is contained in $P_k$ but no other $P_i$ is wrong, take for example $x_k=0$, You have $I-T_k=I\cap (\bigcap_i \bar{P_i}\cup P_k)$.