Maximal ideals of some localization of a commutative ring

If $R$ is commutative ring, $P_1, P_2, \dots, P_n$ prime ideals of $R$ with the property $P_i \not\subseteq \bigcup _{j \not = i} P_j$, $\forall 1\le i\le n$, and $S:=R\setminus(P_1 \cup \cdots \cup P_n)$, then show: $$S^{-1}R \text{ has exactly } n \text{ maximal ideals}.$$

Definition. $S^{-1}R=${${r \over s} : r \in R , s \in S$}.

-
Try to use this: the prime ideals of $S^{-1}R$ are of the form $S^{-1}P$, where $P$ is a prime ideal of $R$ with $P\cap S=\emptyset$. –  user26857 Nov 26 '12 at 17:16
Note, that "definition" of $S^{-1}R$ is incomplete. There is no meaning for $\frac{r}{s}$ You have to be more specific (and show some properties of $S$) to prove that $S^{-1}R$ is a well-defined ring. –  Thomas Andrews Nov 26 '12 at 17:19
$S^{-1} R$ is well-definitenes it is not important for me, i want to count maximal ideals of $S^{-1}R$ –  mshj Nov 26 '12 at 17:33
If $S^{-1}R$ is not well-defined how can you talk about maximal ideals? –  JSchlather Nov 26 '12 at 17:58
I am confused as to why $S^{-1}R$ is not well-defined. $S$ is the intersection of multiplicative subsets, hence clearly multiplicative. So $S^{-1}R$ is a well defined ring right? –  Rankeya Nov 26 '12 at 21:31

Using the result mentioned by YACP in the comments, the problem reduces to proving: If an ideal $I$ contained in a union of prime ideals $P_i$, then $I$ is contained in one of the $P_i$.

We can prove that result by induction on $n$. The case $n=1$ is clear. For the inductive step, if $I$ is contained in a union of less than $n$ of the $P_i$, then the result holds by induction. Otherwise, for every $i$ there exists an element $x_i \in I$ which is in $P_i$ but not in any $P_j$ for $j \ne i$. Then the element $x = x_1 + x_2 x_3 \ldots x_n$ is in $I$, but cannot be in any of the $P$'s (why not?): contradiction.

(Do you see where we used the fact that the $P_i$ are prime?)

-
yes. I fixed it. –  Ted Nov 26 '12 at 17:40
thank you ${}{}{}$ –  mshj Nov 26 '12 at 17:45

Using the prime correspondence in localizations which has already been mentioned, and Prime avoidance, we can show that the maximal ideals are exactly the $S^{-1}P_i$.

Suppose $J$ is any ideal strictly containing a $P_j$. We claim that $J\cap S\neq \emptyset$. If it were otherwise, then $J\subseteq \cup_i P_i$, and by prime avoidance, $J$ must be contained in a $P_j$. Obviously $J$ is not contained in $P_i$, so $J\subseteq \cup_{j\neq i}P_j$. But then $P_i\subset J\subseteq \cup_{j\neq i}P_j$, a contradiction. The upshot of this is that the union hypothesis forces ideals strictly containing any $P_j$ to hit $S$ and therefore explode in the localization.

You now apply this to show that each $S^{-1}P_i$ is maximal in $S^{-1}R$. If $P_i$ were not maximal, then a maximal ideal sitting above $P_i$ would contract to a prime ideal strictly containing $P_i$, but such an ideal can't be proper, as we've seen.

You now have at least $n$ maximal ideals of $S^{-1}R$. All that remains is to show there are no more.

If $M$ is maximal in $S^{-1}R$, it contracts to a prime $Q$ in $R$ such that $Q\cap S=\emptyset$. Thus $Q\subseteq \cup P_i$ and by prime avoidance $Q\subseteq P_i$ for some $i$. It follows that $S^{-1}Q=M=S^{-1}P_i$ by maximality of $M$, and we have indeed only $n$ maximal ideals.

-