union of infinitely many prime ideals Consider a noetherian ring $R$ and a collection $m_i$, $i\in I$ of maximal ideals of $R$. Let $P$ be a prime ideal of $R$.  It is well-known that if the collection is finite (i.e. the index set $I$ is finite), then $P\subseteq \cup_{i\in I}m_i$ if and only if $P$ is contained in one of the $m_i$. (This is true under weaker assumptions.)
Now my question is what about the case of an infinite collection. Does the same hold (under suitable assumptions, e.g. $R$ is normal integral, etc.)? Or can anyone give a counter-example? 
 A: As another counterexample, take any noetherian local ring $(R,\mathfrak{m})$ of dimension $>1$, such that $\mathfrak{m}\not\in\mathrm{Ass}(R)$. Then $\mathfrak{m}$ is subset of the union of all non maximal prime ideals, because any $x\in\mathfrak{m}$ lies in a prime ideal of height $\leq1$.
A: As an addition to the answers already given, let me mention the interesting paper Baire's category theorem and prime avoidance in complete local rings by Sharp and Vamos (Arch. Math. 44 (1985), 243-248). Beside other things, it contains the following:


*

*A neat proof of Burch's Lemma (cf. the answer by Neil Epstein) on use of Baire's category theorem.

*An example showing that in Burch's Lemma the hypothesis of completeness cannot be omitted; this is essentially the same as the example given by Mahdi Majidi-Zolbanin.

*A noetherian local ring with uncountable residue field has countable avoidance (i.e., if an ideal is contained in the union of a countable family of ideals (not necessarily prime!) then it is contained in one of these ideals); this can be viewed as a generalisation of a special case of the Hochster-Huneke result mentioned by Neil.
A: I fixed your notation so that there wasn't any equivocation. I changed $P_i$ to $m_i$, changed the ideal $I$ to $P$, and kept the set $I$ as $I$.
There is indeed a counterexample. Take $R=\mathbb C[x,y]$, the prime ideal $P=(x,y)$ is not contained in any of the ideals $m_{a,b}=(x-a,y-b)$ for $(a,b)$ not both $0$, since $P$ is also a maximal ideal. Yet every element of $P$ is contained in at least one of the $m_i$, because there is no polynomial function on $\mathbb A^2$ that vanishes on one point but not any other point. Thus $P \subset \bigcup_i m_i$.
A: On a related note, however, there are some important classes of rings $R$ where countable prime avoidance holds.  That is, when an ideal $J$ is a subset of a countable union of prime ideals in such a ring, it has to be contained in a single element of the collection.  In particular, $R$ satisfies countable prime avoidance if either:


*

*$R$ contains an uncountable field, or

*$R$ is a complete Noetherian local ring.
Case 1 was mentioned in an article by Hochster and Huneke in the Michigan Math. Journal in 2000. Case 2 was proved by Lindsay Burch in 1972.  Both arguments are fairly straightforward.
I learned these things from the Hochster-Huneke article some years back.
A: I came across your question asking myself, when a prime ideal $P$ is a minimal prime ideal of a principal ideal. This is clearly equivalent to $P$ being strictly larger than the union of all prime ideals $Q \subsetneqq P$, which leads to the question after generalizations of prime avoidance.
I also found this article by Chen (Infinite prime avoidance, 2017) giving some results that might be interesting for you:
https://arxiv.org/pdf/1710.05496
