This document was written in preparation for the oral exam. It mostly follows the way \textsc{Prof. Franke} presented the material in his lecture rather closely.
There are probably errors.
\end{warning}
\noindent The \LaTeX template by \textsc{Maximilian Kessler} is published under the MIT-License and can be obtained from \url{https://github.com/kesslermaximilian/LatexPackages}. % TODO
\subsection{Finitely generated and Noetherian modules}
\begin{definition}[Generated submodule]
Let $R$ be a ring, $M$ an $R$-module, $S \se M$.
Then the following sets coincide
\begin{enumerate}
\item$\left\{\sum_{s \in S'} r_{s}\cdot s ~ |~ S \se S' \text{finite}, r_s \in R, \right\}$
\item$\bigcap_{\substack{S \se N \se M\\N \text{submodule}}} N$
\item The $\se$-smallest submodule of $M$ containing $S$
\end{enumerate}
This subset of $N \se M$ is called the \vocab[Module!Submodule]{submodule of $M $ generated by $S$}. If $N= M$ we say that \vocab[Module!generated by subset $S$]{$ M$ is generated by $S$}.
$M$ is finitely generated $:\iff\E S \se M$ finite such that $M$ is generated by $S$.
\end{definition}
\begin{definition}[Noetherian $R$-module]
$M$ is a \vocab{Noetherian}$R$-module if the following equivalent conditions hold:
\begin{enumerate}
\item Every submodule $N \se M$ is finitely generated.
\item Every sequence $N_0\subset N_1\subset\ldots$ of submodules terminates
\item Every set $\fM\neq\emptyset$ of submodules of $M$ has a $\se$-largest element.
\item Because of 1. we can replace $M'$ by $f(M')$ and assume $0\to M' \xrightarrow{f} M \xrightarrow{p} M'' \to0$ to be exact. The fact about finite generation follows from EInführung in die Algebra.
If $M', M''$ are Noetherian, $N \se M$ a submodule, then $N' \coloneqq f\inv(N)$ and $N''\coloneqq p(N)$ are finitely generated. Since $0\to N' \to N \to N'' \to0$ is exact, $N$ is finitely generated.
\end{enumerate}
\end{proof}
\subsection{Ring extensions of finite type}
\begin{definition}[$R$-algebra]
Let $R$ be a ring. An $R$-algebra $(A, \alpha)$ is a ring $A$ with a ring homomorphism $R \xrightarrow{\alpha} A$.
$\alpha$ will usually be omitted. In general $\alpha$ is not assumed to be injective.\\
\\
An $R$-subalgebra is a subring $\alpha(R)\se A' \se A$.\\
A morphism of $R$-algebras $A \xrightarrow{f}\tilde{A}$ is a ring homomorphism with $\tilde{\alpha}= f \alpha$.
\end{definition}
\begin{definition}[Generated (sub)algebra, algebra of finite type]
P = \sum_{\beta\in\N^m} p_\beta X^{\beta}&\longmapsto\sum_{\beta\in\N^m}\alpha(p_\beta) X^{\beta}
\end{align}
is a ring homomorphism. We will sometimes write $P(a_1,\ldots,a_m)$ instead of $(\alpha(P))(a_1,\ldots,a_m)$.
Fix $a_1,\ldots,a_m \in A^m$. Then we get a ring homomorphism $R[X_1,\ldots,X_m]\to A$. The image of this ring homomorphism is the $R$-subalgebra of $A$\vocab[Algebra!generated subalgebra]{generated by the $a_i$}.
$A$ is \vocab[Algebra!of finite type]{of finite type} if it can be generated by finitely many $a_i \in I$.
For arbitrary $S \se A$ the subalgebra generated by $S$ is the intersection of all subalgebras containing $S$\\
$=$ the union of subalgebras generated by finite $S' \se S$\\
$=$ the image of $R[X_s | s \in S]$ under $P \mapsto(\alpha(P))(S)$.
\end{definition}
\subsection{Finite ring extensions}% LECTURE 2
\begin{definition}[Finite ring extension]
Let $R$ be a ring and $A$ an $R$-algebra. $A$ is a module over itself and the ringhomomorphism $R \to A$ allows us to derive an $R$-module structure on $A$.
$A$\vocab[Algebra!finite over]{is finite over}$R$ / the $R$-algebra $A$ is finite / $A / R$ is finite if $A$ is finitely generated as an $R$-module.
\end{definition}
\begin{fact}[Basic properties of finiteness]
\begin{enumerate}[A]
\item Every ring is finite over itself.
\item A field extension is finite as a ring extension iff it is finite as a field extension.
\item Let $A $ be generated by $a_1,\ldots,a_n$ as an $R$-module. Then $A$ is generated by $a_1,\ldots,a_n$ as an $R$-algebra.
\item Let $A$ be generated by $a_1,\ldots,a_m$ as an $R$-module and $B$ by $b_1,\ldots,b_n$ as an $A$-module.
For every $b$ there exist $\alpha_j \in A$ such that $b =\sum_{j=1}^{n}\alpha_j b_j$. We have $\alpha_j =\sum_{i=1}^{m}\rho_{ij} a_i$ for some $\rho_{ij}\in R$ thus
$b =\sum_{i=1}^{m}\sum_{j=1}^{n}\rho_{ij} a_i b_j$ and the $a_ib_j$ generate $B$ as an $R$-module.
\end{enumerate}
\end{proof}
\subsection{Determinants and Caley-Hamilton}%LECTURE 2 TODO: move to int. elements?
This generalizes some facts about matrices to matrices with elements from commutative rings with $1$.
\footnote{Most of this even works in commutative rings without $1$, since $1$ simply can be adjoined.}
\begin{definition}[Determinant]
Let $A =(a_{ij})\Mat(n,n,R)$. We define the determinant by the Leibniz formula \[
Define $\text{Adj}(A)$ by $\text{Adj}(A)^{T}_{ij}\coloneqq(-1)^{i+j}\cdot M_{ij}$, where $M_{ij}$ is the determinant of the matrix resulting from $A$ after deleting the $i^{\text{th}}$ row and the $j^{\text{th}}$ column.
\end{definition}
\begin{fact}
\begin{enumerate}
\item$\det(AB)=\det(A)\det(B)$
\item Development along a row or column works.
\item Cramer's rule: $A \cdot\text{Adj}(A)=\text{Adj}(A)\cdot A =\det(A)\cdot\mathbf{1}_n$. $A$ is invertible iff $\det(A)$ is a unit.
\item Caley-Hamilton: If $P_A =\det(T \cdot\mathbf{1}_n - A)$\footnote{$T \cdot\mathbf{1}_n -A \in\Mat(n,n,A[T])$}, then $P_A(A)=0$.
\end{enumerate}
\end{fact}
\begin{proof}
All rules hold for the image of a matrix under a ring homomorphism if they hold for the original matrix. The converse holds in the case of injective ring homomorphisms.
Caley-Hamilton was shown for algebraically closed fields in LA2 using the Jordan normal form.
Fields can be embedded into their algebraic closure, thus Caley-Hamilton holds for fields. Every domain can be embedded in its field of quotients $\implies$ Caley-Hamilton holds for domains.
In general, $A$ is the image of $(X_{i,j})_{i,j =1}^{n}\in\Mat(n,n,S)$ where $S \coloneqq\Z[X_{i,j} | 1\le i, j \le n]$ (this is a domain) under the morphism $S \to A$ of evaluation defined by $X_{i,j}\mapsto a_{i,j}$. Thus Caley-Hamilton holds in general.
\end{proof}%TODO: lernen
\subsection{Integral elements and integral ring extensions}%LECTURE 2
\begin{proposition}[on integral elements]\label{propinte}
Let $A$ be an $R$-algebra, $a \in A$. Then the following are equivalent:
is surjective. Thus there are $\rho_{i}=\left( r_{i,j}\right)_{j=1}^n \in R^n$ such that $a b_i = q(\rho_i)$. Let $\fA$ be the matrix with the $\rho_i$ as columns.
Then for all $v \in R^n: q(\fA\cdot v)= a \cdot q(v)$. By induction it follows that $q(P(\fA)\cdot v)= P(a)q(v)$ for all $P \in R[T]$. Applying this to $P(T)=\det(T\cdot\mathbf{1}_n -\fA)$ and using Caley-Hamilton, we obtain $P(a)\cdot q(v)=0$. $P$ is monic. Since $q$ is surjective, we find $v \in R^{n} : q(v)=1$. Thus $P(a)=0$ and $a$ satisfies A.
}
\item[B $\implies$ A] if $R$ is Noetherian.\footnote{This suffices in the exam.}
Let $a \in A$ satisfy B. Let $B$ be a subalgebra of $A$ containing $b$ and finite over $R$. Let $M_n \se B$ be the $R$-submodule generated by the $a^i$ with $0\le i < n$. As a finitely generated module over the Noetherian ring $R$, $B$ is a Noetherian $R$-module. Thus the ascending sequence $M_n$ stabilizes at some step $d$ and $a^d \in M_d$. Thus there are $(r_i)_{i=0}^{d-1}\in R^d$ such that $a^d =\sum_{i=0}^{d-1} r_ia^i$.
\item[A $\implies$ B] Let $a =(a_i)_{i=1}^n$ where all $a_i$ satisfy A, i.e. $a_i^{d_i}=\sum_{j=0}^{d_i -1} r_{i,j}a_i^j$ with $r_{i,j}\in R$. Let $B \se A$ be the sub-$R$-module generated by $a^\alpha=\prod_{i=1}^n a_i^{\alpha_i}$ with $0\le\alpha_i < d_i$.
$B$ is closed under $a_1\cdot$ since \[a_1a^{\alpha}=\begin{cases}
By symmetry, this hold for all $a_i$. By induction on $|\alpha| =\sum_{i=1}^{n}\alpha_i$, $B$ is invariant under $a^{\alpha}\cdot$. Since these generate $B$ as an $R$-module, $B$ is multiplicatively closed. Thus A holds. Furthermore we have shown the final assertion of the proposition.
\end{enumerate}
\end{proof}
\begin{corollary}\label{cintclosure}
\begin{enumerate}
\item[Q] Every finite $R$-algebra $A$ is integral.
\item[R] The integral closure of $R$ in $A$ is an $R$-subalgebra of $A$
\item[S] If $A$ is an $R$-algebra, $B$ an $A$-algebra and $b \in B$ integral over $R$, then it is integral over $A$.
\item[T] If $A$ is an integral $R$-algebra and $B$ any $A$-algebra, $b \in B$ integral over $A$, then $b$ is integral over $R$.
\end{enumerate}
\end{corollary}
\begin{proof}
\begin{enumerate}
\item[Q] Put $ B = A $ in B.
\item[R] For every $r \in R$$\alpha(r)$ is a solution to $T - r =0$, hence integral over $R$.
From B it follows, that the integral closure is closed under ring operations.
\item[S] trivial
\item[T] Let $b \in B$ such that $b^n =\sum_{i=0}^{n-1} a_ib^{i}$. Then there is a subalgebra $\tilde{A}\se A$ finite over $R$, such that all $a_i \in\tilde{A}$.
$b$ is integral over $\tilde{A}\implies\E\tilde{B}\se B$ finite over $\tilde{A}$ and $b \in\tilde{B}$. Since $\tilde{B}/\tilde{A}$ and $\tilde{A}/ R$ are finite, $\tilde{B}/ R$ is finite and $b$ satisfies B.
\end{enumerate}
\end{proof}
\subsection{Finiteness, finite generation and integrality}%some more remarks on finiteness, finite generation and integrality
\begin{fact}[Finite type and integral $\implies$ finite]\label{ftaiimplf}
If $A$ is an integral $R$-algebra of finite type, then it is a finite $R$-algebra.
\end{fact}
\begin{proof}
Let $A $ be generated by $\left( a_i \right)_{i=1}^{n}$ as an $R$- algebra. By the proposition on integral elements (\ref{propinte}), there is a finite $R$-algebra $B \se A$ such that all $a_i \in B$.
We have $B = A$, as $A$ is generated by the $a_i$ as an $R$-algebra.
\end{proof}
\begin{fact}[Finite type in tower]
If $A$ is an $R$-algebra of finite type and $B$ an $A$-algebra of finite type, then $B$ is an $R$-algebra of finite type.
\end{fact}
\begin{proof}
If $A / R$ is generated by $(a_i)_{i=1}^m$ and $B / A$ by $(b_j)_{j=1}^{n}$, then $B /R$ is generated by the $b_j$ and the images of the $a_i$ in $B$.
\end{proof}
{\color{red}
\begin{fact}[About integrality and fields] \label{fintaf}
Let $B$ be a domain integral over its subring $A$. Then $B$ is a field iff $A$ is a field.
\end{fact}
}
\begin{proof}
Let $B$ be a field and $a \in A \sm\{0\}$. Then $a\inv\in B$ is integral over $A$, hence $a^{-d}=\sum_{i=0}^{d-1}\alpha_i a^{-i}$ for some $\alpha_i \in A$. Multiplication by $a^{d-1}$ yields
$a\inv=\sum_{i=0}^{d-1}\alpha_i a^{d-1-i}\in A$.
On the other hand, let $B$ be integral over the field $A$. Let $b \in B \sm\{0\}$. As $B$ is integral over $A$, there is a sub-$A$-algebra $\tilde{B}\se B, b \in\tilde{B}$ finitely generated as an $A$-module, i.e. a finite-dimensional $A$-vector space. Since $B$ is a domain, $\tilde{B}\xrightarrow{b\cdot}\tilde{B}$ is injective, hence surjective, thus $\E x \in\tilde{B} : b \cdot x \cdot1$.
\end{proof}
\subsection{Noether normalization theorem}
\begin{lemma}\label{nntechlemma}
Let $S \se\N^n$ be finite. Then there exists $\vec k \in\N^n$ such that $k_1=1$ and $w_{\vec k}(\alpha)\neq w_{\vec k}(\beta)$ for $\alpha\neq\beta\in S$,
where $w_{\vec k}(\alpha)=\sum_{i=1}^{n} k_i \alpha_i$.
\end{lemma}
\begin{proof}
Intuitive:
For $\alpha\neq\beta$ the equation $w_{(1, \vec\kappa)}(\alpha)= w_{(1, \vec\kappa)}(\beta)$ ($\kappa\in\R^{n-1}$)
defines a codimension $1$ affine hyperplane in $\R^{n-1}$. It is possible to choose $\kappa$ such that all $\kappa_i$ are $> \frac{1}{2}$ and with Euclidean distance $> \frac{\sqrt{n-1}}{2}$ from the union of these hyperplanes. By choosing the closest $\kappa'$ with integral coordinates, each coordinate will be disturbed by at most $\frac{1}{2}$, thus at Euclidean distance $\le\frac{\sqrt{n-1}}{2}$.
More formally:\footnote{The intuitive version suffices in the exam.}
Define $M \coloneqq\max\{\alpha_i | \alpha\in S, 1\le i \le n\}$. We can choose $k$ such that $k_i > (i-1) M k_{i-1}$.
Suppose $\alpha\neq\beta$. Let $i$ be the maximal index such that $\alpha_i \neq\beta_i$. Then the contributions of $\alpha_j$ (resp. $\beta_j$) with $1\le j < i$ to $w_{\vec k}(\alpha)$ (resp. $w_{\vec k}(\beta)$) cannot undo the difference $k_i(\alpha_i -\beta_i)$.
Let $K$ be a field and $A$ a $K$-algebra of finite type. Then there are $a =(a_i)_{i=1}^{n}\in A$ which are algebraically independent over $K$, i.e. the ring homomorphism \begin{align}
\ev_a: K[X_1,\ldots,X_n] &\longrightarrow A \\
P &\longmapsto P(a_1,\ldots,a_n)
\end{align}
is injective. $n$ and the $a_i$ can be chosen such that $A$ is finite over the image of $\ev_a$.
\end{theorem}
\begin{proof}
Let $(a_i)_{i=1}^n$ be a minimal number of elements such that $A$ is integral over its $K$-subalgebra generated by $a_1, \ldots, a_n$. (Such $a_i$ exist, since $A$ is of finite type).
Let $\tilde{A}$ be the $K$-subalgebra generated by the $a_i$.
If suffices to show that the $a_i$ are algebraically independent.
Since $A$ is of finite type over $K$ and thus over $\tilde{A}$, by fact \ref{ftaiimplf} (integral and finite type $\implies$ finite) $A$ is finite over $\tilde{A}$.
Thus we only need to show that the $a_i$ are algebraically independent over $K$.
Assume there is $P \in K[X_1,\ldots,X_n]\sm\{0\}$ such that $P(a_1,\ldots,a_n)=0$. Let $P =\sum_{\alpha\in\N^n} p_\alpha X^{\alpha}$ and $S =\{\alpha\in\N^n | p_\alpha\neq0\}$. For $\vec{k}=(k_i)_{i=1}^{n}\in\N^n$ and $\alpha\in\N^n$ we define $w_{\vec{k}}(\alpha)\coloneqq\sum_{i=1}^{n} k_i\alpha_i$.
By \ref{nntechlemma} it is possible to choose $\vec{k}\in\N^n$ such that
$k_1=1$ and for $\alpha\neq\beta\in S$ we have $w_{\vec{k}}(\alpha)\neq w_{\vec{k}}(\beta)$.
Define $b_i \coloneqq a_{i+1}- a^{k_{i+1}}_1$ for $1\le i < n$.
\begin{claim}
$A$ is integral over the subalgebra $B$ generated by the $b_i$.
\end{claim}
\begin{subproof}
By the transitivity of integrality, it is sufficient to show that the $a_i$ are integral over $B$.
For $i > 1$ we have $a_i = b_{i-1}+ a_1^{k_i}$. Thus it suffices to show this for $a_1$.
Let $I$ be generated by $S$. Then $\{x \in R | \A s \in S: s(x)=0\}=\Va(I)$. Thus zero sets of ideals correspond to solutions sets to systems of polynomial equations.
If $S, \tilde{S}$ generate the same ideal $I$ they have the same set of solutions. Therefore we only consider zero sets of ideals.
Trivial if $n =1$: $R$ is a PID, thus $I = pR$ for some $p \in R$. Since $I \neq R$$p =0$ or $P$ is non-constant. $\mathfrak{k}$ algebraically closed $\leadsto$ there exists a zero of $p$.\\
Let $L / K$ be an arbitrary field extension. Then $L / K$ is a finite field extension ($\dim_K L < \infty$) iff $L $ is a $K$-algebra of finite type.
\end{theorem}
\begin{proof}
\begin{itemize}
\item[$\implies$] If $(l_i)_{i=1}^{m}$ is a base of $L$ as a $K$-vector space, then $L$ is generated by the $l_i$ as a $K$-algebra.
\item[$\impliedby$ ] Apply the Noether normalization theorem (\ref{noenort}) to $A = L$. This yields an injective ring homomorphism $\ev_a: K[X_1,\ldots,X_n]\to A$ such that $A$ is finite over the image of $\ev_a$.
By the fact about integrality and fields (\ref{fintaf}), the isomorphic image of $\ev_a$ is a field. Thus $K[X_1,\ldots, X_n]$ is a field $\implies n =0$. Thus $L / K$ is a finite ring extension, hence a finite field extension.
\end{itemize}
\end{proof}
\begin{remark}
We will see several additional proofs of this theorem. See \ref{hns2unc} and \ref{rfuncnft}.
Let $\mathfrak{l}$ be a field and $I \subset R =\mathfrak{l}[X_1,\ldots,X_m]$ a proper ideal. Then there are a finite field extension $\mathfrak{i}$ of $\mathfrak{l}$ and a zero of $I$ in $\mathfrak{i}^m$.
Both sides are morphisms $R \to\fri$ of $\mathfrak{l}$-algebras. For for $P = X_i$ the equality is trivial. It follows in general, since the $X_i$ generate $R$ as a $\mathfrak{l}$-algebra.
Thus $(x_1,\ldots,x_m)$ is a zero of $I$ (since $P \mod\fm=0$ for $P \in I \se\fm$).
HNS1 (\ref{hns1}) can easily be derived from HNS1b.
\end{proof}
\subsubsection{Nullstellensatz for uncountable fields}% from lecture 5 Yet another proof of the Nullstellensatz
The following proof of the Nullstellensatz only works for uncountable fields, but will be accepted in the exam.
\begin{lemma}\label{dimrfunc}
If $K$ is an uncountable field, then $\dim_K K(T)$ is uncountable.
\end{lemma}
\begin{proof}
We will show, that $S \coloneqq\left\{\frac{1}{T -\kappa} | \kappa\in K\right\}$ is $K$-linearly independent. It follows that $\dim_K K(T)\ge\#S > \aleph_0$.
Suppose $(x_{\kappa})_{\kappa\in K}$ is a selection of coefficients from $K$ such that $I \coloneqq\{\kappa\in K | x_{\kappa}\neq0\}$ is finite and
\[
g \coloneqq\sum_{\kappa\in K}\frac{x_\kappa}{T-\kappa} = 0
\]
Let $d \coloneqq\prod_{\kappa\in I}(T -\kappa)$. Then for $\lambda\in I$ we have
\[
0 = (dg)(\lambda) = x_\lambda\prod_{\kappa\in I \sm\{\lambda\}} (\lambda - \kappa)
\]
This is a contradiction as $x_\lambda\neq0$.
\end{proof}
\begin{theorem}[Hilbert's Nullstellensatz for uncountable fields]\label{hns2unc}
If $K$ is an uncountable field and $L / K$ a field extension and $L$ of finite type as a $K$-algebra, then this field extension is finite.
\end{theorem}
\begin{proof}
If $(x_i)_{i=1}^{n}$ generate $L$ as an $K$-algebra, then the countably many monomials $x^{\alpha}=\prod_{i =1}^{n} x_i^{\alpha_i}$ in the $x_i$ with $\alpha\in\N^n$ generate $L$ as a $K$-vector space.
Thus $\dim_K L \le\aleph_0$ and the same holds for any intermediate field $K \se M \se L$ . If $l \in L$ is transcendent over $K$ and $M = K(l)$, then $M \cong K(T)$ has uncountable dimension by \ref{dimrfunc}. Thus $L / K$ is algebraic, hence integral, hence finite (\ref{ftaiimplf}).
\end{proof}
\subsection{The Zariski topology}
\subsubsection{Operations on ideals and \texorpdfstring{$\Va\left( I \right)$}{V(I)}}
Let $R$ be a ring and $I,J, I_\lambda\se R$ ideals, $\lambda\in\Lambda$.
\begin{definition}[Radical, product and sum of ideals]
\[
\sqrt{I}\coloneqq\bigcap_{n=0}^{\infty}\{ f \in R | f^n \in I\}
\]
\[
I \cdot J \coloneqq\langle\{ i \cdot j | i \in I , j \in J\}\rangle_R
\item[D]$I \cdot J \se I \cap J \se I$. Thus $\Va(I)\se\Va(I \cap J)\se\Va(I \cdot J)$. By symmetry we have $\Va(I)\cup\Va(J)\se\Va(I \cap J)\se\Va(I \cdot J)$.
Let $x \not\in\Va(I)\cup\Va(J)$. Then there are $f \in I, g \in J$ such that $f(x)\neq0, g(x)\neq0$ thus $(f \cdot g)(x)\neq0\implies x \not\in\Va(I\cdot J)$.
On the other hand if $f \in\sum_{\lambda\in\Lambda} I_\lambda$ we have $f =\sum_{\lambda\in\Lambda} f_\lambda$. Thus $f$ vanishes on $\bigcap_{\lambda\in\Lambda}\Va(I_{\lambda})$ and we have $\bigcap_{\lambda\in\Lambda}\Va(I_\lambda)\se\Va(\sum_{\lambda\in\Lambda} I_\lambda)$.
\end{enumerate}
\end{proof}
\begin{remark}
There is no similar way to describe $\Va(\bigcap_{\lambda\in\Lambda} I_\lambda)$ in terms of the $\Va(I_{\lambda})$ when $\Lambda$ is infinite.
For instance if $n =1, I_k \coloneqq X_1^k R$ then $\bigcap_{k=0}^\infty I_k =\{0\}$ but $\bigcup_{k=0}^{\infty}\Va(I_k)=\{0\}$.
\end{remark}
\subsubsection{Definition of the Zariski topology}
There is a topology on $\mathfrak{k}^n$ for which the set of closed sets coincides with the set $\fA$ of subsets of the form $\Va\left(I \right)$ for ideals $I \se R$.
Let $n =1$. Then $R$ is a PID. Hence every ideal is a principal ideal and the Zariski-closed subsets of $\mathfrak{k}$ are the subsets of the form $\Va(P)$ for $P \in R$.
As $\Va(0)=\mathfrak{k}$ and $\Va(P)$ finite for $P \neq0$ and $\{x_1,\ldots,x_n\}=\Va(\prod_{i=1}^{n}(T-x_i))$ the Zariski-closed subsets of $\mathfrak{k}$ are $\mathfrak{k}$ and the finite subsets.
Because $\mathfrak{k}$ is infinite, this topology is not Hausdorff.
\subsubsection{Separation properties of topological spaces}
\begin{definition}
Let $X$ be a topological space. $X$ satisfies the separation properties $T_{0-2}$ if for any $x \neq y \in X$
\begin{enumerate}
\item[$T_0$ ]$\E U \se X$ open such that $|U \cap\{x,y\}| =1$
\item[$T_1$ ]$\E U \se X$ open such that $x \in U, y \not\in U$.
\item[$T_2$ ] There are disjoined open sets $U, V \se X$ such that $x \in U, y \in V$. (Hausdorff)
\end{enumerate}
\end{definition}
\begin{remark}
Let $x \sim y :\iff$ the open subsets of $X$ containing $x$ are precisely the open subsets of $X$ containing $y$. Then $T_0$ holds iff $x \sim y \implies x =y$.
The Zariski topology on $\mathfrak{k}^n$ is $T_1$ but for $n \ge1$ not Hausdorff. For $n \ge1$ the intersection of two non-empty open subsets of $\mathfrak{k}^n$ is always non-empty.
$\{x\}$ is closed, as $\{x\}= V(\Span{X_1- x_1, \ldots, X_n - x_n}_R)$. If $A = V(I), B = V(J)$ are two proper closed subsets of $\mathfrak{k}^n$ then $I \neq\{0\} , J \neq\{0\}$ and thus $IJ \neq\{0\}$. Therefore $A \cup B = V(IJ)$ is a proper closed subset of $\mathfrak{k}^n$.
\subsubsection{Compactness properties of topological spaces}
Let $X$ be a topological space.
\begin{definition}[Compact, quasi-compact]
$X$ is called \vocab[Topological space!quasi-compact]{quasi-compact} if every open covering of $X$ has a finite subcovering.
It is called \vocab[Topological space!compact]{compact}, if it is quasi-compact and Hausdorff.
\end{definition}
\begin{definition}[Noetherian topological spaces]
$X$ is called \vocab{Noetherian}, if the following equivalent conditions hold:
\begin{enumerate}[A]
\item Every open subset of $X$ is quasi-compact.
\item Every descending sequence $A_0\supseteq A_1\supseteq\ldots$ of closed subsets of $X$ stabilizes.
\item Every non-empty set $\cM$ of closed subsets of $X$ has a $\se$-minimal element.
\end{enumerate}
\end{definition}
\begin{proof}\,
\begin{enumerate}
\item[A $\implies$ B] Let $A_j$ be a descending chain of closed subsets. Define $A \coloneqq\bigcap_{j =0}^{\infty} A_j$. If A holds, the covering $X \sm A =\bigcup_{j =0}^{\infty}(X \sm A_j)$ has a finite subcovering.
\item[B $\implies$ C] Suppose $\cM$ does not have a $\se$-minimal element. Using DC, one can construct a counterexample $A_1\subsetneq A_2\supsetneq\ldots$ to B.
\item[C $\implies$ A] Let $\bigcup_{i \in I} V_i$ be an open covering of an open subset $U \se X$.
By C, the set $\cM\coloneqq\{X \sm\bigcup_{i \in F} V_i | F \se I \text{ finite}\}$ has a $\se$-minimal element.
Because the map from \ref{antimonbij} is antimonotonic, strictly decreasing chains of closed subsets of $\mathfrak{k}^n$ are mapped to strictly increasing chains of ideals in $R$.
\item If $X$ is Hausdorff then it is irreducible iff it has precisely one point.
\item$X$ is irreducible iff it cannot be written as a finite union of proper closed subsets.
\item$X$ is irreducible iff any finite intersection of non-empty open subsets is non-empty. ($\bigcap\emptyset\coloneqq X$)
\end{enumerate}
\end{fact}
\begin{proof}
\begin{enumerate}
\item[A,B] trivial
\item[C]$\implies$ : Induction on the cardinality of the union. $\impliedby$: $\bigcap\emptyset= X$ is non-empty and any intersection of two non-empty open subsets is non-empty.
\item[D] Follows from C.
\end{enumerate}
\end{proof}
\subsubsection{Irreducible components}
\begin{fact}
If $D \se X$ is dense, then $X$ is irreducible iff $D$ is irreducible with its induced topology.
\end{fact}
\begin{proof}
$X =\emptyset$ iff $D =\emptyset$.
Suppose $B$ is the union of its proper closed subsets $A,B$. Then $X =\overline{A}\cup\overline{B}$. These are proper closed subsets of $X$, as $\overline{A}\cap D = A \cap D$ (by closedness of $D$) and thus $\overline{A}\cap D \neq D$.
On the other hand, if $U$ and $V$ are disjoint non-empty open subsets of $X$, then $U \cap D$ and $V \cap D$ are disjoint non-empty open subsets of $D$.
\end{proof}
\begin{definition}[Irreducible subsets]
A subset $Z \se X$ is called \vocab[Topological space!irreducible]{irreducible} if it is irreducible with its induced topology.
$Z$ is called an \vocab{irreducible component} of $X$, if it is irreducible and if every irreducible subset $Z \se Y \se X$ coincides with $Z$.
\end{definition}
\begin{corollary}
\begin{enumerate}
\item$Z \se X$ is irreducible iff $\overline{Z}\se X$ is irreducible.
\item Every irreducible component of $X$ is a closed subset of $X$.
\end{enumerate}
\end{corollary}
\begin{notation}
From now on, irreducible means irreducible and closed.
\end{notation}
\subsubsection{Decomposition into irreducible subsets}
\begin{proposition}
Let $X$ be a Noetherian topological space. Then $X$ can be written as a finite union $X =\bigcup_{i =1}^n Z_i$ of irreducible closed subsets of $X$.
One may additionally assume that $i \neq j \implies Z_i \not\subseteq Z_i$. With this minimality condition, $n$ and the $Z_i$ are unique (up to permutation) and $\{Z_1,\ldots,Z_n\}$ is the set of irreducible components of $X$.
\end{proposition}
\begin{proof}
% i = ic
Let $\fM$ be the set of closed subsets of $X$ which cannot be decomposed as a union of finitely many irreducible subsets.
Suppose $\fM\neq\emptyset$. Then there exists a $\se$-minimal $Y \in\fM$. $Y$ cannot be empty or irreducible. Hence $Y = A \cup B$ where $A,B$ are proper closed subsets of $ Y$. By the minimality of $Y$, $A$ and $B$ can be written as a union of proper closed subsets $\lightning$.
Let $X =\bigcup_{i =1}^n Z_i$, where there are no inclusions between the $Z_i$. If $Y$ is an irreducible subsets of $X$, $Y =\bigcup_{i =1}^n (Y \cap Z_i)$ and there exists $1\le i \le n$ such that $Y = Y \cap Z_i$.
Hence $Y \se Z_i$. Thus the $Z_i$ are irreducible components. Conversely, if $Y$ is an irreducible component of $X$, $Y \se Z_i$ for some $i$ and $Y = Z_i$ by the definition of irreducible component.
\end{proof}
\begin{remark}
The proof of existence was an example of \vocab{Noetherian induction} : If $E$ is an assertion about closed subsets of a Noetherian topological space $X$ and $E$ holds for $A$ if it holds for all proper subsets of $A$, then $E(A)$ holds for every closed subset $A \se X$.
By the Nullstellensatz (\ref{hns1}), $A =\emptyset\iff I = R$. Suppose $A = B \cup C$ is a decomposition into proper closed subsets $A = V(J), B = V(K)$ where $J =\sqrt{J}. K =\sqrt{K}$.
Since $A \neq B$ and $A \neq C$, there are $f \in J \sm I, g \in K \sm I$. $fg$ vanishes on $A = B \cup C$. By the Nullstellensatz (\ref{hns3}) $fg \in\sqrt{I}= I$ and $I$ fails to be prime.
On the other hand suppose that $fg \in I, f \notin I, g \not\in I$. By the Nullstellensatz (\ref{hns3}) and $I =\sqrt{I}$ neither $f$ nor $g$ vanishes on all of $A$. Thus $(A \cap V(f))\cup(A \cap V(g))$ is a decomposition and $A$ fails to be irreducible.
The remaining assertion follows from the fact, that the bijection is $\se$-antimonotonic and thus maximal ideals correspond to minimal irreducible closed subsets, which are the one-point subsets as $\mathfrak{k}^n$ is T${}_1$.
Let $Z $ be an irreducible subset of the topological space $X$. Let $\codim(Z,X)$ be the maximum of the length $n$ of strictly increasing chains $Z \se Z_0\subsetneq Z_1\subsetneq\ldots\subsetneq Z_n$ of irreducible closed subsets of $X$ containing $Z$ or $\infty$ if such chains can be found for arbitrary $n$.
Let
\[
\dim X \coloneqq\begin{cases}
- \infty&\text{if } X = \emptyset\\
\sup_{\substack{Z \se X\\ Z \text{ irreducible}}}\codim(Z,X) &\text{otherwise}
\end{cases}
\]
\end{definition}
\begin{remark}
\begin{itemize}
\item In the situation of the definition $\overline{Z}$ is irreducible. Hence $\codim(Z,X)$ is well-defined and one may assume without losing much generality that $Z$ is closed.
\item Because a point is always irreducible, every non-empty topological space has an irreducible subset and for $X \neq\emptyset$, $\dim X$ is $\infty$ or $\max_{x \in X}\codim(\{x\}, X)$.
\item Even for Noetherian $X$, it may happen that $\codim(Z,X)=\infty$.
\item Even for if $X$ is Noetherian and $\codim(Z,X)$ is finite for all irreducible subsets $Z$ of $X$, $\dim X$ may be infinite.
For every $x \in\mathfrak{k}$, $\codim(\{x\} ,\mathfrak{k})=1$. The only other irreducible closed subset of $\mathfrak{k}$ is $\mathfrak{k}$ itself, which has codimension zero. Thus $\dim\mathfrak{k}=1$.
Let $Y \se X$ be irreducible and $U \se X$ an open subset such that $U \cap Y \neq\emptyset$. Then we have a bijection
\begin{align}
f: \{A \se X | A \text{ irreducible, closed and } Y \se A\}&\longrightarrow\{B \se U | B \text{ irreducible, closed and } Y \cap U \se B\}\\
A&\longmapsto A \cap U\\
\overline{B}&\longmapsfrom B
\end{align}
where $\overline{B}$ denotes the closure in $X$.
\end{fact}
\begin{proof}
If $A$ is given and $B = A \cap U$, then $B \neq\emptyset$ and B is open hence (irreducibility of $A$) dense in $A$, hence $A =\overline{B}$. The fact that $B =\overline{B}\cap U$ is a general property of the closure operator.
\end{proof}
\begin{corollary}[Locality of Krull codimension] \label{lockrullcodim}
Let $Y \se X$ be irreducible and $U \se X$ an open subset such that $U \cap Y \neq\emptyset$.
Then $\codim(Y,X)=\codim(Y \cap U, U)$.
\end{corollary}
\begin{fact}
Let $Z \se Y \se X$ be irreducible closed subsets of the topological space $X$. Then
A topological space $T$ is called \vocab[Topological space!catenary]{catenary} if equality holds in \eqref{eq:cdp} whenever $X$ is an irreducible closed subset of $T$.
$\dim\mathfrak{k}^n = n$ and $\mathfrak{k}^n$ is catenary. Moreover, if $X$ is an irreducible closed subset of $\mathfrak{k}^n$, then equality occurs in \eqref{eq:dp}.
The opposite inequality follows from \ref{upperbounddim} ($Z =\mathfrak{k}^n$$\dim\mathfrak{k}^n \le\trdeg(\fK(Z)/\mathfrak{k})=\trdeg(Q(\mathfrak{k}[X_1,\ldots,X_n])/\mathfrak{k})= n$).
The theorem is a special case of \ref{htandtrdeg}.
% DIMT
\end{proof}
\begin{lemma}\label{ufdprimeideal}
Every non-zero prime ideal $\fp$ of a UFD $R$ contains a prime element.
\end{lemma}
\begin{proof}
Let $p \in\fp\sm\{0\}$ with the minimal number of prime factors, counted by multiplicity.
If $p $ was a unit, then $\fp\supseteq pR = R$. If $p = ab$ with non-units $a,b$, it follows that $a \in\fp$ or $b \in\fp$ contradicting the minimality assumption.
Thus $p$ is a prime element of $R$.
\end{proof}
\begin{proposition}[Irreducible subsets of codimension one]\label{irredcodimone}
Let $p \in R =\mathfrak{k}[X_1,\ldots, X_n]$ be a prime element. Then the irreducible subset $X = V(p)\se\mathfrak{k}^n$ has codimension one, and every codimension one subset of $\mathfrak{k}^n$ has this form.
Let $X$ be a set, $\cP(X)$ the power set of $X$. A \vocab{Hull operator} on $X$ is a map $\cP(X)\xrightarrow{\cH}\cP(X)$ such that
\begin{enumerate}
\item[H1]$\A A \in\cP(X) ~ A \se\cH(A)$.
\item[H2]$A \se B \se X \implies\cH(A)\se\cH(B)$.
\item[H3]$\cH(\cH(X))=\cH(X)$.
\end{enumerate}
We call $\cH$\vocab{matroidal} if in addition the following conditions hold:
\begin{enumerate}
\item[M] If $m,n \in X$ and $A \se X$ then $m \in\cH(\{n\}\cup A)\sm\cH(A)\iff n \in\cH(\{m\}\cup A)\sm\cH(A).$
\item[F]$\cH(A)=\bigcup_{F \se A \text{ finite}}\cH(F)$.
\end{enumerate}
In this case, $S \se X$ is called \vocab{Independent subset}, if $s \not\in\cH(S \sm\{s\})$ for all $s \in S$ and
\vocab[Generating subset]{generating} if $X =\cH(S)$.
$S$ is called a \vocab{base}, if it is both generating and independent.
\end{definition}
\begin{theorem}
If $\cH$ is a matroidal hull operator on $X$, then a basis exists, every independent set is contained in a base and two arbitrary bases have the same cardinality.
\end{theorem}
\begin{example}
Let $K$ be a field, $V$ a $K$-vector space and $\cL(T)$ the $K$-linear hull of $T$ for $T \se V$.
Then $\cL$ is a matroidal hull operator on $V$.
\end{example}
\subsubsection{Transcendence degree}
\begin{lemma}
Let $L / K$ be a field extension and let $\cH(T)$ be the algebraic closure in $L$ of the subfield of $L$ generated by $K$ and $T$.\footnote{This is the intersection of all subfields of $L$ containing $K \cup T$, or the field of quotients of the sub-$K$-algebra of $L$ generated by $T$.}
Then $\cH$ is a matroidal hull operator.
\end{lemma}
\begin{proof}\npr
H1, H2 and F are trivial. For an algebraically closed subfield $K \se M \se L$ we have $\cH(M)= M$. Thus $\cH(\cH(T))=\cH(T)$ (H3).
Let $x,y \in L$, $T \se L$ and $x \in\cH(T \cup\{y\})\sm\cH(T)$. We have to show that $y \in\cH(T \cup\{x\})\sm\cH(T)$.
If $y \in\cH(T)$ we have $\cH(T \cup\{y\})\se\cH(\cH(T))=\cH(T)\implies x \in\cH(T)\sm\cH(T)\lightning$.
Hence it is sufficient to show $y \in\cH(T \cup\{x\})$. \Wlog$T =\emptyset$ (replace $K$ be the subfield generated by $K \cup T$).
Then $x$ is algebraic over the subfield $M$ of $L$ generated by $K \cup\{y\}$. Thus there exists $0\neq P \in M[T]$ with $P(x)=0$.
The coefficients $p_i$ of $P$ belong to the field of quotients of the $K$-subalgebra of $L$ generated by $y$. There are thus polynomials $Q_i, R \in K[Y]$ such that $p_i =\frac{Q_i(y)}{R(y)}$, $R(y)\neq0$.
Let $\hat{p_j}\coloneqq\hat{Q_j}(x)$. Then $\hat{P}(y)=0$. As $Q \neq0$ there is $(i,j)\in\N^2$ such that $q_{i,j}\neq0$ and then $\hat{p_j}\neq0$ as $x \not\in\cH(\emptyset)$. Thus $\hat{P}\in\hat{M}[X]\sm\{0\}$, where $\hat{M}$ is the subfield of $L$ generated by $K$ and $x$. Thus $y$ is algebraic over $\hat{M}$ and $y \in\cH(\{x\})$,
\end{proof}
\begin{definition}[Transcendence Base]
Let $L / K$ be a field extension and $\cH(T)$ the algebraic closure in $L$ of the subfield generated by $K$ and $T$. A base for $(L, \cH)$ is called a \vocab{transcendence base} and the \vocab{transcendence degree}$\trdeg(L / K)$ is defined as the cardinality of any transcendence base of $L / K$.
\end{definition}
\begin{remark}
$L / K$ is algebraic iff $\trdeg(L / K)=0$.
\end{remark}
\subsection{Inheritance of Noetherianness and of finite type by subrings and subalgebras / Artin-Tate}
The following will lead to another proof of the Nullstellensatz, which uses the transcendence degree.
\begin{remark}
There exist non-Noetherian domains, which are subrings of Noetherian domains (namely the field of quotients is Noetherian).
\end{remark}
\begin{theorem}[Eakin-Nagata]
Let $A$ be a subring of the Noetherian ring $B$. If the ring extension $B / A$ is finite (i.e. $B$ finitely generated as an $A$-module) then $A$ is Noetherian.
\end{theorem}
\begin{dfact}\label{noethersubalg}
Let $R$ be Noetherian and let $B$ be a finite $R$-algebra. Then every $R$-subalgebra $A \se B$ is finite over $R$.
\end{dfact}
\begin{proof}
Since $B$ a finitely generated $R$-module and $R$ a Noetherian ring, $B$ is a Noetherian $R$-module (this is a stronger assertion than Noetherian algebra).
Thus the sub- $R$-module $A$ is finitely generated.
\end{proof}
\begin{proposition}[Artin-Tate]
\label{artintate}
Let $A$ be a subalgebra of the $R$-algebra $B$, where $R$ is Noetherian. If $ B / R$ is of finite type and $B / A$ is finite, then $A / R$ is also of finite type.
Let $(b_i)_{i=1}^{m}$ generate $B$ as an $A$-module and $(\beta_j)_{j=1}^m$ as an $R$-algebra.
There are $a_{ijk}\in A$ such that $b_i b_j =\sum_{k=1}^{m} a_{ijk}b_k$. And $\alpha_{ij}\in A$ such that $\beta_i =\sum_{j=1}^{m}\alpha_{ij}b_j$. Let $\tilde{A}$ be the sub- $R$-algebra of $A$ generated by the $a_{ijk}$ and $\alpha_{ij}$. $\tilde{A}$ is of finite type over $ R$, hence Noetherian. The $\tilde{A}$-submodule generated by $1$ and the $b_i$ is a sub-$R$-algebra containing the $\beta_i$ and thus coincides with $B$.
Hence $B /\tilde{A}$ is finite. Since $A \se B, A /\tilde{A}$ is finite (\ref{noethersubalg}).
Hence $A /\tilde{A}$ is of finite type. By the transitivity of ``of finite type'', it follows that $A / R$ is of finite type.
\begin{figure}[H]
\centering
\begin{tikzcd}
\tilde A \arrow[hookrightarrow]{r}{\se}& A \arrow[hookrightarrow]{r}{\se}& B \\
\subsubsection{Artin-Tate proof of the Nullstellensatz}
Let $K$ be a field and $R = K[X_1,\ldots,X_n]$.
\begin{definition}[Rational functions]
Let $K(X_1,\ldots,X_n)\coloneqq Q(R)$ be the field of quotients of $R$.
$K(X_1,\ldots,X_n)$ is called the \vocab{field of rational functions} in $n$ variables over $K$.
\end{definition}
\begin{lemma}[Infinitely many prime elements]
There are infinitely many multiplicative equivalence classes of prime elements in $R$.
\end{lemma}
\begin{proof}
Suppose $(P_i)_{i =1}^m$ is a complete (up to multiplicative equvialence) lsit of prime elements of $R$.
$m > 0$, as $X_1$ is prime. The polynomial $f \coloneqq1+\prod_{i=1}^{m} P_i $ is non-constant, hence not a unit in $R$. Hence there exists a prime divisor $P \in R$. As no $P_i$ divides $f$, $P$ cannot be multiplicatively equivalent to any $P_i \lightning$.
\end{proof}
\begin{lemma}[Ring of rational functions not of finite type]\label{rfuncnft}
If $n > 0$, then $K(X_1,\ldots,X_n)/ K$ is not of finite type.
\end{lemma}
\begin{proof}
Suppose $(f_i)_{i=1}^m$ generate $K(X_1,\ldots,X_n)$ as a $K$-algebra. Let $f_i =\frac{a_i}{b}, a_i \in R, b \in R \sm\{0\}$.
Then $bf_i \in R$, and as the $f_i$ generate $K(X_1,\ldots,X_n)$ as a $K$-algebra, for every $g \in K(X_1,\ldots,X_n)$ there is $N \in\N$ with
\[
b^Ng \in R \tag{+}\label{bNginR}
\]
However, if $b =\eps\prod_{i=1}^{l} P_i$ is a decomposition of $b$ into prime factors $P_i$ and a unit $\eps$ in $R$ and $g =\frac{1}{P}$, wehere $P \in R$ is a prime element not multiplicatively equvalent to any $P_i$,
then \eqref{bNginR} fails for any $N \in\N$.
\end{proof}
The Nullstellensatz (\ref{hns2}) can be reduced to the case of \ref{rfuncnft}:
\begin{proof}(Artin-Tate proof of HNS)
Let $(l_i)_{i=1}^n$ be a transcendence base of $L / K$. If $n =0$ then $L / K$ is algebraic, hence an integral ring extension, hence a finite ring extension (\ref{ftaiimplf}).
Suppose $n > 0$. Let $\tilde R \se L$ be the $K$-subalgebra generated by the $l_i$. $\tilde R \cong R \coloneqq K[X_1,\ldots,X_n]$, as the $l_i$ are algebraically independent.
As they are a transcendence base, $L$ is algebraic over the field of quotients $Q(\tilde R)$, hence integral over $Q(\tilde R)$.
As $L / K$ is of finite type, so is $L / Q(\tilde R)$ and it follows that $L / Q(\tilde R)$ is a finite ring extension.
By Artin-Tate (\ref{artintate}), $Q(\tilde K)$ is of finite type over $K$. This contradicts \ref{rfuncnft}, as $R \cong\tilde R \implies K(X_1,\ldots,X_n)\cong Q(\tilde R)$.
\end{proof}
\subsection{Transcendence degree and Krull dimension}
If $X \se\mathfrak{k}^n$ is irreducible, then $\dim X =\trdeg(\mathfrak{k}(X)/\mathfrak{k})$ and $\codim(X, \mathfrak{k}^n)= n -\trdeg(\fK(X)/\mathfrak{k})$.
More generally if $Y \se\mathfrak{k}^n$ is irreducible and $X \se Y$, then $\codim(X,Y)=\trdeg(\fK(Y)/\mathfrak{k})-\trdeg(\fK(X)/\mathfrak{k})$.
This is yet another indication that the notion of dimension is the ``correct'' one.
\end{remark}
\begin{remark}
\ref{kdimkn} follows.
\end{remark}
% Lecture 06
\subsection{The spectrum of a ring}
\begin{definition}[Spectrum]
Let $R$ be a commutative ring.
\begin{itemize}
\item Let $\Spec R$ denote the set of prime ideals and $\mSpec R \se\Spec R$ the set of maximal ideals of $R$.
\item For an ideal $I \se R$ let $V(I)\coloneqq\{\fp\in\Spec R | I \se\fp\}$
\item We equip $\Spec R$ with the \vocab{Zariski-Topology} for which the closed subsets are the subsets of the form $V(I)$, where $I$ runs over the set of ideals in $R$.
When $R =\mathfrak{k}[X_1,\ldots,X_n]$, the notation $V(I)$ clashes with the previous notation. When several types of $V(I)$ will be in use, they will be distinguished using indices.
Let $(I_{\lambda})_{\lambda\in\Lambda}$ and $(l_j)_{j=1}^n$ be ideals in $R$, where $\Lambda$ may be infinite. We have $V(\sum_{\lambda\in\Lambda} I_\lambda)=\bigcap_{\lambda\in\Lambda} V(I_\lambda)$ and $V(\bigcap_{j=1}^n I_j)= V(\prod_{j=1}^{n} I_j)=\bigcup_{j =1}^n V(I_j)$.
Thus, the Zariski topology on $\Spec R$ is a topology.
Let $R =\mathfrak{k}[X_1,\ldots,X_n]$. Then there exists a bijection (\ref{antimonbij}, \ref{bijiredprim}) between $\Spec R$ and the set of irreducible closed subsets of $\mathfrak{k}^n$ sending $\fp\in\Spec R$ to $V_{\mathfrak{k}^n}(\fp)$ and identifying the one-point subsets with $\mSpec R$.
This defines a bijection $\mathfrak{k}^n \cong\mSpec R$ which is a homeomorphism if $\mSpec R$ is equipped with the induced topology from the Zariski topology on $\Spec R$.
A \vocab{multiplicative subset} of a ring $R$ is a subset $S \se R$ such that $\prod_{i=1}^{n} f_i \in S $ when $n \in\N$ and all $f_i \in S$.
\end{definition}
\begin{proposition}
Let $S \se R$ be a multiplicative subset. Then there is a ring homomorphism $R \xrightarrow{i} R_S$ such that $i(S)\se R_S^{\times}$ and $i$ has the \vocab{universal property} for such ring homomorphisms:
If $R \xrightarrow{j} T$ is a ring homomorphism with $j(S)\se T^{\times}$, then there is a unique ring homomorphism $R_S \xrightarrow{\iota} T$ with $j =\iota i$.
\begin{figure}[H]
\centering
\begin{tikzcd}
R \arrow{r}{i}\arrow{d}{j}& R_S \arrow[dotted]{ld}{\Eone\iota}\\
T
\end{tikzcd}
\end{figure}
\end{proposition}
\begin{proof}
The construction is similar to the construction of the field of quotients:
Let $R_S \coloneqq(R \times S)/\sim$, where $(r,s)\sim(\rho, \sigma) : \iff\E t \in S ~ t \sigma r = ts\rho$.\footnote{$t$ does not appear in the construction of the field of quotients, but is important if $S$ contains zero divisors.}
$[r,s]+[\rho, \sigma]\coloneqq[r\sigma+\rho s, s \sigma]$, $[r,s]\cdot[\rho, \sigma]\coloneqq[r \cdot\rho, s \cdot\sigma]$.
In order proof the universal property define $\iota([r,s])\coloneqq\frac{j(r)}{j(s)}$.
The universal property characterizes $R_S$ up to unique isomorphism.
\end{proof}
\begin{remark}
$i$ is often not injective and $\Ker(i)=\{r \in R | \E s \in S ~ s \cdot r =0\}$.
In particular $(r =1)$, $R_S$ is the null ring iff $0\in S$.
\end{remark}
\begin{notation}
Let $S \se R$ be a multiplicative subset of $R$. We write $\frac{r}{s}$ for $[r,s]$.
The ring homomorphism $R \xrightarrow{i} R_S$ i given by $i(r)=\frac{r}{1}$.
For $X \se R_S$ let $X \sqcap R$ denote $i\inv(X)$.
\end{notation}
\begin{definition}[$S$-saturated ideal]
An ideal $I \se R$ is called \vocab[Ideal!S-saturated]{$S$-saturated} if for all $s \in S, r \in R$
$rs \in I \implies r \in I$.
\end{definition}
\begin{fact}\label{primeidealssat}
A prime ideal $\fp\se\Spec R$ is $S$-saturated iff $\fp\cap S =\emptyset$.
\end{fact}
Because the elements of $S$ become units in $R_S$, $J \sqcap R$ is an $S$-saturated ideal in $R$ when $J$ is an ideal in $R_S$.
\begin{fact}\label{ssatiis}
Let $I \se R$ be an $S$-saturated ideal and let $I_S$ denote the ideal $\{\frac{r}{s} | r \in R, s \in S\}\se R_S$.
Then for all $r \in R, s \in S$
we have $\frac{r}{s}\in I_S \iff r \in I$.
\end{fact}
\begin{proof}
Clearly $i \in I \implies\frac{i}{s}\in I_S$. If $\frac{i}{s}\in J$ there are $\iota\in I$, $\sigma\in S$ such that $\frac{i}{s}=\frac{\iota}{\sigma}$ in $R_S$.
This equation holds iff there exists $t \in S$ such that $ts\iota= t \sigma i$. But $ts \iota\in I$ hence $i \in I$, as $I$ is $S $-saturated.
\end{proof}
\begin{fact}\label{invimgprimeideal}
The inverse image of a prime ideal under any ring homomorphism is a prime ideal.
\end{fact}
\begin{proposition}\label{idealslocbij}
\begin{align}
f: \{I \se R | I \text{$S$-saturated ideal}\}&\longrightarrow\left\{J \se R_S | J \text{ ideal}\right\}\\
I &\longmapsto I_S \coloneqq\left\{\frac{i}{s} | i \in I, s \in S\right\}\\
J \sqcap R &\longmapsfrom J\\
\end{align}
is a bijection. Under this bijection $I$ is a prime ideal iff $f(I)$ is.
\end{proposition}
\begin{proof}
Applying \ref{ssatiis} to $s =1$ gives $I_S \sqcap R = I$, when $I$ is $S$-saturated.
Conversely, if $J$ is given and $I = J \sqcap R, \frac{r}{s}\in R_S$, then by \ref{ssatiis}$\frac{r}{s}\in IR_S \iff r \in I$.
But as $\frac{r}{1}= s \cdot\frac{r}{s}$ and $s \in R_S^{\times}$, we have $r \in I \iff\frac{r}{1}\in J \iff\frac{r}{s}\in J$ .
We have thus shown that the two maps between sets of ideals are well-defined and inverse to each other.
By \ref{invimgprimeideal}, $J \in\Spec R_S \implies f\inv(J)= J \cap R \in\Spec R_S$.
Suppose $I \in\Spec R$, $\frac{a}{s}\cdot\frac{b}{t}\in I_S$ for some $a,b \in R, s,t \in S$.
By \ref{ssatiis}$ab \in I$. Thus $a \in I \lor b \in I$, hence $\frac{a}{s}\in I_S \lor\frac{b}{t}\in I_S$ and we have $I_S \in\Spec R_S$.
\end{proof}
% Some more remarks on localization
\begin{remark}\label{locandquot}
Let $R$ be a domain. If $S = R \sm\{0\}$, then $R_S$ is the field of quotients $Q(R)$.
If $S \se R \sm\{0\}$, then
\[
R_S \cong\left\{\frac{a}{s}\in K | a \in R, s \in S\right\}
Let $R$ be any ring, $I \se R$ an ideal. Even if $I$ is not $S$-saturated, $J = I_S \coloneqq\{\frac{i}{s} | i \in I, s \in S\}$ is an ideal in $R_S$, and $I_S \sqcap R =\{r \in R | s\cdot r \in I, s \in S\}$ is called the \vocab[Ideal!$S$-saturation]{$S$-saturation of $I$} which is the smallest $S$-saturated ideal containing $I$.
\end{definition}
\begin{lemma}\label{locandfactor}
In the situation of \ref{ssaturation}, if $\overline{S}$ denotes the image of $S$ in $R / I$, there is a canonical isomorphism $R_S / I_S \cong(R / I)_{\overline{S}}$.
\end{lemma}
\begin{proof}
We show that both rings have the universal property for ring homomorphisms $R \xrightarrow{\tau} T$ with $\tau(I)=\{0\}$ and $\tau(S)\se T^{\times}$.
For such $\tau$, by the fundamental theorem on homomorphisms (Homomorphiesatz) there is a unique $R/I \xrightarrow{\tau_1} T$ such that $\tau=\tau_1\pi_{R,I}$.
We have $\tau_1(\overline{S})=\tau(S)\se T^{\times}$, hence there is a unique $(R / I)_{\overline{S}}\xrightarrow{\tau_2} T$ such that the composition $R / I \to(R / I)_{\overline{S}}\xrightarrow{\tau_2} T $ equals $\tau_1$. It is easy to see that this is the only one for which $R \to R / I \to(R / I)_{\overline{S}}\xrightarrow{\tau_2} T$ equals $\tau$.
Similarly, by the universal property of $R_S$ there is a unique $R_S \xrightarrow{\tau_3} T$ whose composition with $R \to R_S$ equals $\tau$.
$\tau_3(I_{S})=0$, hence a unique $R_S / I_S \xrightarrow{\tau_4} T$ whose composition with $\pi_{R_S, I_S}$ equals $\tau_3$ exists.
This is the only one for which the composition $R \to R_S \to R_S / I_S \xrightarrow{\tau_4} T$ equals $\tau$.
\begin{figure}[H]
\centering
\begin{tikzcd}
R \arrow{r}{\tau}\arrow[swap]{d}{\pi_{R,I}}& T & R\arrow[swap]{l}{\tau}\arrow{d}{}\\
R / I \arrow[dotted]{ru}{\Eone\tau_1}\arrow{d}{}&& R_S \arrow[dotted, swap]{lu}{\Eone\tau_3}\arrow{d}{\pi_{R_S, I_S}}\\
Let $R$ be a ring, $\fp\in\Spec R$. Let $\mathfrak{k}(\fp)$ denote the field of quotients of the domain $R /\fp$. This is called the \vocab{residue field} of $\fp$.
If $\fq$ is a maximal ideal, $\mathfrak{k}(\fq)= A /\fq$ is of finite type over $\mathfrak{l}$, hence a finite field extension of $\mathfrak{l}$ by the Nullstellensatz (\ref{hns2}).
Thus, $\trdeg(\mathfrak{k}(\fq)/\mathfrak{l})=0$.
If $\trdeg(Q(A)/\mathfrak{l})=0$, $A$ would be integral over $\mathfrak{l}$, hence a field (fact about integrality and fields, \ref{fintaf}). But if $A$ is a field, $\fp=\{0\}$ is a maximal ideal of $A$, hence $\fq=\fp\lightning$.
There exist $a_1,\ldots,a_n \in A$ such that $\mathfrak{k}(\fq)$ is algebraic over the subfield generated by $\mathfrak{l}$ and their images $\overline{a_i}$ (for instance generators of $A$ as a $\mathfrak{l}$-algebra).
We may assume that $n$ is minimal. If the $a_i$ are $\mathfrak{l}$-algebraically dependent, then w.l.o.g. $\overline{a_n}$ can be assumed to be algebraic over the subfield generated by $\mathfrak{l}$ and the $\overline{a_i}, 1\le i <n$. Thus, $a_n$ could be removed, contradicting the minimality.
Take $a_1,\ldots,a_n \in A$ as in the lemma. As the $a_i \mod\fq$ are $\mathfrak{l}$-algebraically independent, the same holds for the $a_i$ themselves.
Thus $\trdeg(Q(A)/\mathfrak{l})\ge n$ and the inequality is strict, if it can be shown that the $a_i$ fail to be a transcendence base of $Q(A)/\mathfrak{l}$.
Let $R \se A$ denote the $\mathfrak{l}$-subalgebra generated by $a_1,\ldots,a_n$ and $S \coloneqq R \sm\{0\}$.
We must show, that $Q(A)$ fails to be algebraic over $\mathfrak{l}_1\coloneqq R_S = Q(R)$.
Let $A_1\coloneqq A_S$ and $\fq_S$ the prime ideal corresponding to $\fq$ as in \ref{idealslocbij}.
We have $\fq_S \neq\{0\}$ as $\{0_{A}\}_S =\{0_{A_S}\}$.
$A_1$ is a domain with $Q(A_1)\cong Q(A)$ (\ref{locandquot}) and $A_1/\fq_S$ is isomorphic to the localization of $A /\fq$ with respect to the image of $S$ in $A/\fq$ (\ref{locandfactor}).
$\mathfrak{k}(\fq_S)$ is algebraic over $\mathfrak{l}_1$ because the image of $\mathfrak{l}_1$ in $\mathfrak{k}(\fq_S)$ contains the images of $\mathfrak{l}$ and the $a_i$, and the images of the $a_i$ form a transcendence base for $\mathfrak{k}(\fq)/\mathfrak{l}$.
By the fact about integrality and fields (\ref{fintaf}) it follows that $A_1/\fq_S$ is a field, hence $\fq_S \in\mSpec(A_1)$ and the special case of $\fq\in\mSpec(A)$
Let $R$ be a ring. $R$ is called a \vocab{local ring}, if the following equivalent conditions hold:
\begin{itemize}
\item$\#\mSpec R =1$
\item$R \sm R^{\times}$ is an ideal.
\end{itemize}
If this holds, $\fm_R \coloneqq R \sm R^{\times}$ is the unique maximal ideal of $R$.
\end{definition}
\begin{proof}
Suppose $\mSpec R =\{\fm\}$. If $x \in\fm$, then $x \not\in R^{\times}$ as otherwise $xR = R \implies\fm= R$.
If $x \not\in R^{\times}$ then $xR$ is a proper ideal, hence contained in some maximal ideal. Thus $x \in\fm$.
Assume that $\fm= R \sm R^{\times}$ is an ideal in $R$. As $1\in R^{\times}$ this is a proper ideal. If $I$ is any proper ideal and $x \in I$, then $x \in\fm$. Hence $R = xR \se I \se\fm$. It follows that $\fm$ is the only maximal ideal of $R$.
\end{proof}
\begin{remark}
\begin{itemize}
\item Any field is a local ring ($\fm_K =\{0\}$).
\item The null ring is not local as it has no maximal ideals.
\end{itemize}
\end{remark}
\subsubsection{Localization at a prime ideal}
Many questons of commutative algebra are easier in the case of local rings. Localization at a prime ideal is a technique to reduce a problem to this case.
\begin{proposition}[Localization at a prime ideal]\label{locatprime}
Let $A$ be a ring and $\fp\in\Spec A$. Then $S \coloneqq A \sm\fp$ is a multiplicative subset, $A_S$ is a local ring with maximal ideal $\fm=\fp_S =\{\frac{p}{s}| p \in\fp, s \in S\}$.
We have a bijection
\begin{align}
f: \Spec A_S &\longrightarrow\{\fq\in\Spec A | \fq\se\fp\}\\
\fr&\longmapsto\fr\sqcap A\\
\fq_S \coloneqq\left\{\frac{q}{s} | q \in\fq, s \in S\right\}&\longmapsfrom\fq
\end{align}
\end{proposition}
\begin{proof}
It is clear that $S$ is a multiplicative subset and that $\fp_S$ is an ideal. By \ref{ssatiis}$\frac{a}{s}\in\fp_S \iff a \in\fp\iff a \in A \sm S$ for all $a \in A, s \in S$.
Thus, if $\frac{a}{s}\not\in\fp_S$ then it is a unit in $A_S$ with inverse $\frac{s}{a}$. Hence $A_S$ is a local ring with maximal ideal $\fp_S$.
The claim about $\Spec A_S$ follows from \ref{idealslocbij} using the fact (\ref{primeidealssat}) that a prime ideal $\fr\in\Spec A$ is $S$-saturated iff it is disjoint from $S = A \sm\fp$ iff $\fr\se\fp$.
\end{proof}
\begin{definition}
The ring $A_S$ as in \ref{locatprime} is called the \vocab[Localization]{localization of $A$ at the prime ideal $\fp$} and denoted $A_\fp$.
\end{definition}
\begin{remark}
This introduces no ambiguity because a prime ideal is never a multiplicative subset.
Let $Y = V(\fp)\se\mathfrak{k}^n$ be an irreducible subset of $\mathfrak{k}^n$. Elements of $B_\fp$ are the fractions $\frac{b}{s}, s \not\in\fp$, i.e. $s$ does not vanish identically on $Y$.
Thus, $B_\fp$ is the ring of rational functions on $\mathfrak{k}^n$ which are well defined on some open subset $U$ intersecting $Y$. As $Y$ is irreducible, the intersection of two such subsets still intersects $Y$.
For arbitrary $A$, we have a bijection $\Spec A_\fp\cong N =\{\fq\in\Spec A | \fp\se\fp\}$. One can show that $N$ is the intersection of all neighbourhoods of $\fp$ in $\Spec A$, confirming the intuition that ``the localization sees things which go on in arbitrarily small neighbourhoods of $\fp$''.
\end{remark}
\begin{remark}
If $A$ is a domain and $\fp=\{0\}$, then $A_\fp= Q(A)$.
\end{remark}
\subsection{Going-up and going-down}
\begin{definition}[Going-up and going-down]\label{goupgodown}
Let $R$ be a ring and $A$ an $R$-algebra.
\vocab{Going-up} holds for $A / R$ if for arbitrary $\fq\in\Spec A$ and arbitrary $\tilde\fp\in\Spec R$ with $\tilde\fp\supseteq\fq\sqcap R$ there exists $\tilde\fq\in\Spec A$ with $\fq\se\tilde\fq$ and $\tilde\fp=\tilde\fq\sqcap R$.
(We are given $\fp\se\tilde\fp$ and $\fq$ such that $\fp=\fq\sqcap R$ and must make $\fq$ larger).
\vocab{Going-down} holds for $A / R$ if for arbitrary $\tilde\fq\in\Spec A$ and arbitrary $\fp\in\Spec R$ with $\fp\se\tilde\fq\sqcap R$, there exists $\fq\in\Spec A$ with $\fq\se\tilde\fq$ and $\fp=\fq\sqcap R$.
(We are given $\fp\se\tilde\fp$ and $\tilde\fq$ such that $\tilde\fp=\tilde\fq\sqcap R$ and must make $\tilde\fq$ smaller).
In the situation of \ref{goupgodown}, we say $\fq\in\Spec A$\vocab[Primeideal!lies above]{lies above}$\fp\in\Spec R$ if $\fq\sqcap R =\fp$.
\end{remark}
\subsubsection{Going-up for integral ring extensions}
\begin{theorem}[Krull, Cohen-Seidenberg]
\label{cohenseidenberg}
Let $A$ be a ring and $R \se A$ a subring such that $A$ is integral over $R$.
\begin{enumerate}[A]
\item The map $\Spec A \xrightarrow{\fq\mapsto\fq\cap R}\Spec R$ is surjective.
\item For $\fp\in\Spec R$, there are no inclusions between the prime ideals $\fp\in\Spec A$ lying over $\fp$.
\item Going-up holds for $A / R$.
\item$\fq\in\Spec A$ is maximal iff $\fp\coloneqq\fq\cap R$ is a maximal ideal of $R$.
\end{enumerate}
\end{theorem}
\begin{proof}
% uses localization at prime ideals
\begin{enumerate}
\item[D] Consider the ring extension $A /\fq$ of $R /\fp$. Both rings are domains and the extension is integral.
By the fact about integrality and fields (\ref{fintaf}) $A /\fq$ is a field iff $R /\fp$ is a field. Thus $\fq\in\mSpec A \iff\fp\in\mSpec R$.
\item[A] Suppose $\fp\in\Spec R$ and let $S \coloneqq R \sm\fp$. Then $S$ is a multiplicative subset of both $R$ and $A$, and we may consider the localizations $R \xrightarrow{\rho} R_\fp, A \xrightarrow{\alpha} A_\fp$ with respect to $S$. By the universal property of $\rho$, there exists a unique homomorphism $R_\fp\xrightarrow{i} A_\fp$ such that $i\rho=\alpha\defon{R}$.
We have $j(\frac{r}{s})=\frac{r}{s}$ and $j$ is easily seen to be injective.
\begin{figure}[H]
\centering
\begin{tikzcd}
R \arrow{r}{\rho}\arrow[hookrightarrow]{d}{\se}& R_\fp\arrow[hookrightarrow, dotted]{d}{\Eone i}\\
A \arrow{r}{\alpha}& A_\fp
\end{tikzcd}
\end{figure}
\begin{claim}
$A_\fp$ is integral over $R_\fp$.
\end{claim}
\begin{subproof}
An element $x \in A_\fp$ has the form $x =\frac{a}{s}$ for some $s \in R \sm\fp$ and where $a \in A$ is integral over $R$.
Hence $a^n =\sum_{i=0}^{n-1} r_ia^i$ for some $r_i \in R$. Thus $x^n =\sum_{i=0}^{n-1}\rho_i x^i$ with $\rho_i \coloneqq s^{i-n} r_i \in R_\fp$.
\end{subproof}
As $i$ is injective and $R_\fp\neq\{0\}$ ($R_\fp$ is local!) $A_\fp\neq\{0\}$, there is $\fm\in\mSpec A_\fp$.
D has already been shown and applies to $A_\fp/ R_\fp$, hence $i\inv(\fm)=\fp_\fp$ is the only maximal ideal of the local ring $R_\fp$. Hence $\fq=\alpha\inv(\fm)$ satisfies
\[
\fq\cap R = \alpha\inv(\fm) \cap R = \rho\inv(i\inv (\fm)) = \rho\inv(\fp_\fp) = \fp
\]
\item[B] The map $\Spec A_\fp\xrightarrow{\alpha\inv}\Spec A$ is injective with image equal to $\{\fq\in\Spec A | \fq\cap R \se\fp\}$. In particular, it contains the set of all $\fq$ lying over $\fp$.
If $\fq=\alpha\inv(\fr)$ lies over $\fp$, then \[\rho\inv(i\inv(\fr))=(\alpha\inv(\fr))\cap R =\fq\cap R =\fp=\rho\inv(\fp_\fp)\]
hence $i\inv(\fr)=\fp_\fp$ by the injectivity of $\Spec R_\fp\xrightarrow{\rho\inv}\Spec R$.
Because D applies to the integral ring extension $A_\fp/ R_\fp$ and $\fp_\fp\in\mSpec R_\fp$, $\fr$ is a maximal ideal.
There are thus no inclusions between different such $\fr$. Because $\Spec A_\fp\xrightarrow{\alpha\inv}\Spec A$ is $\se$-monotonic and injective, there are no inclusions between different $\fp\in\Spec A$ lying over $\fp$.
\item[C] Let $\fp\se\tilde\fp$ be prime ideals of $R$ and $\fq\in\Spec A$ such that $\fq\cap R =\fp$.
By applying A to the ring extension $A /\fq$ of $R /\fp$, there is $\fr\in\Spec A /\fq$ such that $\fr\sqcap R /\fp=\tilde\fp/\fp$.
The preimage $\tilde\fq$ of $\fr$ under $A \to A /\fq$ satisfies $\fq\se\tilde\fq$ and $\tilde\fq\cap R =\tilde\fp$.
\end{enumerate}
\end{proof}
\begin{remark}
The proof of \ref{cohenseidenberg} does not use Noetherianness, as this is not an assumption.
In the case of $X =\{0\} , Y =\mathfrak{k}^n$, equality holds because the chain of irreducible subsets $\{0\}\subsetneq\{0\}\times\mathfrak{k}\subsetneq\ldots\subsetneq\{0\}\times\mathfrak{k}^n\subsetneq\mathfrak{k}^n$
Apply the Noether normaization theorem to $A$. This yields $(f_i)_{i=1}^d \in A^d$ which are algebraically independent over $\mathfrak{k}$ and such that $A$ is finite over the subalgebra generated by the $f_i$.
Let $L$ be the algebraic closure in $\fK(Y)$ of the subfield of $\fK(Y)$ generated by $\mathfrak{k}$ and the $f_i$. We have $A \se L$ and since $\fK(Y)= Q(B /\fp)= Q(A)$\footnote{by definition} it follows that $\fK(Y)= L$. Hence $(f_i)_{i=1}^d$ is a transcendence base for $\fK(y)/\mathfrak{k}$ and $d =\trdeg\fK(Y)/\mathfrak{k}$.
is an isomorphism and in $\mathfrak{k}[X_1,\ldots,X_d]$ there is a strictly ascending chain of prime ideals corresponding to $\mathfrak{k}^d \supsetneq\{0\}\times\mathfrak{k}^{d-1}\supsetneq\ldots\supsetneq\{0\}$. Thus there is a strictly ascending chain $\{0\}=\fp_0\subsetneq\fp_1\subsetneq\ldots\subsetneq\fp_d$ of elements of $\Spec R$.
Let $\fq_0=\{0\}\in\Spec A$. If $0 < i \le d$ and a chain $\fq_0\subsetneq\ldots\subsetneq\fq_{i-1}$ in $\Spec A$ with $\fq_j \cap R =\fp_j$ for $0\le j < i$ has been selected, we may apply going-up (\ref{cohenseidenberg}) to $A / R$ to extend this chain by a $\fq_i \in\Spec A$ with $\fq_{i-1}\se\fq_i$ and $\fq_i \cap R =\fp_i$ (thus $\fq_{i-1}\subsetneq\fq_i$ as $\fp-i \neq\fp_{i-1})$.
Thus, we have a chain $\fq_0=\{0\}\subsetneq\ldots\subsetneq\fq_d$ in $\Spec A$.
Let $\tilde\fq_i \coloneqq\pi_{B,\fp}\inv(\fq_i), Y_i \coloneqq V(\tilde\fq_i)$.
Let $A$ be a ring and $I \se A$ a subset which is closed under arbitrary finite sums and non-empty products, for instance, an ideal in $A$. Let $(\fp_i)_{i=1}^n$ be a finite list of ideals in $A$ of which at most two fail to be prime ideals and such that there is no $i$ with $I \se\fp_i$. Then $I \not\se\bigcup_{i=1}^n \fp_i$.
\end{proposition}
\begin{proof}
Induction on $n$. The case of $n < 2$ is trivial.
Let $n \ge2$ and the assertion be shown for a list of $n-1$ ideals one wants to avoid.
If $n \ge3$ we may, by reordering the $\fp_i$ assume that $\fp_1$ is a prime ideal.
By the induction assumption, there is $f_k \in I \sm\bigcup_{j \neq k}\fp_j$. If there is $k$ with $1\le k\le n$ and $f_k \not\in\fp_k$, then the proof is finished.
Otherwise
\[
f_1 + \prod_{j=2}^{n} f_j \in I \sm\bigcup_{j=1}^n \fp_j
\]
\end{proof}
\subsubsection{The fixed field of the automorphism group of a normal field extension}
Recall the definition of a normal field extension in the case of finite field extensions:
\begin{definition}
A finite field extension $L / K$ is called \vocab{normal}, if the following equivalent conditions hold:
\begin{enumerate}
\item[A] Let $\overline{K}/ K$ be an algebraic closure of $K$. Then any two expansions of $\Id_K$ to a ring homomorphism $L \to\overline{K}$ have the same image.
\item[B] If $P \in K[T]$ is an irreducible polynomial and $P$ has a zero in $L$, then $P$ splits into linear factors.
\item[C]$L$ is the splitting field of a $P \in K[T]$.
\end{enumerate}
\end{definition}
\begin{fact}\label{fnormalfe}
For an arbitrary algebraic field extension $L / K$, the following conditions are equivalent:
\begin{itemize}
\item$L$ is the union of its subfields which contain $K$ and are finite and normal over $K$.
\item If $P \in K[T]$ is normed, irreducible over $K$ and has a zero in $L$, then it splits into linear factors in $L$.
\item If $\overline{L}$ is an algebraic closure of $L$, then all extensions of $\Id_K$ to a ring homomorphism $L \to\overline{L}$ have the same image.
\end{itemize}
\end{fact}
\begin{definition}[Normal field extension]
An algebraic field extension\footnote{not necessarily finite}$L / K$ is called \vocab{normal} if
the equivalent conditions from \ref{fnormalfe} hold.
\end{definition}
\begin{definition}
Suppose $L / K$ is an arbitrary field extension. Let $\Aut( L / K)$ be the set of automorphisms of $L$ leaving all elements of (the image in $L$ of) $K$ fixed.
Let $G \se\Aut(L / K)$ be a subgroup. Then the \vocab{fixed field } is definied as
\[
L^G \coloneqq\{l \in L | \A g \in G : g(l) = l\}
\]
\end{definition}
\begin{proposition}\label{characfixnormalfe}
Let $L / K$ be a normal field extension. If the characteristic of the fields is $O$, then $L^{\Aut( L / K)}= K$.
If the characteristic is $p > 0$, then $L^{\Aut(L / K)}=\{l \in L | \E n \in\N ~ l^{p^n}\in K\}$.
\end{proposition}
\begin{proof}
In both cases $L^G \supseteq$ is easy to see.
If $K \se M \se L$ is an intermediate field, then $L$ is normal over $M$. If $\sigma\in\Aut(M /K)$, an application of Zorn's lemma to the set of all $(N, \vartheta)$ where $N$ is an intermediate field $M \se N \se L$ and $N \xrightarrow{\vartheta} L$ a ring homomorphism such that $\vartheta\defon{M}=\sigma$ shows that $\sigma$ has an extension to an element of $\Aut(L / K)$. % TODO make this rigorous
If $M$ is normal over $K$, it is easily seen to be $\Aut(L / K)$ invariant.
Thus $L^G$ is the union of $M^{\Aut(M / K)}$ over all intermediate fields which are finite and normal over $K$, and it is sufficient to show the proposition for finite normal extensions $L / K$.
\begin{itemize}
\item Characteristic $0$: The extension is normal, hence Galois, and the assertion follows from Galois theory.
\item Characteristic $p > 0$: Let $l \in L^G$ and $P \in K[T]$ be the minimal polynomial of $l$ over $K$.
We show that $l^{p^n}\in K$ for some $n \in\N$ by induction on $\deg(l / K)\coloneqq\deg(P)$.
If $\deg(l / K)=1$, we have $l \in K$.
Otherwise, assume that the assertion has been shown for elements of $L^G$ whose degree over $K$ is smaller than $\deg( l / K)$.
Let $\overline{L}$ be an algebraic closure of $L$ and $\lambda$ a zero of $P$ in $\overline{L}$.
If $M = K(l)\se L$, then there is a ring homomorphism $M -\overline{L}$ sending $l$ to $\lambda$. This can be extended to a ring homomorphism $L \xrightarrow{\sigma}\overline{L}$. We have $\sigma\in G$ because $L / K$ is normal. Hence $\lambda=\sigma(l)= l$, as $l \in L^G$. Thus $l$ is the only zero of $P$ in $\overline{L}$ and because $\deg P >1$ it is a multiple zero.
It is shown in the Galois theory lecture % TODO: link to EinfAlg
that this is possible only when $P(T)= Q(T^p)$ for some $Q \in K[T]$. Then $Q(l^p)=0$ and the induction assumption can be applied to $x = l^p$ showing $x^{p^m}\in K$ hence $l^{p^{m+1}}\in K$ for some $m \in\N$.
\end{itemize}
\end{proof}
\subsubsection{Integral closure and normal domains}
\begin{definition}[Integral closure, normal domains]
Let $A$ be a domain with field of quotients $Q(A)$ and let $L$ be a field extension of $Q(A)$.
By \ref{intclosure} the set of elements of $L$ integral over $A$ is a subring of $L$, the \vocab{integral closure} of $A$ in $L$.
$A$ is \vocab{Domain!integrally closed} in $L$ if the integral closure of $A$ in $L$ equals $A$.
$A$ is \vocab{Domain!normal} if it is integrally closed in $Q(A)$.
\end{definition}
\begin{proposition}\label{ufdnormal}
Any factorial domain (UFD) is normal.
\end{proposition}
\begin{proof}
Let $x \in Q(A)$ be integral over $A$. Then there is a normed polynomial $P \in A[T]$ with $P(x)=0$.
In EInführung in die Algebra it was shown that $A[T]$ is a UFD and that the prime elements of $A[T]$ are the elements which are irreducible in $Q(A)[T]$ and for which the $\gcd$ of the coefficients is $\sim1$. % TODO reference
The prime factors of a normed polynomial are all normed up to multiplicative equivalence. We may thus assume $P$ to be irreducible in $Q(A)[T]$.
But then $\deg P =1$ as $x$ is a zero of $P$ in $Q(A)$, hence $P(T)= T - x$ and $x \in A$ as $P \in A[T]$.
Alternative proof\footnote{\url{http://www.math.lsa.umich.edu/~tfylam/Math221/2.pdf}}:
Let $x =\frac{a}{b}\in Q(A)$ be integral over $A$. \Wlog$\gcd(a,b)=1$. Then $x^n + c_{n-1} x^{n-1}+\ldots+ c_0=0$ for some $c_i \in A$.
Multiplication with $b^n$ yields $a^n + c_{n-1} b a^{n-1}+\ldots+c_0 b^n =0$. Thus $b | a^n$. Since $\gcd(a,b)=1$ it follows that $b$ is a unit, hence $x \in A$.
\end{proof}
\begin{remark}
It follows from \ref{cintclosure} and \ref{locandquot} that the integral closure of $A$ in some field extension $L$ of $Q(A)$ is always normal.
\end{remark}
\begin{remark}
A finite field extension of $\Q$ is called an \vocab{algebraic number field} (ANF). If $K$ is an ANF, let $\cO_K$ (the \vocab[Ring of integers in an ANF]{ring of integers in $K$}) be the integral closure of $\Z$ in $K$.
\subsubsection{Action of \texorpdfstring{$\Aut(L / K)$}{Aut(L / K)} on prime ideals of a normal ring extension}
\begin{theorem}\label{autonprime}
Let $A$ be a normal domain, $L$ a normal field extension of $K \coloneqq Q(A)$, $B$ the integral closure of $A$ in $L$ and $\fp\in\Spec A$.
Then $G \coloneqq\Aut(L / K)$ transitively acts on $\{\fq\in\Spec B | \fq\cap A =\fp\}$.
\end{theorem}
\begin{proof}
Let $\fq, \fr$ be prime ideals of $B$ above the given $\fp\in\Spec A$.
We must show that there exists $\sigma\in G$ such that $\fq=\sigma(\fr)$.
This is equivalent to $\fq\se\sigma(\fr)$, since the Krull going-up theorem (\ref{cohenseidenberg}) applies to the integral ring extension $B / A$, showing that there are no inclusions between different elements of $\Spec B$ lying above $\fp\in\Spec A$.
If $L / K$ is finite and there is no such $\sigma$, then by prime avoidance (\ref{primeavoidance}) there is $ x \in\fq\sm\bigcup_{\sigma\in G}\sigma(\fr)$.
As $\fr$ is a prime ideal, $y =\prod_{\sigma\in G}\sigma(x)\in\fq\sm\fr$.\footnote{$\prod_{\sigma\in G}\sigma(x)=\prod_{\sigma\in G}\sigma\inv(x)$}
By the characterization of $L^G$ for normal field extensions (\ref{characfixnormalfe}), there is a positive integer $k$ with $y^k \in K$.
If $L / K$ is not finite, one applies Zorn's lemma to the poset of pairs $(M, \sigma)$ where $M$ is an intermediate field and $\sigma\in\Aut(M / K)$ such that $\sigma(\fr\cap M)=\fq\cap M$.
\end{proof}
\begin{remark}
The theorem is very important for its own sake. For instance, if $K$ is an ANF which is a Galois extension of $\Q$ it shows that $\Gal(K /\Q)$ transitively acts on the set of prime ideals of $\cO_K$ over a given prime number $p$. More generally, if $L / K$ is a Galois extension of ANF then $\Gal(L / K)$ transitively acts on the set of $\fq\in\Spec\cO_L$ for which $\fq\cap K$ is a given $\fp\in\Spec\cO_K$.
\end{remark}
\subsubsection{A going-down theorem}
\begin{theorem}[Going-down for integral extensions of normal domains (Krull)]\label{gdkrull}
Let $B$ be a domain which is integral over its subring $A$. If $A$ is a normal domain, then going-down holds for $B / A$.
\end{theorem}
\begin{proof}
It follows from the assumptions that the field of quotients $Q(B)$ is an algebraic field extension of $Q(A)$.
There is an algebraic extension $L$ of $Q(B)$ such that $L / Q(A)$ is normal (for instance an algebraic closure of $Q(B)$).
Let $C$ be the integral closure of $A$ in $L$. Then $B \se C$ and $C / B$ is integral.
\begin{figure}[H]
\centering
\begin{tikzcd}
Q(A) \arrow[hookrightarrow]{r}{}& Q(B) \arrow[hookrightarrow]{r}{}& L \coloneqq\overline{Q(B)}\\
A \arrow[hookrightarrow]{u}{}\arrow[hookrightarrow]{r}{}& B \arrow[hookrightarrow]{r}{}\arrow[hookrightarrow]{u}{}& C \arrow[hookrightarrow]{u}{}\\
\end{tikzcd}
\end{figure}
\begin{claim}
Going-down holds for $C / A$.
\end{claim}
\begin{subproof}
Let $\fp\se\tilde\fp$ be an inclusion of prime ideals of $A$ and $\tilde\fr\in\Spec C$ with $\tilde\fr\cap A =\tilde\fp$.
By going-up for integral ring extensions (\ref{cohenseidenberg}), $\Spec C \xrightarrow{\cdot\cap A}\Spec A$ is surjectiv. Thus there is $\fr' \in\Spec C$ such that $\fr' \cap A =\fp$. By going up for $C / A$ there is $\tilde\fr' \in\Spec C$ with $\tilde\fr' \cap A =\tilde\fp, \fr' \se\tilde\fr'$.
By the theorem about the action of the automorphism group on prime ideals of a normal ring extension (\ref{autonprime}) there exists a $\sigma\in\Aut(L / Q(A))$ with $\sigma(\tilde\fr')=\tilde\fr$. Then $\fr\coloneqq\sigma(\fr')$ satisfies $\fr\se\tilde\fr$ and $\fr\cap A =\fp$.
\end{subproof}
If $\fp\se\tilde\fp$ is an inclusion of elements of $\Spec A$ and $\tilde\fq\in\Spec B$ with $\tilde\fp\cap A =\tilde\fp$, by the surjectivity of $\Spec C \xrightarrow{\cdot\cap B}\Spec B$ (\ref{cohenseidenberg}) there is $\tilde\fr\in\Spec C$ with $\tilde\fr\cap B =\fq$.
By going-down for $C / A$, there is $\fr\in\Spec C$ with $\fr\se\tilde\fr$ and $\fr\cap A =\fp$.
Then $\fq\coloneqq\fr\cap B \in\Spec B, \fq\se\tilde\fq$ and $\fq\cap A =\fp$. Thus going-down holds for $B / A$.
A Noetherian ring $A$ is called universally Japanese if for every $\fp\in\Spec A$ and every finite field extension $L$ of $\mathfrak{k}(\fp)$, the integral closure of $A /\fp$ in $L$ is a finitely generated $A$-module. This notion was coined by Grothendieck because the condition was extensively studied by the Japanese mathematician Nataga Masayoshji.
For any ideal $Y \in\fq\se A$ we have $X =\frac{X}{Y}\cdot Y \in\fq$.
Consider $(Y)_R \subsetneq(X,Y)_R \se\fq\cap R$. As $(X,Y)_R$ is maximal and the preimage of a prime ideal is prime and thus proper, we have $(X,Y)_R =\fq\cap R$.
The prime ideal $(\frac{X}{Y},Y)_A =(\frac{X}{Y}, X,Y)_A$ is lying over $(X,Y)_R$, so going down is violated.
Applying Noether normalization to $A \coloneqq B /\fp$, giving us $(f_i)_{i=1}^d \in A^d$ such that the $f_i$ are algebraically independent and $A$ finite over the subalgebra generated by them.
We then used going-up to lift a chain of prime ideals corresponding to $\mathfrak{k}^d \supsetneq\{0\}\times\mathfrak{k}^{n-1}\supsetneq\ldots\supsetneq\{0\}$ under $Y \xrightarrow{F =(f_1,\ldots,f_d)}\mathfrak{k}^d$ to a chain of prime ideals in $A$.
This was done left-to-right as going-up was used to make prime ideals larger. In particular, when $\{0\}\in\mathfrak{k}^d$ has several preimages under $F$ we cannot control to which of them the maximal ideal terminating the lifted chain belongs. Thus, we can show that in the inequality
equality holds for at least one pint $y \in F\inv(\{0\})$ but cannot rule out that there are other $y \in F\inv(\{0\})$ for which the inequality becomes strict.
However using going-down (\ref{gdkrull}) for $F$, we can use a similar argument, but start lifting of the chain at the right end for the point $y \in Y$ for which we would like to show equality.
In order to complete the proof of \ref{proofcodimletrdeg} and show $\codim(X,Y)=\trdeg(\fK(Y)/\mathfrak{k})-\trdeg(\fK(X)/\mathfrak{k})$,
we need to localize the $\mathfrak{k}$-algebra with respect to a multiplicative subset and replace the ground field by a larger subfield of that localization which is no longer algebraically closed.
To formulate a result which still applies in this context, we need the following:
\begin{definition}[Height of a prime ideal]
Let $A$ be a ring, $\fp\in\Spec A$. We define the \vocab[Height of a prime ideal]{height of the prime ideal $\fp$}, $\hght(\fp)$, to be the largest $k \in\N$ such that there is a strictly decreasing sequence $\fp=\fp_0\supsetneq\fp_1\supsetneq\ldots\supsetneq\fp_k$ of prime ideals of $A$, or $\infty$ if there is no finite upper bound on the length of such sequences.
Let $B =\mathfrak{k}[X_1,\ldots,X_n], \fq\in\Spec B$ and let $A \coloneqq B /\fp$.
Let $Y \coloneqq V(\fq)\se\mathfrak{k}^n$, $\tilde\fp\coloneqq\pi_{B, \fq}\inv(\fp)$, where $B \xrightarrow{\pi_{B, \fp}} A $ is the projection to the ring of residue classes, and let $X = V(\tilde\fp)$.
By \ref{idealslocbij} we have a bijection between the prime ideals $\fr\se\fp$ of $A$ contained in $\fp$ and the prime ideals and the prime ideals $\tilde\fr\in\Spec B$ with $\fq\se\tilde\fr\se\tilde\fp$:
\begin{align}
f: \{\fr\in\Spec A | \fr\se\fp\}&\longrightarrow\{\tilde\fr\in\Spec B | \fq\se\tilde\fr\se\tilde\fp\}\\
\fr&\longmapsto\pi_{B, \fq}\inv(\fr)\\
\tilde\fr / \fq&\longmapsfrom\tilde\fr
\end{align}
By \ref{bijiredprim}, the $\tilde\fr$ are in canonical bijection with the irreducible subsets $Z$ of $Y$ containing $X$.
Thus, the chains $\fp=\fp_0\supsetneq\ldots\supsetneq\fp_k$ are in canonical bijection with the chains $X = X_0\subsetneq X_1\subsetneq\ldots\subsetneq X_k \se Y$ of irreducible subsets and
$\hght(\fp)=\codim(X,Y)$.
\end{example}
\begin{remark}
Let $A$ be an arbitrary ring. One can show that there is a bijection between $\Spec A$ and the set of irreducible subsets $Y \se\Spec A$:
\begin{align}
f: \Spec A &\longrightarrow\{Y \se\Spec A | Y\text{irreducible}\}\\
\fp&\longmapsto\Vs(\fp)\\
\bigcup_{\fp\in Y}\fp&\longmapsfrom Y
\end{align}
Thus, the chains $\fp=\fp_0\supsetneq\ldots\supsetneq\fp_k$ are in canonical bijection with the chains $V(\fp)= X_0\subsetneq X_1\subsetneq\ldots\subsetneq X_k \se\Spec A$ of irreducible subsets, and $\hght(\fp)=\codim(V(\fp), \Spec A)$.
\end{remark}
\subsubsection{The relation between \texorpdfstring{$\hght(\fp)$}{ht(p)} and \texorpdfstring{$\trdeg$}{trdeg}}
Let $\mathfrak{l}$ be an arbitrary field, $A$ a $\mathfrak{l}$-algebra of finite type which is a domain, $K \coloneqq Q(A)$ the field of quotients and let $(a_i)_{i=1}^n$ be $\mathfrak{l}$-algebraically independent elements of $A$. Then there exist a natural number $m \ge n$ and a transcendence base $(a_i)_{i =1}^m$ for $K /\mathfrak{l}$ with $a_i \in A$ for $1\le i \le m$.
The proof is similar to the proof of \ref{ltrdegresfieldtrbase}.
There are a natural number $m \ge n$ and elements $(a_i)_{i = n+1}^m \in A^{m-n}$ which generate $K$ in the sense of a matroid used in the definition of $\trdeg$.
For instance, one can use generators of the $\mathfrak{l}$-algebra $A$. We assume $m$ to be minimal and claim that $(a_i)_{i=1}^m$ are $\mathfrak{l}$-algebraically independent.
Otherwise there is $j \in\N$, $1\le j \le m$ such that $a_j$ is algebraic over the subfield of $K$ generated by $\mathfrak{l}$ and the $(a_i)_{i=1}^{j-1}$. We have $j > n$ by the algebraic independence of $(a_i)_{i=1}^n$.
Exchanging $x_j$ and $x_m$, we may assume $j = m$. But then $K$ is algebraic over its subfield generated by $\mathfrak{l}$ and the $(a_i)_{i=1}^{m-1}$, contradicting the minimality of $m$.
If $\fp=\fp_0\supsetneq\fp_1\supsetneq\ldots\supsetneq\fp_k$ is a chain of prime ideals in $A$, we have $\trdeg(\mathfrak{k}(\fp_i)/\mathfrak{l}) < \trdeg(\mathfrak{k}(\fp_{i+1})/\mathfrak{l})$ by \ref{trdegresfield} (``A first result of dimension theory'').
where the last inequality is another application of \ref{trdegresfield} (using $K = Q(A)= Q(A /\{0\})=\mathfrak{k}(\{0\})$ and the fact that $\{0\}\se\fp_k$ is a prime ideal).
By the Noether normalization theorem (\ref{noenort}), there are $(x_i)_{i=1}^d \in A^d$ which are algebraically independent over $\mathfrak{l}$ such that $A$ is finite over the subalgebra $S$ generated by the $x_i$. We have $d =\trdeg(K /\mathfrak{l})$ as the $x_i$ form a transcendence base of $K /\mathfrak{l}$.
By the Nullstellensatz (\ref{hns2}), $\mathfrak{k}(\fm)= A /\fm$ is a finite field extension of $\mathfrak{l}$. Hence there exists a normed polynomial $P_i \in\mathfrak{l}[T]$ with $P_i(x_i \mod\fm)=0$ in $\mathfrak{k}(\fm)$.
Let $\tilde x_i \coloneqq P_i(x_i)\in\fm$ and $\tilde S$ the subalgebra generated by the $\tilde x_i$. As $P_i(x_i)-\tilde x_i =0$, $x_i$ is integral over $\tilde S$ and so is $S /\tilde S$. It follows that $A /\tilde S$ is integral, hence finite by \ref{ftaiimplf}. Replacing $x_i$ by $\tilde x_i$, we may thus assume that $x_i \in\fm$.
The ring homomorphism $\ev_x : R =\mathfrak{l}[X_1,\ldots,X_d]\xrightarrow{P \mapsto P(x_1,\ldots,x_d)} A$ is injective. Because $R$ is a UFD, $R$ is normal (\ref{ufdnormal}). Thus the going-down theorem (\ref{gdkrull}) applies to the integral $R$-algebra $A$.
For $0\le i \le d$, let $\fp_i \se R$ be the ideal generated by $(X_j)_{j=i+1}^d$. We have $\fm\sqcap R =\fp_0$ as all $X_i \in\fm$, hence $X_i \in\fm\sqcap R$ and $\fp_0$ is a maximal ideal.
By applying going-down and induction on $i$, there is a chain $\fm=\fq_0\supsetneq\fp_1\supsetneq\ldots\supsetneq\fp_d$ of elements of $\Spec A$ such that $\fq_i \sqcap R =\fp_i$.
It follows that $\hght(\fm)\ge d$.
\end{subproof}
This finishes the proof in the case of $\fp\in\mSpec A$.
To reduce the general case to that special case, we proceed as in \ref{trdegresfield}:
By lemma \ref{ltrdegresfieldtrbase} there are $a_1,\ldots,a_n \in A$ whose images in $A /\fp$ form a transcendence base for $\mathfrak{k}(\fp)/\mathfrak{l}$.
As these images are $\mathfrak{l}$-algebraically independent, the same holds for the $a_i$ themselves.
Let $A_1\coloneqq A_S$ and $\fp_S$ the prime ideal corresponding to $\fp$ under $\Spec(A_1)\cong\{\fr\in\Spec A | \fr\cap S =\emptyset\}$ (\ref{idealslocbij}).
As in \ref{locandquot}, $A_1$ is a domain with $Q(A_1)\cong K = Q(A)$ and by \ref{locandfactor}$A_1/\fp_S \cong(A /\fp)_{\overline{S}}$, where $\overline{S}$ denotes the image of $S$ in $A /\fp$.
From the fact about integrality and fields (\ref{fintaf}), it follows that $A_1/\fp_S$ is a field. Hence $\fp_S \in\mSpec(A_1)$ and the special case can be applied to $\fp_S$ and $A_1/\mathfrak{l}_1$, showing that $\hght(\fp_S)\ge e =\trdeg(K /\mathfrak{l}_1)$. We have $\trdeg(K /\mathfrak{l}_1)= m - n$, as $(a_i)_{i = n+1}^m$ is a transcendence base for $K /\mathfrak{l}_1$. By the description of $\Spec A_S$ (\ref{idealslocbij}), a chain $\fp_S =\fq_0\supsetneq\ldots\supsetneq\fp_e$ of prime ideals in $A_S$ defines a similar chain $\fp_i \coloneqq\fq_i \sqcap A$ in $A$ with $\fp_0=\fp$. Thus $\hght(\fp)\ge e$.
As a consequence of his principal ideal theorem, Krull has shown the finiteness of $\hght(\fp)$ for $\fp\in\Spec A$ when $A$ is a Noetherian ring. But $\dim A =\sup_{\fp\in\Spec A}\hght(\fp)=\sup_{\fm\in\mSpec A}\hght(\fm)$, the Krull dimension of the Noetherian topological space $\Spec A$ may nevertheless be infinite.
\end{remark}
\begin{dexample}[Noetherian ring with infinite dimension]\footnote{\url{https://math.stackexchange.com/questions/1109732/noetherian-ring-with-infinite-krull-dimension-nagatas-example}}
Let $X \se\mathfrak{k}^n$ and $Y \se\mathfrak{k}^n$ be irreducible and closed. Then $X \times Y$ is also an irreducible closed subset of $\mathfrak{k}^{m+n}$.
Moreover, $\dim(X \times Y)=\dim(X)+\dim(Y)$ and $\codim(X \times Y, \mathfrak{k}^{m+n})=\codim(X, \mathfrak{k}^m)+\codim(Y, \mathfrak{k}^n)$.
Let $X = V(\fp)$ and $Y = V(\fq)$ where $\fp\in\Spec\mathfrak{k}[X_1,\ldots,X_m]$ and $\fq\in\Spec\mathfrak{k}[X_1,\ldots,X_n]$.
We denote points of $\mathfrak{k}^{m+n}$ as $x =(x',x'')$ with $x' \in\mathfrak{k}^m, x''\in\mathfrak{k}^n$. Then $X \times Y$ is the set of zeroes of the ideal in $\mathfrak{k}[X_1,\ldots,X_{m+n}]$ generated by the polynomials $f(x)=\phi(x')$, with $\phi$ running over $\fp$ and $g(x)=\gamma(x'')$ with $\gamma$ running over $\fq$.
Thus $X \times Y$ is closed in $\mathfrak{k}^{m+n}$.
Assume that $X \times Y = A_1\cup A_2$, where the $A_i \se\mathfrak{k}^{m+n}$ are closed.
For $x' \in\mathfrak{k}^m, x' \times Y$ is homeomorphic to the irreducible $Y$. Thus $X = X_1\cup X_2$ where $X_i =\{x \in X | \{x\}\times Y \se A_i\}$.
Because $X_i =\bigcap_{y \in Y}\{x \in X | (x,y)\in A_i\}$, this is closed. As $X$ is irreducible, there is $i \in\{1;2\}$ which $X_i = X$. Then $X \times Y = A_i$ confirming the irreducibility of $X \times Y$.
Let $a =\dim X$ and $b =\dim Y$ and $X_0\subsetneq X_1\subsetneq\ldots\subsetneq X_a = X$,$Y_0\subsetneq Y_1\subsetneq\ldots\subsetneq Y_b = Y$ be chains of irreducible subsets. By the previous result,
$X_0\times Y_0\subsetneq X_1\times Y_0\subsetneq\ldots\subsetneq X_a \times Y_0\subsetneq X_a \times Y_1\subsetneq\ldots\subsetneq X_a \times Y_a = X \times Y$ is a chain of irreducible subsets.
Similarly one derives $\codim(X \times Y, \mathfrak{k}^{m+n})\ge\codim(X, \mathfrak{k}^m)+\codim(Y, \mathfrak{k}^n)$.
By \ref{trdegandkdim} we have $\dim(A)+\codim(A, \mathfrak{k}^l)= l$ for irreducible subsets of $\mathfrak{k}^l$. Thus equality must hold in the previous two inequalities.
Let $\Vspec(I)$ denote the set of $\fp\in\Spec A$ containing $I$.
\end{notation}
\begin{proposition}[Nil radical]
For a ring $A$, $\bigcap_{\fp\in\Spec A}\fp=\sqrt{\{0\}}=\{a \in A | \E k \in\N ~ a^k =0\}\text{\reflectbox{$\coloneqq$}}\nil(A)$, the set of nilpotent elements of $A$.
This is called the \vocab{nil radical} of $A$.
\end{proposition}
\begin{proof}
It is clear that elements of $\sqrt{\{0\}}$ must belong to all prime ideals. Conversely, let $a \in A \sm\sqrt{\{0\}}$. Then $S = a^{\N}$ is a multiplicative subset of $A$ not containing $0$.
The localisation $A_S$ of $A$ is thus not the null ring. Hence $\Spec A_S \neq\emptyset$. If $\fq\in\Spec A_S$, then by the description of $\Spec A_S$ (\ref{idealslocbij}), $\fp\coloneqq\fq\sqcap A$ is a prime ideal of $A$ disjoint from $S$, hence $a \not\in\fp$.
\end{proof}
\begin{corollary}\label{sqandvspec}
For an ideal $I$ of $R$, $\sqrt{I}=\bigcap_{\fp\in\Vspec(I)}\fp$.
\end{corollary}
\begin{proof}
This is obtained by applying the proposition to $A = R / I $ and using the bijection $\Spec( R / I)\cong V(I)$ sending $\fp\in V(I)$ to $\fp\coloneqq\fp/ I$ and $\fq\in\Spec(R / I)$ to its inverse image $\fp$ in $R$.
\end{proof}
\subsubsection{Closed subsets of \texorpdfstring{$\Spec R$}{Spec R}}
\begin{proposition}\label{bijspecideal}
There is a bijection
\begin{align}
f: \{A \se\Spec R | A\text{ closed}\}&\longrightarrow\{I \se R | I \text{ ideal and } I = \sqrt{I}\}\\
A &\longmapsto\bigcap_{\fp\in A}\fp\\
\Vspec(I) &\longmapsfrom I
\end{align}
Under this bijection, the irreducible subsets correspond to the prime ideals and the closed points $\{\fm\}, \fm\in\Spec A$ to the maximal ideals.
\end{proposition}
\begin{proof}
If $A =\Vspec(I)$, then by \ref{sqandvspec}$\sqrt{I}=\bigcap_{\fp\in A}\fp$. Thus, an ideal with $\sqrt{I}= I$ can be recovered from $\Vspec( I)$. Since $\Vspec(J)=\Vspec(\sqrt{J})$, the map from ideals with $\sqrt{I}= I$ to closed subsets is surjective.
Sine $R$ corresponds to $\emptyset$, the proper ideals correspond to non-empty subsets of $\Spec R$. Assume that $\Vspec(I)=\Vspec(J_1)\cup\Vspec(J_2)$, where the decomposition is proper and the ideals coincide with their radicals.
Let $g = f_1f_2$ with $f_k \in J_k \sm I$. Since $\Vspec(g)\supseteq\Vspec(f_k)\supseteq\Vspec(I_k), \Vspec(I)\se\Vspec(g)$. Hence $g \in\sqrt{I}= I$.
As $f_k \not\in I$, $I$ fails to be a prime ideal.
Conversely, assume that $f_1f_2\in I$ while the factors are not in $I$. Since $I =\sqrt{I}, \Vspec(f_k)\not\supseteq\Vspec(I)$. But $\Vspec(f_1)\cup\Vspec(f_2)=\Vspec(f_1f_2)\supseteq\Vspec(I)$.
The proper decomposition $\Vspec(I)=\left(\Vspec(I)\cap\Vspec(f_1)\right)\cup\left(\Vspec(I)\cap\Vspec(f_2)\right)$ now shows that $\Vspec(I)$ fails to be irreducible.
The final assertion is trivial.
\end{proof}
\begin{corollary}
If $R$ is a Noetherian ring, then $\Spec R$ is a Noetherian topological space.
\end{corollary}
\begin{remark}
It is not particularly hard to come up with examples which show that the converse implication does not hold.
Thus $\Spec A$ contains only one element and is hence Noetherian.
\end{dexample}
\begin{corollary}[About the smallest prime ideals containing $I$ ]\label{smallestprimesvi}
If $R$ is Noetherian and $I \se R$ an ideal, then the set $\Vspec(I)=\{\fp\in\Spec R | I \se\fp\}$ has finitely many $\se$-minimal elements $(\fp_i)_{i=1}^k$ and every element of $V(I)$ contains at least one $\fp_i$.
The $\Vspec(\fp_i)$ are precisely the irreducible components of $V(I)$. Moreover $\bigcap_{i=1}^k \fp_i =\sqrt{I}$ and $k > 0$ if $I$ is a proper ideal.
\end{corollary}
\begin{proof}
If $\Vspec(I)=\bigcup_{i=1}^k \Vspec(\fp_i)$ is the decomposition into irreducible components then every $\fq\in\Vspec(I)$ must belong to at least one $\Vspec(\fp_i)$, hence $\fp_i \se\fq$. Also $\fp_i \in\Vspec(\fp_i)\se\Vspec(I)$.
It follows that the sets of $\se$-minimal elements of $\Vspec(I)$ and of $\{\fp_1,\ldots,\fp_k\}$ coincide.
As there are no non-trivial inclusions between the $\Vspec(\fp_i)$, there are no non-trivial inclusions between the $\fp_i$ and the assertion follows.
The final remark is trivial.
\end{proof}
\begin{corollary}
If $R$ is any ring, $\hght(\fp)=\codim(\Vspec(\fp), \Spec R)$.
Let $A$ be a Noetherian ring, $a \in A$ and $\fp\in\Spec A$ a $\se$-minimal element of $\Vspec(a)$. Then $\hght(\fp)\le1$.
\end{theorem}
\begin{proof}
Probably not relevant for the exam.
\end{proof}
\begin{remark}
Intuitively, the theorem says that by imposing a single equation one ends up in codimension at most $1$. This would not be true in real analysis (or real algebraic geometry) as the equation $\sum_{i=1}^{n} X_i^2=0$ shows. By \ref{smallestprimesvi}, if $a$ is a non-unit then a $\fp\in\Spec A$ to which the theorem applies can always be found.
Using induction on $k$, Krull was able to derive:
\end{remark}
\begin{theorem}[Generalized principal ideal theorem]
Let $A$ be a Noetherian ring, $(a_i)_{i=1}^k \in A$ and $\fp\in\Spec A$ a $\se$-minimal element of $\bigcap_{i=1}^k V(a_i)$, the set of prime ideals containing all $a_i$.
Then $\hght(\fp)\le k$.
\end{theorem}
Modern approaches to the principal ideal theorem usually give a direct proof of this more general theorem.
\begin{corollary}
If $R$ is a Noetherian ring and $\fp\in\Spec R$, then $\hght(\fp) < \infty$.
\end{corollary}
\begin{proof}
If $\fp$ is generated by $(f_i)_{i=1}^k$, then $\hght(\fp)\le k$.
\end{proof}
\subsubsection{Application to the dimension of intersections}
If $(\fp_i)_{i=1}^k$ are the smallest prime ideals of $R$ containing $I$, then $(\Va(\fp_i))_{i=1}^k$ are the irreducible components of $\Va(I)$.
\end{remark}
\begin{proof}
The $\Va(\fp_i)$ are irreducible, there are no non-trivial inclusions between them and $\Va(I)=\Va(\sqrt{I})=\Va(\bigcap_{i=1}^k \fp_i)=\bigcup_{i=1}^k \Va(\fp_i)$.
Let $X \se\mathfrak{k}^n$ be irreducible, $(f_i)_{i=1}^k$ elements of $R =\mathfrak{k}[X_1,\ldots,X_n]$ and $Y$ an irreducible component of $A = X \cap\bigcap_{i=1}^k V(f_i)$.
Let $A$ and $B$ be irreducible subsets of $\mathfrak{k}^n$. If $C$ is an irreducible component of $A \cap B$, then $\codim(C, \mathfrak{k}^n)\le\codim(A, \mathfrak{k}^n)+\codim(B, \mathfrak{k}^n)$.
by the general properties of dimension and codimension, \ref{corpithm} applied to $(X_i - Y_i)_{i=1}^n$,
the result about the dimension of products (\ref{dimprod}) and again the general properties of dimension and codimension.
\end{proof}
\begin{remark}
As in \ref{affineproblem}, $A \cap B$ can easily be empty, even when $A$ and $B$ have codimension $1$ and $n$ is very large.
\end{remark}
\subsubsection{Application to the property of being a UFD}
\begin{proposition}\limrel
Let $R$ be a Noetherian domain. Then $R$ is a UFD iff every $\fp\in\Spec R$ with $\hght(\fp)=1$\footnote{In other words, every $\se$-minimal element of the set of non-zero prime ideals of $R$} is a principal ideal.
\end{proposition}
\begin{proof}
Every element of every Noetherian domain can be written as a product of irreducible elements.\footnote{Consider the set of principal ideals $rR$ where $r$ is not a product of irreducible elements.}
Thus, $R$ is a UFD iff every irreducible element of $R$ is prime.
Assume that this is the case. Let $\fp\in\Spec R, \hght(\fp)=1$.
Let $p \in\fp\sm\{0\}$. Replacing $p$ by a prime factor of $p$, we may assume $p$ to be prime. Thus $\{0\}\subsetneq pR \se\fp$ is a chain of prime ideals and since $\hght(\fp)=1$ it follows that $\fp= pR$.
Conversely, assume that every $\fp\in\Spec R$ with $\hght(\fp)=1$ is a principal ideal. Let $f \in R$ be irreducible.
Let $\fp\in\Spec R$ be a $\se$-minimal element of $V(f)$. By the principal ideal theorem (\ref{pitheorem}), $\hght(\fp)=1$.
Thus $\fp= pR$ for some prime element $p$. We have $p | f$ since $f \in\fp$. As $f$ is irreducible, $p$ and $f$ are multiplicatively equivalent. Thus $f$ is a prime element.
\end{proof}
\subsection{The Jacobson radical}\limrel
\begin{proposition}
For a ring $A, \bigcap_{\fm\in\mSpec A}\fm=\{a \in A | \A x \in A ~ 1- ax \in A^{\times}\}\text{\reflectbox{$\coloneqq$}}\rad(A)$, the \vocab{Jacobson radical} of $A$.
\end{proposition}
\begin{proof}
Suppose $\fm\in\mSpec A$ and $a \in A \sm\fm$. Then $a \mod\fm\neq0$ and $A /\fm$ is a field. Hence $a \mod\fm$ has an inverse $x \mod\fm$.
$1- ax \in\fm$, hence $1- ax \not\in A^{\times}$ and $a $ is not al element of the RHS.
Conversely, let $a \in A$ belong to all $\fm\in\mSpec A$. If there exists $x \in A$ such that $1- ax \not\in A^{\times}$ then $(1-ax) A$ was a proper ideal in $A$, hence contained in a maximal ideal $\fm$. As $a \in\fm, 1=(1-ax)+ ax \in\fm$, a contradiction.
Hence every element of $\bigcap_{\fm\in\mSpec A}\fm$ belongs to the right hand side.
Prime ideals of a PID are maximal. Thus if $x \in\rad(A)$, every prime element divides $x$. If $x \neq0$, it follows that $x$ has infinitely many prime divisors.
However every PID is a UFD.
\end{example}
\begin{example}
If $A$ is a PID for which $p_1,\ldots,p_n$ is a list of representatives of the multiplicative equivalence classes of prime elements, then
$\rad(A)= f A$ where $f =\prod_{i=1}^{n} p_i$.
\end{example}
% proof of the pitheorem probably won't be relevant in the exam
% last 2 slides are of "limited relevance" (3 option questions), and may improve grade, but 1.0 can be obtained without it
This is a correct definition since two different sets $[x_0,\ldots,x_{n}]$ and $[\xi_0,\ldots,\xi_n]$ of homogeneous coordinates for the same point $x \in\bP^n$ differ by scaling with a $\lambda\in\mathfrak{l}^{\times}$, $x_i =\lambda\xi_i$. Since not all $x_i$ may be $0$, $\bP^n =\bigcup_{i=0}^n U_i$. We identify $\bA^n =\bA^n(\mathfrak{l})=\mathfrak{l}^n$ with $U_0$ by identifying $(x_1,\ldots,x_n)\in\bA^n$ with $[1,x_1,\ldots,x_n]\in\bP^n$.
Then $\bP^1=\bA^1\cup\{\infty\}$ where $\infty=[0,1]$. More generally, when $n > 0$$\bP^n \sm\bA^n$ can be identified with $\bP^{n-1}$ identifying $[0,x_1,\ldots,x_n]\in\bP^n \sm\bA^n$ with $[x_1,\ldots,x_n]\in\bP^{n-1}$.
\subsubsection{Graded rings and homogeneous ideals}
\begin{notation}
Let $\bI=\N$ or $\bI=\Z$.
\end{notation}
\begin{definition}
By an \vocab[Graded ring]{$\bI$-graded ring}$A_\bullet$ we understand a ring $A$ with a collection $(A_d)_{d \in\bI}$ of subgroups of the additive group $(A, +)$ such that $A_a \cdot A_b \se A_{a + b}$ for $a,b \in\bI$ and such that $A =\bigoplus_{d \in\bI} A_d$ in the sense that every $r \in A$ has a unique decomposition $r =\sum_{d \in\bI} r_d$ with $r_d \in A_d$ and but finitely many $r_d \neq0$.
We call the $r_d$ the \vocab{homogeneous components} of $r$.
An ideal $I \se A$ is called \vocab{homogeneous} if $r \in I \implies\A d \in\bI ~ r_d \in I_d$ where $I_d \coloneqq I \cap A_d$.
By a \vocab{graded ring} we understand an $\N$-graded ring. Tin this case, $A_{+}\coloneqq\bigoplus_{d=1}^{\infty} A_d =\{r \in A | r_0=0\}$ is called the \vocab{augmentation ideal} of $A$.
\end{definition}
\begin{remark}[Decomposition of $1$]
If $1=\sum_{d \in\bI}\eps_d$ is the decomposition into homogeneous components, then $\eps_a =1\cdot\eps_a =\sum_{b \in\bI}\eps_a\eps_b$ with $\eps_a\eps_b \in A_{a+b}$.
By the uniqueness of the decomposition into homogeneous components, $\eps_a \eps_0=\eps_a$ and $b \neq0\implies\eps_a \eps_b =0$.
Applying the last equation with $a =0$ gives $b\neq0\implies\eps_b =\eps_0\eps_b =0$.
Thus $1=\eps_0\in A_0$.
\end{remark}
\begin{remark}
The augmentation ideal of a graded ring is a homogeneous ideal.
\end{remark}
% Graded rings and homogeneous ideals (2)
\begin{proposition}\footnote{This holds for both $\Z$-graded and $\N$-graded rings.}
\begin{itemize}
\item A principal ideal generated by a homogeneous element is homogeneous.
\item The operations $\sum, \bigcap, \sqrt{}$ preserve homogeneity.
\item An ideal is homogeneous iff it can be generated by a family of homogeneous elements.
\end{itemize}
\end{proposition}
\begin{proof}
Most assertions are trivial. We only show that $J$ homogeneous $\implies\sqrt{J}$ homogeneous.
Let $A$ be $\bI$-graded, $f \in\sqrt{J}$ and $f =\sum_{d \in\bI} f_d$ the decomposition.
To show that all $f_d \in\sqrt{J}$, we use induction on $N_f \coloneqq\#\{d \in\bI | f_d \neq0\}$.
$N_f =0$ is trivial. Suppose $N_f > 0$ and $e \in\bI$ is maximal with $f_e \neq0$.
For $l \in\N$, the $le$-th homogeneous component of $f^l$ is $f_e^l$. Choosing $l$ large enough such that $f^l \in J$ and using the homogeneity of $J$, we find $f_e \in\sqrt{J}$.
As $\sqrt{J}$ is an ideal, $\tilde f \coloneqq f - f_e \in\sqrt{J}$. As $N_{\tilde f}= N_f -1$, the induction assumption may be applied to $\tilde f$ and shows $f_d \in\sqrt{J}$ for $d \neq e$.
\end{proof}
\begin{fact}
A homogeneous ideal is finitely generated iff it can be generated by finitely many of its homogeneous elements.
In particular, this is always the case when $A$ is a Noetherian ring.
\end{fact}
\subsubsection{The Zariski topology on $\bP^n$}
\begin{notation}
Recall that for $\alpha\in\N^{n+1}$$|\alpha| =\sum_{i=0}^{n}\alpha_i$ and $x^\alpha= x_0^{\alpha_0}\cdot\ldots\cdot x_n^{\alpha_n}$.
\end{notation}
\begin{definition}[Homogeneous polynomials]
Let $R$ be any ring and $f =\sum_{\alpha\in\N^{n+1}} f_\alpha X^{\alpha}\in R[X_0,\ldots,X_n]$.
We say that $f$ is \vocab{homogeneous of degree $d$} if $|\alpha| \neq d \implies f_\alpha=0$ .
We denote the subset of homogeneous polynomials of degree $d$ by $R[X_0,\ldots,X_n]_d \se R[X_0,\ldots,X_n]$.
\end{definition}
\begin{remark}
This definition gives $R$ the structure of a graded ring.
\begin{definition}[Zariski topology on $\bP^n(\mathfrak{k})$]\label{ztoppn}
Let $A =\mathfrak{k}[X_0,\ldots,X_n]$.\footnote{As always, $\mathfrak{k}$ is algebraically closed}
For $f \in A_d =\mathfrak{k}[X_0,\ldots,X_n]_d$, the validity of the equation $f(x_0,\ldots,x_{n})=0$ does not depend on the choice of homogeneous coordinates, as
and can thus be identified with $X \cap\bA^n$ where $X \coloneqq\bigcap_{i=1}^k \Vp(f_i)$ is given by \[f_i(X_0,\ldots,X_n)\coloneqq X_0^{d_i} g_i(X_1/ X_0,\ldots, X_n / X_0), d_i \ge\deg(g_i)\]
Thus, the Zariski topology on $\mathfrak{k}^n$ can be identified with the topology induced by the Zariski topology on $\bA^n = U_0$, and the same holds for $U_i$ with $0\le i \le n$.
Let $\Vp(I)\coloneqq\{[x_0,\ldots,_n]\in\bP^n | \A f \in I ~ f(x_0,\ldots,x_n)=0\}$
As $I$ is homogeneous, it is sufficient to impose this condition for the homogeneous elements $f \in I$.
Because $A$ is Noetherian, $I$ can finitely generated by homogeneous elements $(f_i)_{i=1}^k$ and $\Vp(I)=\bigcap_{i=1}^k \Vp(f_i)$ as in \ref{ztoppn}.
Conversely, if the homogeneous $f_i$ are given, then $I =\langle f_1,\ldots,f_k \rangle_A$ is homogeneous.
\end{definition}
\begin{remark}
Note that $V(A)= V(A_+)=\emptyset$.
\end{remark}
\begin{fact}
For homogeneous ideals in $A$ and $m \in\N$, we have:
If $X =\bigcup_{\lambda\in\Lambda} U_\lambda$ is an open covering of a topological space then $X$ is Noetherian iff there is a finite subcovering and all $U_\lambda$ are Noetherian.
\end{fact}
\begin{proof}
By definition, a topological space is Noetherian $\iff$ all open subsets are quasi-compact.
\end{proof}
\begin{corollary}
The Zariski topology on $\bP^n$ is indeed a topology.
Moreover, the topological space $\bP^n$ is Noetherian.
\end{corollary}
\subsection{Noetherianness of graded rings}
\begin{proposition}
For a graded ring $R_{\bullet}$, the following conditions are equivalent:
\begin{enumerate}[A]
\item$R$ is Noetherian.
\item Every homogeneous ideal of $R_{\bullet}$ is finitely generated.
\item Every chain $I_0\se I_1\se\ldots$ of homogeneous ideals terminates.
\item Every set $\fM\neq\emptyset$ of homogeneous ideals has a $\se$-maximal element.
\item$R_0$ is Noetherian and the ideal $R_+$ is finitely generated.
\item$R_0$ is Noetherian and $R / R_0$ is of finite type.
\end{enumerate}
\end{proposition}
\begin{proof}
\noindent\textbf{A $\implies$ B,C,D} trivial.
\noindent\textbf{B $\iff$ C $\iff$ D} similar to the proof about Noetherianness.
\noindent\textbf{B $\land$ C $\implies$E} B implies that $R_+$ is finitely generated. Since $I \oplus R_+$ is homogeneous for any homogeneous ideal $I \se R_0$, C implies the Noetherianness of $R_0$.
\noindent\textbf{E $\implies$ F} Let $R_+$ be generated by $f_i \in R_{d_i}, d_i > 0$ as an ideal.
\begin{claim}
The $R_0$-subalgebra $\tilde R$ of $R$ generated by the $f_i$ equals $R$.
\end{claim}
\begin{subproof}
It is sufficient to show that every homogeneous $f \in R_d$ belongs to $\tilde R$. We use induction on $d$. The case of $d =0$ is trivial.
Let $d > 0$ and $R_e \se\tilde R$ for all $e < d$.
as $f \in R_+$, $f =\sum_{i=1}^{k} g_if_i$. Let $f_a =\sum_{i=1}^{k} g_{i, a-d_i} f_i$, where $g_i =\sum_{b=0}^{\infty} g_{i,b}$ is the decomposition into homogeneous components.
Then $f =\sum_{a=0}^{\infty} f_a$ is the decomposition of $f$ into homogeneous components, hence $a \neq d \implies f_a =0$. Thus we may assume $g_i \in R_{d-d_i}$.
As $d_i > 0$, the induction assumption may now be applied to $g_i$, hence $g_i \in\tilde R$, hence $f \in\tilde R$.
\begin{proposition}[Projective form of the Nullstellensatz]\label{hnsp}
If $I \se A$ is a homogeneous ideal and $f \in A_d$ with $d>0$, then $\Vp(I)\se\Vp(f)\iff f \in\sqrt{I}$.
\end{proposition}
\begin{proof}
$\impliedby$ is clear. Let $\Vp(I)\se\Vp(f)$. If $x =(x_0,\ldots,x_n)\in\Va(I)$, then either $x =0$ in which case $f(x)=0$ since $d > 0$
or the point $[x_0,\ldots,x_n]\in\bP^n$ is well-defined and belongs to $\Vp(I)\se\Vp(f)$, hence $f(x)=0$.
Thus $\Va(I)\se\Va(f)$ and $f \in\sqrt{I}$ be the Nullstellensatz (\ref{hns3}).
\end{proof}
\begin{definition}\footnote{This definition is not too important, the characterization in the following remark suffices.}.
For a graded ring $R_\bullet$, let $\Proj(R_\bullet)$ be the set of $\fp\in\Spec R$ such that $\fp$ is a homogeneous ideal and $\fp\not\supseteq R_+$.
\end{definition}
\begin{remark}\label{proja}
As the elements of $A_0\sm\{0\}$ are units in $A$ it follows that for every homogeneous ideal $I$ we have $I \se A_+$ or $I = A$.
In particular, $\Proj(A_\bullet)=\{\fp\in\Spec A \sm A_+ | \fp\text{ is homogeneous}\}$.
\end{remark}
\begin{proposition}\label{bijproj}
There is a bijection
\begin{align}
f: \{I \se A_+ | I \text{ homogeneous ideal}, I = \sqrt{I}\}&\longrightarrow\{X \se\bP^n | X \text{ closed}\}\\
I &\longmapsto\Vp(I)\\
\langle\{f \in A_d | d > 0, X \se\Vp(f)\}\rangle&\longmapsfrom X
\end{align}
Under this bijection, the irreducible subsets correspond to the elements of $\Proj(A_\bullet)$.
\end{proposition}
\begin{proof}
From the projective form of the Nullstellensatz it follows that $f$ is injective and that $f\inv(\Vp\left( I \right))=\sqrt{I}= I$.
If $X \se\bP^n$ is closed, then $X =\Vp(J)$ for some homogeneous ideal $J \se A$. \Wlog$J =\sqrt{J}$. If $J \not\se A_+$, then $J = A$ (\ref{proja}), hence $X =\Vp(J)=\emptyset=\Vp(A_+)$.
Thus we may assume $J \se A_+$, and $f$ is surjective.
Suppose $\fp\in\Proj(A_\bullet)$. Then $\fp\neq A_+$ hence $X =\Vp(\fp)\neq\emptyset$ by the proven part of the proposition.
Assume $X = X_1\cup X_2$ is a decomposition into proper closed subsets, where $X_k =\Vp(I_k)$ for some $I_k \se A_+, I_k =\sqrt{I_k}$. Since $X_k$ is a proper subset of $X$, there is $f_k \in I_k \sm\fp$.
We have $\Vp(f_1f_2)\supseteq\Vp(f_k)\supseteq\Vp(I_k)$ hence $\Vp(f_1f_2)\supseteq\Vp(I_1)\cup\Vp(I_2)= X =\Vp(\fp)$ and it follows that $f_1f_2\in\sqrt{\fp}=\fp\lightning$.
Assume $X =\Vp(\fp)$ is irreducible, where $\fp=\sqrt{\fp}\in A_+$ is homogeneous. The $\fp\neq A_+$ as $X =\emptyset$ otherwise. Assume that $f_1f_2\in\fp$ but $f_i \not\in A_{d_i}\sm\fp$.
Then $X \not\se\Vp(f_i)$ by the projective Nullstellensatz when $d_i > 0$ and because $\Vp(1)=\emptyset$ when $d_i =0$.
Thus $X =(X \cap\Vp\left( f_1\right))\cup(X \cap\Vp(f_2))$ is a proper decomposition $\lightning$.
By lemma \ref{homprime}, $\fp$ is a prime ideal.
\end{proof}
\begin{remark}
It is important that $I \se A_{\color{red}+}$, since $\Vp(A)=\Vp(A_+)=\emptyset$ would be a counterexample.
\end{remark}
\begin{corollary}
$\bP^n$ is irreducible.
\end{corollary}
\begin{proof}
Apply \ref{bijproj} to $\{0\}\in\Proj(A_\bullet)$.
\end{proof}
\subsection{Some remarks on homogeneous prime ideals}
\begin{lemma}\label{homprime}
Let $R_\bullet$ be an $\bI$ graded ring ($\bI=\N$ or $\bI=\Z$).
A homogeneous ideal $I \se R$ is a prime ideal iff $1\not\in I$ and for homogeneous elements $f, g \in R , fg \in I \implies f \in I \lor g \in I$.
\end{lemma}
\begin{proof}
$\implies$ is trivial.
It suffices to show that for arbitrary $f,g \in R fg \in I \implies f \in I \lor g \in I$.
Let $f =\sum_{d \in\bI} f_d, g =\sum_{d \in\bI} g_d $ be the decompositions into homogeneous components.
If $f \not\in I$ and $g \not\in I$ there are $d,e \in I$ with $f_d \in I, g_e \in I$, and they may assumed to be maximal with this property.
As $I$ is homogeneous and $fg \in I$, we have $(fg)_{d+e}\in I$ but
where $f_dg_e \not\in I$ by our assumption on $I$ and all other summands on the right hand side are $\in I$ (as $f_{d+\delta}\in I$ and $g_{e +\delta}\in I$ by the maximality of $d$ and $e$), a contradiction.
\end{proof}
\begin{remark}
If $R_\bullet$ is $\N$-graded and $\fp\in\Spec R_0$, then $\fp\oplus R_+=\{r \in R | r_0\in\fp\}$ is a homogeneous prime ideal of $R$.
\[\{\fp\in\Spec R | \fp\text{ is a homogeneous ideal of } R_\bullet\}=\Proj(R_\bullet)\sqcup\{\fp\oplus R_+ | \fp\in\Spec R_0\}\]
\end{remark}
\subsection{Dimension of $\bP^n$}
\begin{proposition}
\begin{itemize}
\item$\bP^n$ is catenary.
\item$\dim(\bP^n)= n$. Moreover, $\codim(\{x\} ,\bP^n)= n$ for every $x \in\bP^n$.
\item If $X \se\bP^n$ is irreducible and $x \in X$, then $\codim(\{x\}, X)=\dim(X)= n -\codim(X, \bP^n)$.
\item If $X \se Y \se\bP^n$ are irreducible subsets, then $\codim(X,Y)=\dim(Y)-\dim(X)$.
\end{itemize}
\end{proposition}
\begin{proof}
Let $X \se\bP^n$ be irreducible. If $x \in X$, there is an integer $0\le i \le n$ and $X \in U_i =\bP^n \sm\Vp(X_i)$.
\Wlog$i =0$. Then $\codim(X, \bP^n)=\codim(X \cap\bA^n, \bA^n)$ by the locality of Krull codimension (\ref{lockrullcodim}).
Applying this with $X =\{x\}$ and our results about the affine case gives the second assertion.
If $Y$ and $Z$ are also irreducible with $X \se Y \se Z$, then $\codim(X,Y)=\codim(X \cap\bA^n, Y \cap\bA^n)$, $\codim(X,Z)=\codim(X \cap\bA^n, Z \cap\bA^n)$ and $\codim(Y,Z)=\codim(Y \cap\bA^n, Z \cap\bA^n)$.
Thus
\begin{align}
\codim(X,Y) + \codim(Y,Z) &= \codim(X \cap\bA^n, Y \cap\bA^n) + \codim(Y \cap\bA^n, Z \cap\bA^n)\\
The first assertion follows from \ref{bijproj} and \ref{bijiredprim} (bijection of irreducible subsets and prime ideals in the projective and affine case).
Let $d =\dim(X)$ and
\[
X_0 \subsetneq\ldots\subsetneq X_d = X \subsetneq X_{d+1}\subsetneq\ldots\subsetneq X_n = \bP^n
\]
be a chain of irreducible subsets of $\bP^n$. Then
is a chain of irreducible subsets of $\mathfrak{k}^{n+1}$. Hence $\dim(C(X))\ge1+ d$ and $\codim(C(X), \mathfrak{k}^{n+1})\ge n-d$. Since $\dim(C(X))+\codim(C(X), \mathfrak{k}^{n+1})=\dim(\mathfrak{k}^{n+1})= n+1$, the two inequalities must be equalities.
If $H =\Vp(P)$ then $C(H)=\Va(P)$ is a hypersurface in $\mathfrak{k}^{n+1}$ by \ref{irredcodimone}. By \ref{conedim}, $H$ is irreducible and of codimension $1$.
Conversely, let $H$ be a hypersurface in $\bP^n$. By \ref{conedim}, $C(H)$ is a hypersurface in $\mathfrak{k}^{n+1}$, hence $C(H)=\Vp(P)$ for some prime element $P \in A$ (again by \ref{irredcodimone}).
We have $H =\Vp(\fp)$ for some $\fp\in\Proj(A)$ and $C(H)=\Va(\fp)$. By the bijection between closed subsets of $\mathfrak{k}^{n+1}$ and ideals $I =\sqrt{I}\se A$ (\ref{antimonbij}), $\fp= P \cdot A$.
Let $P =\sum_{k=0}^{d}P_k$ with $P_d \neq0$ be the decomposition into homogeneous components.
If $P_e $ with $e < d$ was $\neq0$, it could not be a multiple of $P$ contradicting the homogeneity of $\fp= P \cdot A$. Thus, $P$ is homogeneous of degree $d$.
\end{proof}
\begin{definition}
A hypersurface $H \se\bP^n$ has \vocab{degree $d$} if $H =\Vp(P)$ where $P \in A_d$ is an irreducible polynomial.
\end{definition}
\subsubsection{Application to intersections in $\bP^n$ and Bezout's theorem}
\begin{corollary}
Let $A \se\bP^n$ and $B \se\bP^n$ be irreducible subsets of dimensions $a$ and $b$. If $a+ b \ge n$, then $A \cap B \neq\emptyset$ and every irreducible component of $A \cap B$ as dimension $\ge a + b - n$.
\end{corollary}
\begin{remark}
This shows that $\bP^n$ indeed fulfilled the goal of allowing for nicer results of algebraic geometry because ``solutions at infinity'' to systems of algebraic equations are present in $\bP^n$
(see \ref{affineproblem}).
\end{remark}
\begin{proof}
The lower bound on the dimension of irreducible components of $A \cap B$ is easily derived from the similar affine result (corollary of the principal ideal theorem, \ref{codimintersection}).
From the definition of the affine cone it follows that $C(A \cap B)= C(A)\cap C(B)$.
We have $\dim(C(A))= a+1$ and $\dim(C(B))= b +1$ by \ref{conedim}.
If $A \cap B =\emptyset$, then $C(A)\cap C(B)=\{0\}$ with $\{0\}$ as an irreducible component, contradicting the lower bound $a + b +1- n > 0$ for the dimension of irreducible components of $C(A)\cap C(B)$ (again \ref{codimintersection}).
\end{proof}
\begin{remark}[Bezout's theorem]
If $A \neq B$ are hypersurfaces of degree $a$ and $b$ in $\bP^2$, then $A \cap B$ has $ab$ points counted by (suitably defined) multiplicity.
\end{remark}
%TODO Proof of "Dimension of P^n"
% SLIDE APPLICATION TO HYPERSURFACES IN $\P^n$
%ERROR: C(H) = V_A(P)
%If n = 0, P = 0, V_P(P) = \emptyset is a problem!
% Lecture 13
\section{Varieties}
\subsection{Sheaves}
\begin{definition}[Sheaf]
Let $X$ be any topological space.
A \vocab{presheaf}$\cG$ of sets (or rings, (abelian) groups) on $X$ associates a set (or rings, or (abelian) group) $\cG(U)$ to every open subset $U$ of $X$, and a map (or ring or group homomorphism) $\cG(U)\xrightarrow{r_{U,V}}\cG(V)$ to every inclusion $V \se U$ of open subsets of $X$ such that $r_{U,W}= r_{V,W} r_{U,V}$ for inclusions $U \se V \se W$ of open subsets.
Elements of $\cG(U)$ are often called \vocab{sections} of $\cG$ on $U$ or \vocab{global sections} when $U = X$.
Let $U \se X$ be open and $U =\bigcup_{i \in I} U_i$ an open covering.
A family $(f_i)_{i \in I}\in\prod_{i \in I}\cG(U_i)$ is called \vocab[Sections!compatible]{compatible} if $r_{U_i, U_i \cap U_j}(f_i)= r_{U_j, U_i \cap U_j}(f_j)$ for all $i,j \in I$.
A presheaf is called \vocab[Presheaf!separated]{separated} if $\phi_{U, (U_i)_{i \in I}}$ is injective for all such $U$ and $(U_i)_{i \in I}$.\footnote{This also called ``locality''.}
It satisfies \vocab{gluing} if $\phi_{U, (U_i)_{i \in I}}$ is surjective.
A presheaf is called a \vocab{sheaf} if it is separated and satisfies gluing.
The bijectivity of the $\phi_{U, (U_i)_{i \in I}}$ is called the \vocab{sheaf axiom}.
\end{definition}
\begin{dtrivial}
A presheaf is a contravariant functor $\cG : \cO(X)\to C$ where $\cO(X)$ denotes the category of open subsets of $X$ with inclusions as morphisms and $C$ is the category of sets, rings or (abelian) groups.
\end{dtrivial}
\begin{definition}
A subsheaf $\cG'$ is defined by subsets (resp. subrings or subgroups) $\cG'(U)\se\cG(U)$ for all open $U \se X$ such that the sheaf axioms still hold.
\end{definition}
\begin{remark}
If $\cG$ is a sheaf on $X$ and $\Omega\se X$ open, then $\cG\defon{\Omega}(U)\coloneqq\cG(U)$ for open $U \se\Omega$ and $r_{U,V}^{(\cG\defon{\Omega})}(f)\coloneqq r_{U,V}^{(\cG)}(f)$ is a sheaf of the same kind as $\cG$ on $\Omega$.
\end{remark}
\begin{remark}
The notion of restriction of a sheaf to a closed subset, or of preimages under general continuous maps, can be defined but this is a bit harder.
\end{remark}
\begin{notation}
It is often convenient to write $f \defon{V}$ instead of $r_{U,V}(f)$.
\end{notation}
\begin{remark}
Applying the \vocab{sheaf axiom} to the empty covering of $U =\emptyset$, one finds that $\cG(\emptyset)=\{0\}$.
\end{remark}
\subsubsection{Examples of sheaves}
\begin{example}
Let $G$ be a set and let $\fG(U)$ be the set of arbitrary maps $U \xrightarrow{f} G$. We put $r_{U,V}(f)= f\defon{V}$.
It is easy to see that this defines a sheaf.
If $\cdot$ is a group operation on $G$, then $(f\cdot g)(x)\coloneqq f(x)\cdot g(x)$ defines the structure of a sheaf of group on $\fG$.
Similarly, a ring structure on $G$ can be used to define the structure of a sheaf of rings on $\fG$.
\end{example}
\begin{example}
If in the previous example $G$ carries a topology and $\cG(U)\se\fG(U)$ is the subset (subring, subgroup) of continuous functions $U \xrightarrow{f} G$, then $\cG$ is a subsheaf of $\fG$, called the sheaf of continuous $G$-valued functions on (open subsets of) $X$.
\end{example}
\begin{example}
If $X =\R^n$, $\bK\in\{\R, \C\}$ and $\cO(U)$ is the sheaf of $\bK$-valued $C^{\infty}$-functions on $U$, then $\cO$ is a subsheaf of the sheaf (of rings) of $\bK$-valued continuous functions on $X$.
\end{example}
\begin{example}
If $X =\C^n$ and $\cO(U)$ the set of holomorphic functions on $X$, then $\cO$ is a subsheaf of the sheaf of $\C$-valued $C^{\infty}$-functions on $X$.
For open subsets $U \se X$, let $\cO_X(U)$ be the set of functions $U \xrightarrow{\phi}\mathfrak{k}$ such that every $x \in U$ has a neighbourhood $V$ such that there are $f,g \in R$ such that for $y \in V$ we have $g(y)\neq0$ and $\phi(y)=\frac{f(y)}{g(y)}$.
Let $M \se\mathfrak{k}$ be closed. We must show the closedness of $N \coloneqq\phi\inv(M)$ in $U$. For $M =\mathfrak{k}$ this is trivial. Otherwise $M$ is finite and we may assume $M =\{t\}$ for some $t \in\mathfrak{k}$. For $x \in U$, there are open $V_x \se U$ and $f_x, g_x \in R$ such that $\phi=\frac{f_x}{g_x}$ on $V_x$.
For open $U \se X$, let $\cO_X(U)$ be the set of functions $U \xrightarrow{\phi}\mathfrak{k}$ such that for every $x \in U$, there are an open subset $W \se U$, a natural number $d$ and $f,g \in R_d$ such that $W \cap\Vp(g)=\emptyset$ and $\phi(y)=\frac{f(y_0,\ldots,y_n)}{g(y_0,\ldots,y_n)}$ for $y =[y_0,\ldots,y_n]\in W$.
This is a subsheaf of rings of the sheaf of $\mathfrak{k}$-valued functions on $X$.
Under the identification $\bA^n =\mathfrak{k}^n$ with $\bP^n \sm\Vp(X_0)$, one has $\cO_X \defon{X \sm\Vp(X_0)}=\cO_{X \cap\bA^n}$ as subsheaves of the sheaf of $\mathfrak{k}$-valued functions, where the second sheaf is a sheaf on a closed subset of $\mathfrak{k}^n$:
Indeed, if $W$ is as in the definition then $\phi([1,y_1,\ldots,y_n])=\frac{f(1,y_1,\ldots,y_n)}{g(1,y_1,\ldots,y_n)}$ for $[1,y_1,\ldots,y_n]\in W$.
Conversely if $\phi([1,y_1,\ldots,y_n])=\frac{f(y_1,\ldots,y_n)}{g(y_1,\ldots,y_n)}$ on an open subset $W $ of $X \cap\bA^n$ then
$\phi([y_0,\ldots,y_n])=\frac{F(y_0,\ldots,y_n)}{G(y_0,\ldots,y_n)}$ on $W$ where $F(X_0,\ldots,X_n)\coloneqq X_0^d f(\frac{X_1}{X_0}, \ldots, \frac{X_n}{X_0})$ and $G(X_0,\ldots,X_n)= X_0^d g(\frac{X_1}{X_0},\ldots, \frac{X_n}{X_0})$ with a sufficiently large $d \in\N$.
\end{remark}
\begin{remark}
It follows from the previous remark and the similar result in the affine case that the elements of $\cO_X(U)$ are continuous on $U \sm V(X_0)$.
Since the situation is symmetric in the homogeneous coordinates, they are continuous on all of $U$.
\end{remark}
The following is somewhat harder than in the affine case:
\begin{proposition}
If $X$ is connected (e.g. irreducible), then the elements of $\cO_X\left( X \right)$ are constant functions on $X$.
\end{proposition}
% Lecture 14
\subsection{The notion of a category}
\begin{definition}
A \vocab{category}$\cA$ consists of:
\begin{itemize}
\item A class $\Ob\cA$ of \vocab[Objects]{objects of $\cA$}.
\item For two arbitrary objects $A, B \in\Ob\cA$, a \textbf{set}$\Hom_\cA(A,B)$ of \vocab[Morphism]{morphisms for $A$ to $B$ in $\cA$}.
\item A map $\Hom_\cA(B,C)\times\Hom_\cA(A,B)\xrightarrow{\circ}\Hom_\cA(A,C)$, the composition of morphisms, for arbitrary triples $(A,B,C)$ of objects of $\cA$.
\end{itemize}
The following conditions must be satisfied:
\begin{enumerate}[A]
\item For morphisms $A \xrightarrow{f} B\xrightarrow{g} C \xrightarrow{h} D$, we have $h \circ(g \circ f)=(h \circ g)\circ f$.
\item For every $A \in\Ob(\cA)$, there is an $\Id_A \in\Hom_{\cA}(A,A)$ such that $\Id_A \circ f = f$ (reps. $g \circ\Id_A = g$) for arbitrary morphisms $B \xrightarrow{f} A$ (reps. $A \xrightarrow{g} C).$
\end{enumerate}
A morphism $X \xrightarrow{f} Y$ is called an \vocab[Isomorphism]{isomorphism (in $\cA$)} if there is a morphism $Y \xrightarrow{g} X$ (called the \vocab[Inverse morphism]{inverse $f\inv$ of $f$)} such that $g \circ f =\Id_X$ and $f \circ g =\Id_Y$.
\end{definition}
\begin{remark}
\begin{itemize}
\item The distinction between classes and sets is important here.
\item We will usually omit the composition sign $\circ$.
\item It is easy to see that $\Id_A$ is uniquely determined by the above condition $B$, and that the inverse $f\inv$ of an isomorphism $f$ is uniquely determined.
\end{itemize}
\end{remark}
\subsubsection{Examples of categories}
\begin{example}
\begin{itemize}
\item The category of sets.
\item The category of groups.
\item The category of rings.
\item If $R$ is a ring, the category of $R$-modules and the category $\Alg_R$ of $R$-algebras
\item If $\cA$ is a category, then the \vocab{opposite category} or \vocab{dual category} is defined by $\Ob(\cA\op)=\Ob(\cA)$ and $\Hom_{\cA\op}(X,Y)=\Hom_\cA(Y,X)$.
\end{itemize}
In most of these cases, isomorphisms in the category were just called `isomorphism'. The isomorphisms in the category of topological spaces are the homeomophisms.
\end{example}
\subsubsection{Subcategories}
\begin{definition}[Subcategories]
A \vocab{subcategory} of $\cA$ is a category $\cB$ such that $\Ob(\cB)\se\Ob(\cA)$, such that $\Hom_\cB(X,Y)\se\Hom_\cA(X,Y)$ for objects $X$ and $Y$ of $\cB$, such that for every object $X \in\Ob(\cB)$, the identity $\Id_X$ of $X$ is the same in $\cB$ as in $\cA$, and such that for composable morphisms in $\cB$, their compositions in $\cA$ and $\cB$ coincide.
We call $\cB$ a \vocab{full subcategory} of $\cA$ if in addition $\Hom_\cB(X,Y)=\Hom_\cA(X,Y)$ for arbitrary $X,Y \in\Ob(\cB)$.
\end{definition}
\begin{example}
\begin{itemize}
\item The category of abelian groups is a full subcategory of the category of groups.
It can be identified with the category of $\Z$-modules.
\item The category of finitely generated $R$-modules as a full subcategory of the category of $R$-modules.
\item The category of $R$-algebras of finite type as a full subcategory of $\Alg_R$.
\subsubsection{Functors and equivalences of categories}
\begin{definition}
A \vocab[Functor!covariant]{(covariant) functor} (resp. \vocab[Functor!contravariant]{contravariant functor}) between categories $\cA\xrightarrow{F}\cB$ is a map $\Ob(\cA)\xrightarrow{F}\Ob(\cB)$ with a family of maps $\Hom_\cA(X,Y)\xrightarrow{F}\Hom_\cB(F(X),F(Y))$ (resp. $\Hom_\cA(X,Y)\xrightarrow{F}\Hom_\cB(F(Y),F(X))$ in the case of contravariant functors), where $X$ and $Y$ are arbitrary objects of $\cA$, such that the following conditions hold:
\begin{itemize}
\item$F(\Id_X)=\Id_{F(X)}$
\item For morphisms $X \xrightarrow{f} Y \xrightarrow{g} Z$ in $\cA$, we have $F(gf)= F(g)F(f)$ ( resp. $F(gf)= F(f)F(g)$)
\end{itemize}
A functor is called \vocab[Functor!essentially surjective]{essentially surjective} if every object of $\cB$ is isomorphic to an element of the image of $\Ob(\cA)\xrightarrow{F}\Ob(\cB)$.
A functor is called \vocab[Functor!full]{full} (resp. \vocab[Functor!faithful]{faithful}) if it induces surjective (resp. injective) maps between sets of morphisms.
It is called an \vocab{equivalence of categories} if it is full, faithful and essentially surjective.
\end{definition}
\begin{example}
\begin{itemize}
\item There are \vocab[Functor!forgetful]{forgetful functors} from rings to abelian groups or from abelian groups to sets which drop the multiplicative structure of a ring or the group structure of a group.
\item If $\mathfrak{k}$ is any vector space there is a contravariant functor from $\mathfrak{k}$-vector spaces to itself sending $V$ to its dual vector space $V\se$ and $V \xrightarrow{f} W$ to the dual linear map $W\st\xrightarrow{f\st} V\st$.
An \vocab{algebraic variety} or \vocab{prevariety} over $\mathfrak{k}$ is a pair $(X, \cO_X)$, where $X$ is a topological space and $\cO_X$ a subsheaf of the sheaf of $\mathfrak{k}$-valued functions on $X$ such that for every $x \in X$, there are a neighbourhood $U_x$ of $x$ in $X$, an open subset $V_x$ of a closed subset $Y_x$ of $\mathfrak{k}^{n_x}$\footnote{By the result of \ref{affopensubtopbase} it can be assumed that $V_x = Y_x$ without altering the definition.} and a homeomorphism $V_x \xrightarrow{\iota_x} U_x$ such that for every open subset $V \se U_x$ and every function $V\xrightarrow{f}\mathfrak{k}$, we have $f \in\cO_X(V)\iff\iota\st_x(f)\in\cO_{Y_x}(\iota_x\inv(V))$,
In this, the \vocab{pull-back}$\iota_x\st(f)$ of $f$ is defined by $(\iota_x\st(f))(\xi)\coloneqq f(\iota_x(\xi))$.
A morphism $(X, \cO_X)\to(Y, \cO_Y)$ of varieties is a continuous map $X \xrightarrow{\phi} Y$ such that for all open $U \se Y$ and $f \in\cO_Y(U)$, $\phi\st(f)\in\cO_X(\phi\inv(U))$.
An isomorphism is a morphism such that $\phi$ is bijective and $\phi\inv$ also is a morphism of varieties.
\end{definition}
\begin{example}
\begin{itemize}
\item If $(X, \cO_X)$ is a variety and $U \se X$ open, then $(U, \cO_X\defon{U})$ is a variety (called an \vocab{open subvariety} of $X$), and the embedding $U \to X$ is a morphism of varieties.
\item If $X$ is a closed subset of $\mathfrak{k}^n$ or $\bP^n$, then $(X, \cO_X)$ is a variety, where $\cO_X$ is the structure sheaf on $X$ (\ref{structuresheafkn}, reps. \ref{structuresheafpn}).
A variety is called \vocab[Variety!affine]{affine} (resp. \vocab[Variety!projective]{projective}) if it is isomorphic to a variety of this form, with $X $ closed in $\mathfrak{k}^n$ (resp. $\bP^n$).
A variety which is isomorphic to and open subvariety of $X$ is called \vocab[Variety!quasi-affine]{quasi-affine} (resp. \vocab[Variety!quasi-projective]{quasi-projective}).
\item If $X = V(X^2- Y^3)\se\mathfrak{k}^2$ then $\mathfrak{k}\xrightarrow{t \mapsto(t^3,t^2)} X$ is a morphism which is a homeomorphism of topological spaces but not an isomorphism of varieties.
\item If $U \se X$ is open, $U \xrightarrow{\lambda}\mathfrak{k}$ any function and every $x \in U$ has a neighbourhood $V_x \se U$ such that $\lambda\defon{V_x}\in\cO_X(V_x)$, then $\lambda\in\cO_X(U)$.
\item By the definition of variety, every $x \in U$ has a quasi-affine neighbourhood $V \se U$. We can assume $U$ to be quasi-affine and $X = V(I)\se\mathfrak{k}^n$, as the general assertion follows by an application of ii).
If $x \in U$ there are a neighbourhood $x \in W \se U$ and $a,b \in R =\mathfrak{k}[X_1,\ldots,X_n]$ such that $\vartheta(y)=\frac{a(y)}{b(y)}$ for $y \in W$, with $b(y)\neq0$.
restricts to an equivalence of categories between the category of affine varieties over $\mathfrak{k}$ and the full subcategory $\cA$ of $\Alg_\mathfrak{k}$,
having the $\mathfrak{k}$-algebras $A$ of finite type with $\nil A =\{0\}$ as objects.
It is clear that $\nil(\cO_X(X))=\{0\}$ for arbitrary varieties. For general varieties it is however not true that $\cO_X(X)$ is a $\mathfrak{k}$-algebra of finite type.
It suffices to investigate $\phi$ when $Y$ is an open subset of $V(I)\se\mathfrak{k}^n$, where $I =\sqrt{I}\se R$ is an ideal and $Y = V(I)$ when $Y$ is affine.
Let $(f_1,\ldots,f_n)$ be the components of $X \xrightarrow{f} Y \se\mathfrak{k}^n$. Let $Y \xrightarrow{\xi_i}\mathfrak{k}$ be the $i$-th coordinate.
Conversely, let $Y = V(I)$ and $\cO_Y(Y)\xrightarrow{\phi}\cO_X(X)$ be a morphism of $\mathfrak{k}$-algebras. Define $f_i \coloneqq\phi(\xi_i)$ and consider $X \xrightarrow{f =(f_1,\ldots,f_n)} Y\se\mathfrak{k}^n$.
For open $\Omega\se Y, U = f\inv(\Omega)=\{x \in X | \A\lambda\in J ~ (\phi(\lambda))(x)\neq0\}$ is open in $X$, where $Y \sm\Omega= V(J)$.
If $\lambda\in\cO_Y(\Omega)$ and $x \in U$, then $f(x)$ has a neighbourhood $V$ such that there are $a,b \in R$ with $\lambda(v)=\frac{a(v)}{b(v)}$ and $b(v)\neq0$ for all $v \in V$.
Let $W \coloneqq f\inv(V)$. Then $\alpha\coloneqq\phi(a)\defon{W}\in\cO_X(W)$, $\beta\coloneqq\phi(b)\defon{W}\in\cO_X(W)$.
By the second part of \ref{localinverse}$\beta\in\cO_X(W)^{\times}$ and $f\st(\lambda)\defon{W}=\frac{\alpha}{\beta}\in\cO_X(W)$.
The first part of \ref{localinverse} shows that $f\st(\lambda)\in\cO_X(U)$.
\end{subproof}
By definition of $f$, we have $f\st=\phi$. This finished the proof of the first point.
\begin{claim}
The functor in the second part maps affine varieties to objects of $\cA$ and is essentially surjective.
\end{claim}
\begin{subproof}
It follows from the remark that the functor maps affine varieties to objects of $\cA$.
Note that giving a contravariant functor $\cC\to\cD$ is equivalent to giving a functor $\cC\to\cD\op$. We have thus shown that the category of affine varieties is equivalent to $\cA\op$, where $\cA\subsetneq\Alg_\mathfrak{k}$ is the full subcategory of $\mathfrak{k}$-algebras $A$ of finite type with $\nil(A)=\{0\}$.
\subsubsection{Affine open subsets are a topology base}
\begin{definition}
A set $\cB$ of open subsets of a topological space $X$ is called a \vocab{topology base} for $X$ if every open subset of $X$ can be written as a (possibly empty) union of elements of $\cB$.
\end{definition}
\begin{fact}
If $X$ is a set, then $\cB\se\cP(X)$ is a base for some topology on $X$ iff $X =\bigcup_{U \in\cB} U$ and for arbitrary $U, V \in\cB, U \cap V$ is a union of elements of $\cB$.
\end{fact}
\begin{definition}
Let $X$ be a variety.
An \vocab{affine open subset} of $X$ is a subset which is an affine variety.
Then $U$ is an affine variety and the morphism $\phi: \cO_X(X)_\lambda\to\cO_X(U)$ defined by the restriction $\cO_X(X)\xrightarrow{\cdot |_U }\cO_X(U)$ and the universal property of the localization is an isomorphism.
Let $X$ be an affine variety over $\mathfrak{k}, \lambda\in\cO_X(X)$ and $U = X \sm V(\lambda)$. The fact that $\lambda\defon{U}\in\cO_x(U)^{\times}$ follows from \ref{localinverse}.
By the proposition about affine varieties (\ref{propaffvar}), the morphism $\mathfrak{s}: \cO_Y(Y)\cong A_\lambda\to\cO_X(U)$ corresponds to a morphism $U \xrightarrow{\sigma} Y$.
We have $\mathfrak{s}(Z \mod J)=\lambda\inv$ and $\mathfrak{s}(X_i \mod J)= X_i \mod I$.
Let $X = V(I)\se\mathfrak{k}^n$ with $I =\sqrt{I}$. If $U \se X$ is open then $X \sm U = V(J)$ with $J \supseteq I$ and $U =\bigcup_{f \in J}(X \sm V(f))$.
Thus $U$ is a union of affine open subsets. The same then holds for arbitrary quasi-affine varieties.
Let $X$ be any variety, $U \se X$ open and $x \in U$.
By the definition of variety, $x$ has a neighbourhood $V_x$ which is quasi-affine, and replacing $V_x$ by $U \cap V_x$ which is also quasi-affine we may assume $V_x \se U$.
$V_x$ is a union of its affine open subsets. Because $U$ is the union of the $V_x$, $U$ as well is a union of affine open subsets.
\end{proof}
% Lecture 14A TODO?
% Lecture 15
% CRTPROG
\subsection{Stalks of sheaves}
\begin{definition}[Stalk]
Let $\cG$ be a presheaf of sets on the topological space $X$, and let $x \in X$.
The \vocab{stalk} (\vocab[Stalk]{Halm}) of $\cG$ at $x$ is the set of equivalence classes of pairs $(U, \gamma)$, where $U$ is an open neighbourhood of $x$ and $\gamma\in\cG(U)$
and the equivalence relation $\sim$ is defined as follows:
$( U , \gamma)\sim(V, \delta)$ iff there exists an open neighbourhood $W \se U \cap V$ of $x$ such that $\gamma\defon{W}=\delta\defon{W}$.
If $\cG$ is a presheaf of groups, one can define a groups structure on $\cG_x$ by
Let $\gamma,\delta\in\cG(U)$. If $\cG$ is a sheaf\footnote{or, more generally, a separated presheaf} and if for all $x \in U$, we have $\gamma_x =\delta_x$, then $\gamma=\delta$.
In the case of a sheaf, the image of the injective map $\cG(U)\xrightarrow{\gamma\mapsto(\gamma_x)_{x \in U}}\prod_{x \in U}\cG_x$
is the set of all $(g_x)_{x \in U}\in\prod_{x \in U}\cG_x $ satisfying the following \vocab{coherence condition}:
For every $x \in U$, there are an open neighbourhood $W_x \se U$ of $x$ and $g^{(x)}\in\cG(W_x)$ with $g_y^{(x)}= g_y$ for all $y \in W_x$.
\end{fact}
\begin{proof}
Because of $\gamma_x =\delta_x$, there is $x \in W_x \se U$ open such that $\gamma\defon{W_x}=\delta\defon{W_x}$. As the $W_x$ cover $U$, $\gamma=\delta$ by the sheaf axiom.
\end{proof}
\begin{definition}
Let $\cG$ be a sheaf of functions.
Then $\gamma_x$ is called the \vocab{germ} of the function $\gamma$ at $x$.
The \vocab[Germ!value at $x$]{value at $x$} of $g =(U, \gamma)/\sim\in\cG_x$ defined as $g(x)\coloneqq\gamma(x)$, which is independent of the choice of the representative $\gamma$.
\end{definition}
\begin{remark}
If $\cG$ is a sheaf of $C^{\infty}$-functions (resp. holomorphic functions), then $\cG_x$ is called the ring of germs of $C^\infty$-functions (resp. of holomorphic functions) at $x$.
\end{remark}
\subsubsection{The local ring of an affine variety}
\begin{definition}
If $X$ is a variety, the stalk $\cO_{X,x}$ of the structure sheaf at $x$ is called the \vocab{local ring} of $X$ at $x$.
This is indeed a local ring, with maximal ideal $\fm_x =\{f \in\cO_{X,x} | f(x)=0\}$.
\end{definition}
\begin{proof}
By \ref{localring} it suffices to show that $\fm_x$ is a proper ideal, which is trivial, and that the elements of $\cO_{X,x}\sm\fm_x$ are units in $\cO_{X,x}$.
Let $g =(U, \gamma)/\sim\in\cO_{X,x}$ and $g(x)\neq0$.
$\gamma$ is Zariski continuous (first point of \ref{localinverse}). Thus $V(\gamma)$ is closed. By replacing $U$ by $U \sm V(\gamma)$ we may assume that $\gamma$ vanishes nowhere on $U$.
By the third point of \ref{localinverse} we have $\gamma\in\cO_X(U)^{\times}$.
Let $X =\Va(I)\se\mathfrak{k}^n$ be equipped with its usual structure sheaf, where $I =\sqrt{I}\se R =\mathfrak{k}[X_1,\ldots,X_n]$ . Let $x \in X$ and $A =\cO_X(X)\cong R / I$.
$\{P \in R | P(x)=0\}\text{\reflectbox{$\coloneqq$}}\fn_x \se R$ is maximal, $I \se\fn_x$ and $\fm_x \coloneqq\fn_x / I$ is the maximal ideal of elements of $A$ vanishing at $x$.
If $\lambda\in A \sm\fm_x$, we have $\lambda_x \in\cO_{X,x}^{\times}$, where $\lambda_x$ denotes the image under $A \cong\cO_X(X)\to\cO_{X,x}$.
By the universal property of the localization, there exists a unique ring homomorphism $A_{\fm_x}\xrightarrow{\iota}\cO_{X,x}$
such that
\begin{figure}[H]
\centering
\begin{tikzcd}
A \arrow{r}{}\arrow{d}{\lambda\mapsto\lambda_x}& A_{\fm_x}\arrow[dotted, bend left]{ld}{\Eone\iota}\\
\cO_{X,x}
\end{tikzcd}
\end{figure}
commutes.
The morphism $A_{\fm_x}\xrightarrow{\iota}\cO_{X,x}$ is an isomorphism.
\end{proposition}
\begin{proof}
To show surjectivity, let $\ell=(U, \lambda)/\sim\in\cO_{X,x}$, where $U$ is an open neighbourhood of $x$ in $X$.
We have $X \sm U = V(J)$ where $J \se A$ is an ideal. As $x \in U$ there is $f \in J$ with $f(x)\neq0$. Replacing $U $ by $X \sm V(f)$ we may assume $U = X \sm V(f)$.
By \ref{oxulocaf}, $\cO_X(U)\cong A_f$, and $\lambda= f^{-n}\vartheta$ for some $n \in\N$ and $\vartheta\in A$.
Then $\ell=\iota(f^{-n}\vartheta)$ where the last fraction is taken in $A_{\fm_x}$.
Let $\lambda=\frac{\vartheta}{g}\in A_{\fm_x}$ with $\iota(\lambda)=0$.
It is easy to see that $\iota(\lambda)=(X \sm V(g), \frac{\vartheta}{g})/\sim$.
Thus there is an open neighbourhood $U$ of $x$ in $X \sm V(g)$ such that $\vartheta$ vanishes on $U$.
Similar as before there is $h \in A$ with $h(x)\neq0$ and $W = X \sm V(h)\se U$.
By the isomorphism $\cO_X(W)\cong A_h$, there is $n \in\N$ with $h^{n}\vartheta=0$ in $A$. Since $h \not\in\fm_x$, $h$ is a unit and the image of $\vartheta$ in $A_{\fm_x}$ vanishes, implying $\lambda=0$.
\end{proof}
\subsubsection{Intersection multiplicities and Bezout's theorem}
Let $G \in R_g, H \in R_h$ be homogeneous polynomials with $x \in V(G)\cap V(h)$.
Let $\ell\in R_1$ such that $\ell(x)\neq0$. Then $x \in U =\bP^2\sm V(\ell)$ and the rational functions $\gamma=\ell^{-g}G, \eta=\ell^{-h}H$ are elements of $\cO_{\bP^2}(U)$.
Let $I_x(G,H)\se\cO_{\bP^2,x}$ denote the ideal generated by $\gamma_x$ and $\eta_x$.
\noindent The dimension $\dim_{\mathfrak{k}}(\cO_{X,x}/ I_x(G,H))\text{\reflectbox{$\coloneqq$}} i_x(G,H)$ is called the \vocab{intersection multiplicity} of $G$ and $H$ at $x$.
If $\tilde\ell\in R_1$ also satisfies $\tilde\ell(x)\neq0$, then the image of $\tilde\ell/\ell$ under $\cO_{\bP^2}(U)\to\cO_{\bP^2,x}$ is a unit, showing that the image of $\tilde\gamma=\tilde\ell^{-g} G$ in $\cO_{\bP^2,x}$ is multiplicatively equivalent to $\gamma_x$, and similarly for $\eta_x$.
Thus $I_x(G,H)$ does not depend on the choice of $\ell\in R_1$ with $\ell(x)\neq0$.
\end{remark}
\begin{theorem}[Bezout's theorem]
In the above situation, assume that $V(H)$ and $V(G)$ intersect properly in the sense that $V(G)\cap V(H)\se\bP^2$ has no irreducible component of dimension $\ge1$.
Then
\[
\sum_{x \in V(G) \cap V(H)} i_x(G,H) = gh
\]
Thus, $V(G)\cap V(H)$ has $gh$ elements counted by multiplicity.
\end{theorem}
\printvocabindex
\end{document}
\if\false
% TODO REMARK ABOUT ZORNS LEMMA (LECTURE 1)
% TODO REMARK ABOUT FIN PRESENTED MODULES (LECTURE 2)
\item[HNS2 $\implies$ HNS1b] Let $I \se\mathfrak{l}[X_1,\ldots,X_n]$. $I \se\fm$ maximal. $R /\fm$ is isomorphic to a field extension of $\mathfrak{l}$. Finite by HNS2.
\item[NNT $\implies$ HNS2] Apply NNT to $L / K$$\leadsto$ alg. independent $a_i$ such that $L$ is finite over the image of $K[X_1,\ldots,X_n]\xrightarrow{\ev_a} L$ ($\ev_a : P \to P(a_1,\ldots,a_n)$).
$\ev_a(K[X_1,\ldots,X_n])$ is a field by fact about integrality and fields \ref{fintaf}. Hence $n =0$ and $L / K$ is finite.
\item[UNCHNS2]$K$ uncountable, $L / K$ fin. type. Then $\dim_K L$ is countable. Suppose $l \in L$ is not integral. Then $K(l)\cong K(T)$ and $\dim_K L \ge\dim_K K(T)\ge\aleph_1$.
Thus $L / K$ algebraic $\implies$ integral $\implies$ finite.
Technical lemma for Noether normalization: For $S \se\N^n$ finite, there exists $k \in\N^n$ such that $k_1=1$ and $s_1\neq s_2\in S \implies\langle k, s_1\rangle\neq\langle k, s_2\rangle$:
For $s_1\neq s_2$, % TODO
Noether normalization:
$a_i \in A$ minimal such that $A$ is integral over the subalgebra genereted by the $a_i$.
Suppose $\E P \in K[X_1,\ldots,X_n]\sm\{0\} ~ P(a_1,\ldots,a_n)=0$. $P =\sum_{\alpha\in\N^n} p_\alpha X^\alpha, S \coloneqq\{\alpha\in\N^n | p_\alpha\neq0\}$.
Choose $k$ as in the lemma.
$b_i \coloneqq a_{i+1}- a_1^{k_{i+1}}, 1\le i <n$. Claim: $A$ is integral ober subalgebra $B$ generated by the $b_i$ ($\lightning$ minimality)
$A \mathfrak{l}$-algebra of finite type, $\fp, \fq\in\Spec A, \fp\subsetneq\fq$. Then $\trdeg(\mathfrak{k}(\fp)/\mathfrak{l}) > \trdeg(\mathfrak{k}(\fq)/\mathfrak{l})$:
If $\fq\not\in\mSpec A$, let $a_1,\ldots,a_n \in A$ alg. independent such that the $\overline{a_i}$ are a transcendence base for $\mathfrak{k}(\fq)/\mathfrak{k}$
$\le n$ a first result in dim T ($\fp\subsetneq\fq\implies\trdeg(\mathfrak{k}(\fq)/\mathfrak{l}) < \trdeg(\mathfrak{k}(\fp)/\mathfrak{l})$. Thus $\codim(X,Y)\le\trdeg(\fK(Y)/\mathfrak{l})-\trdeg(\fK(X)/\mathfrak{l})$.
$\dim Y \ge\trdeg(\mathfrak{k}(Y)/\mathfrak{k})$: Noether normalization. Subalgebra $\cong\mathfrak{k}[X_1,\ldots,X_d]$. Lift chain of prime ideals using going up.
Action of $\Aut(L/K)$ on prime ideals of a normal ring extension. $A$ normal domain, $L / Q(A)$ normal field extension, $B$ int closure of $A$ in $L$, $\fp\in\Spec A$.
Then $\Aut(L / K)$ transitively acts on $\{\fq\in\Spec B | \fq\cap A =\fp\}$ :
\begin{itemize}
\item$\fq, \fr\in\Spec B$ lying over $\fp$.
\item only need to show $\fq\se\sigma(\fr)$ for some $\sigma\in G$ (Krull going-up, no inclusions)
\item Suppose not. Then $x \in\fq\sm\bigcup_{\sigma\in G}\sigma(\fr)$ (prime aviodance)
\item$y =\prod_{\sigma\in G}\sigma(x)\in\fq\sm\fr$ ($\fr$ prime ideal)
\item$\E k \in\N$ s.t. $y^k \in K$ ($y \in L^G$)
\item$y^k \in K \cap B = A $ ($A$ normal). Thus $y^k \in(A \cap\fq)\sm(A \cap\fr)=\fp\sm\fp$.
\item$L / K$ infinite: Apply Zorn to pairs $(M, \sigma)$ where $K \se M \se L$ and $\sigma\in\Aut(M /K)$ s.t. $\sigma(\fr\cap M)=\fq\cap M$.