# Commutative Algebra/Basics on prime and maximal ideals and local rings
## Prime ideals

Definition 12.1:
Let $R$ be a ring. A prime ideal $p$ is an ideal of $R$ such that whenever $ab\in p$, either $a\in p$ or $b\in p$.
Lemma 12.2:
Let $R$ be a ring and $I\leq R$ an ideal. $I$ is prime if and only if $R/I$ is an integral domain.
Proof:
$I$ prime is equivalent to $ab\in I\Rightarrow a\in I\vee b\in I$. This is equivalent to
    $ab+I=0+I\Rightarrow a+I=0+I\vee b+I=0+I$.$\Box$
Theorem 12.3:
Let $S\subseteq R$ be multiplicatively closed. Then there exists a prime ideal not intersecting $S$.
Proof:
Order all ideals of $R$ not intersecting $S$ by set inclusion, and let a chain
    $I_{1}\subseteq I_{2}\subseteq \cdots \subseteq I_{k}\subseteq \cdots$
be given. The ideal
    $I:=\bigcup _{k\in \mathbb {N} }I_{k}$
(this is an ideal, since $a,b\in I\Rightarrow a\in I_{m},b\in I_{n}\Rightarrow a,b\in I_{\max\{m,n\}}$, hence $a+b\in I$, $ra\in I$) is an upper bound of the chain, since $I$ cannot intersect $S$ for else one of the $I_{k}$ would intersect $S$. Since the given chain was arbitrary, Zorn's lemma implies the existence of a maximal ideal among all ideals not intersecting $S$. This ideal shall be called $J$; we prove that it is prime.
Let $ab\in J$, and assume for contradiction that $a\notin J$ and $b\notin J$. Then $\langle a\rangle +J$, $\langle b\rangle +J$ are strict superideals of $J$ and hence intersect $S$, that is,
    $s=xa+yj$,
    $t=zb+wj'$,
$s,t\in S$, $x,y,z,w\in R$, $j,j'\in J$. Then $S\ni st=xzab+yzbj+xawj'+ywjj'\in J$, contradiction.$\Box$

## Projection to the quotient ring

In this section, we want to fix a notiation. Let $R$ be a ring and $I\leq R$ an ideal. Then we may form the quotient ring $R/I$ consisting of the elements of the form $r+I$, $r\in R$. Throughout the book, we shall use the following notation for the canonical projection $r\mapsto r+I$:
Definition 12.4:
Let $I\leq R$ an ideal. The map
    $\pi _{I}:R\to R/I,\pi _{I}(r):=r+I$
is the canonical projection of $R$ to $R/I$.

## Maximal ideals

Definition 12.5:
Let $R$ be a ring. A maximal ideal $m$ of $R$ is an ideal that is not the whole ring, and there is no proper ideal $I\leq R$ such that $m\subsetneq I$.
Lemma 12.6:
An ideal $I\leq R$ is maximal iff $R/I$ is a field.
Proof:
A ring is a field if and only if its only proper ideal is the zero ideal. For, in a field, every nonzero ideal contains $1$, and if $R$ is not a field, it contains a non-unit $a$, and then $\langle a\rangle$ does not contain $1$.
By the correspondence given by the correspondence theorem, $R/I$ corresponds to $R$, the zero ideal of $R/I$ corresponds to $I$, and any ideal strictly in between corresponds to an ideal $K\leq R$ such that $I\subsetneq K\subsetneq R$. Hence, $R/I$ is a field if and only if there are no proper ideals strictly containing $I$.$\Box$
Lemma 12.7:
Any maximal ideal is prime.
Proof 1:
If $R$ is a ring, $m\leq R$ maximal, then $R/m$ is a field. Hence $R/m$ is an integral domain, hence $m$ is prime.$\Box$
Proof 2:
Let $m\leq R$ be maximal. Let $ab\in m$. Assume $a,b\notin m$. Then $1=ra+sn=tb+uk$ for suitable $n,k\in m$, $r,s,t,u\in R$. But then $1=1^{2}=(ra+sn)(tb+uk)=rtab+stbn+rauk+sunk\in m$.$\Box$
Theorem 12.8:
Let $R$ be a ring and $I\leq R$ an ideal not equal to all of $R$. Then there exists a maximal $m\leq R$ with $I\subseteq m$.
Proof:
We order the set of all ideals $J$ such that $I\subseteq J$ and $J\neq R$ by inclusion. Let
    $J_{1}\subseteq J_{2}\subseteq \cdots \subseteq J_{k}\subseteq \cdots$
be a chain of those ideals. Then set
    $J:=\bigcup _{k\in \mathbb {N} }J_{k}$.
Clearly, all $J_{k}$ are contained within $J$. Since $I\subseteq J_{1}$, $I\subseteq J$. Further, assume $1\in J$. Then $1\in J_{m}$ for some $m$, contradiction. Hence, $J$ is a proper ideal such that $I\subseteq J$, and hence an upper bound for the given chain. Since the given chain was arbitrary, we may apply Zorn's lemma to obtain the existence of a maximal element with respect to inclusion. This ideal must then be maximal, for any proper superideal also contains $I$.$\Box$
Lemma 12.9:
Let $R$ be a ring, $I\leq R$. Then via $\pi _{I}$, maximal ideals of $R$ containing $I$ correspond to maximal ideals of $R/I$.
Proof: From the correspondence theorem.$\Box$

## Local rings

Definition 12.10:
A local ring is a ring that has exactly one maximal ideal.
Theorem 12.11 (characterisation of local rings):
Let $R$ be a ring. The following are equivalent:
* $R$ is a local ring.
* If $a+b$ is a unit, then either $a$ or $b$ is a unit, where $a,b\in R$ arbitrary.
* The set of all non-units forms a maximal ideal.
* If $r_{1},\ldots ,r_{n}\in R$ where $r_{1}+\cdots +r_{n}$ is a unit, then one of the $r_{j}$ is a unit.
* If $r\in R$ is arbitrary, either $r$ or $1-r$ is a unit.
Proof:
1. $\Rightarrow$ 2.: Assume $a$ and $b$ are both non-units. Then $\langle a\rangle$ and $\langle b\rangle$ are proper ideals of $R$ and hence they are contained in some maximal ideal of $R$ by theorem 12.7. But there is only one maximal ideal $m$ of $R$, and hence $a,b\in m$, thus $a+b\in m$. Maximal ideals can not contain units.
2. $\Rightarrow$ 3.: The sum of two non-units is a non-unit, and if $a$ is a non-unit and $r\in R$, $ra$ is a non-unit (for if $sra=1$, $sr$ is an inverse of $a$). Hence, all non-units form an ideal. Any proper ideal of $R$ contains only non-units, hence this ideal is maximal.
3. $\Rightarrow$ 4.: Assume the $r_{j}$ are all non-units. Since the non-units form an ideal, $r_{1}+\cdots +r_{n}$ is contained in that ideal of non-units, contradiction.
4. $\Rightarrow$ 5.: Assume $r$, $1-r$ are non-units. Then $1=r+(1-r)$ is a non-unit, contradiction.
5. $\Rightarrow$ 1.: Let $m,n\leq R$ two distinct maximal ideals. Then $m+n=R$, hence $1=s+t$, $s\in m$, $t\in n$, that is, $s=1-t$. $t$ is not a unit, so $1-t=s$ is, contradiction.$\Box$

## Localisation at prime ideals

In chapter 9, we had seen how to localise a ring at a multiplicatively closed subset $S$. An important special case is $S=R\setminus p$, where $p$ is a prime ideal.
Lemma 12.12:
Let $p\leq R$ be a prime ideal of a ring. Then $S:=R\setminus p\subseteq R$ is multiplicatively closed.
Proof: Let $a,b\notin p$. Then $ab$ can't be in $p$, hence $ab\in S$.$\Box$
Definition 12.13:
Let $p\leq R$ be a prime ideal of a ring. Set $S:=R\setminus p$. Then
    $R_{p}:=S^{-1}R$
is called the localisation of $R$ at $p$.
Theorem 12.14:
Let $R$ be a ring, $p\leq R$ be prime. $R_{p}$ is a local ring.
Proof:
Set $S:=R\setminus p$, then $R_{p}=S^{-1}R$. Set
    $m:=\{r/s|r\in p,s\in S\}\subseteq S^{-1}R$.
All elements of $m$ are non-units, and all elements of $R_{p}\setminus m$ are of the form $r'/t$, $r'\notin p$, $t\in S$ and thus are units. Further, $m$ is an ideal since $p$ is and by definition of addition and multiplication in $S^{-1}R$ and since $S$ is multiplicatively closed. Hence $R_{p}$ is a local ring.$\Box$
This finally explains why we speak of localisation.