Prime avoidance lemma

In algebra, the prime avoidance lemma says that if an ideal I in a commutative ring R is contained in a union of finitely many prime ideals Pi's, then it is contained in Pi for some i.

There are many variations of the lemma (cf. Hochster); for example, if the ring R contains an infinite field or a finite field of sufficiently large cardinality, then the statement follows from a fact in linear algebra that a vector space over an infinite field or a finite field of large cardinality is not a finite union of its proper vector subspaces.

Statement and proof
The following statement and argument are perhaps the most standard.

Statement: Let E be a subset of R that is an additive subgroup of R and is multiplicatively closed. Let $$I_1, I_2, \dots, I_n, n \ge 1$$ be ideals such that $$I_i$$ are prime ideals for $$i \ge 3$$. If E is not contained in any of $$I_i$$'s, then E is not contained in the union $$\cup I_i$$.

Proof by induction on n: The idea is to find an element that is in E and not in any of $$I_i$$'s. The basic case n = 1 is trivial. Next suppose n ≥ 2. For each i, choose
 * $$z_i \in E - \cup_{j \ne i} I_j$$

where the set on the right is nonempty by inductive hypothesis. We can assume $$z_i \in I_i$$ for all i; otherwise, some $$z_i$$ avoids all the $$I_i$$'s and we are done. Put
 * $$z = z_1 \dots z_{n-1} + z_n$$.

Then z is in E but not in any of $$I_i$$'s. Indeed, if z is in $$I_i$$ for some $$i \le n - 1$$, then $$z_n$$ is in $$I_i$$, a contradiction. Suppose z is in $$I_n$$. Then $$z_1 \dots z_{n-1}$$ is in $$I_n$$. If n is 2, we are done. If n > 2, then, since $$I_n$$ is a prime ideal, some $$z_i, i < n$$ is in $$I_n$$, a contradiction.

E. Davis' prime avoidance
There is the following variant of prime avoidance due to E. Davis.

Proof: We argue by induction on r. Without loss of generality, we can assume there is no inclusion relation between the $$\mathfrak{p}_i$$'s; since otherwise we can use the inductive hypothesis.

Also, if $$x \not\in \mathfrak{p}_i$$ for each i, then we are done; thus, without loss of generality, we can assume $$x \in \mathfrak{p}_r$$. By inductive hypothesis, we find a y in J such that $$x + y \in I - \cup_1^{r-1} \mathfrak{p}_i$$. If $$x + y$$ is not in $$\mathfrak{p}_r$$, we are done. Otherwise, note that $$J \not\subset \mathfrak{p}_r$$ (since $$x \in \mathfrak{p}_r$$) and since $$\mathfrak{p}_r$$ is a prime ideal, we have:
 * $$\mathfrak{p}_r \not\supset J \, \mathfrak{p}_1 \cdots \mathfrak{p}_{r-1}$$.

Hence, we can choose $$y'$$ in $$J \, \mathfrak{p}_1 \cdots \mathfrak{p}_{r-1}$$ that is not in $$\mathfrak{p}_r$$. Then, since $$x + y \in \mathfrak{p}_r$$, the element $$ x + y + y'$$ has the required property. $$\square$$

Application
Let A be a Noetherian ring, I an ideal generated by n elements and M a finite A-module such that $$IM \ne M$$. Also, let $$d = \operatorname{depth}_A(I, M)$$ = the maximal length of M-regular sequences in I = the length of every maximal M-regular sequence in I. Then $$d \le n$$; this estimate can be shown using the above prime avoidance as follows. We argue by induction on n. Let $$\{ \mathfrak{p}_1, \dots, \mathfrak{p}_r \}$$ be the set of associated primes of M. If $$d > 0$$, then $$I \not\subset \mathfrak{p}_i$$ for each i. If $$I = (y_1, \dots, y_n)$$, then, by prime avoidance, we can choose
 * $$x_1 = y_1 + \sum_{i = 2}^n a_i y_i$$

for some $$a_i$$ in $$A$$ such that $$x_1 \not\in \cup_1^r \mathfrak{p}_i$$ = the set of zero divisors on M. Now, $$I/(x_1)$$ is an ideal of $$A/(x_1)$$ generated by $$n - 1$$ elements and so, by inductive hypothesis, $$\operatorname{depth}_{A/(x_1)}(I/(x_1), M/x_1M) \le n - 1$$. The claim now follows.