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 "P""i"'s, then it is contained in "P""i" 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 formula_1 be ideals such that formula_2 are prime ideals for formula_3. If "E" is not contained in any of formula_2's, then "E" is not contained in the union formula_5.
Proof by induction on "n": The idea is to find an element that is in "E" and not in any of formula_2's. The basic case "n" = 1 is trivial. Next suppose "n" ≥ 2. For each "i", choose
where the set on the right is nonempty by inductive hypothesis. We can assume formula_8 for all "i"; otherwise, some formula_9 avoids all the formula_2's and we are done. Put
Then "z" is in "E" but not in any of formula_2's. Indeed, if "z" is in formula_2 for some formula_14, then formula_15 is in formula_2, a contradiction. Suppose "z" is in formula_17. Then formula_18 is in formula_17. If "n" is 2, we are done. If "n" > 2, then, since formula_17 is a prime ideal, some formula_21 is in formula_17, 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 formula_23's; since otherwise we can use the inductive hypothesis.
Also, if formula_24 for each "i", then we are done; thus, without loss of generality, we can assume formula_25. By inductive hypothesis, we find a "y" in "J" such that formula_26. If formula_27 is not in formula_28, we are done. Otherwise, note that formula_29 (since formula_25) and since formula_28 is a prime ideal, we have:
Hence, we can choose formula_33 in formula_34 that is not in formula_28. Then, since formula_36, the element formula_37 has the required property. formula_38
Application.
Let "A" be a Noetherian ring, "I" an ideal generated by "n" elements and "M" a finite "A"-module such that formula_39. Also, let formula_40 = the maximal length of "M"-regular sequences in "I" = the length of "every" maximal "M"-regular sequence in "I". Then formula_41; this estimate can be shown using the above prime avoidance as follows. We argue by induction on "n". Let formula_42 be the set of associated primes of "M". If formula_43, then formula_44 for each "i". If formula_45, then, by prime avoidance, we can choose
for some formula_47 in formula_48 such that formula_49 = the set of zerodivisors on "M". Now, formula_50 is an ideal of formula_51 generated by formula_52 elements and so, by inductive hypothesis, formula_53. The claim now follows.