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
This subset of $N \subseteq 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$}.
\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 \subseteq M$ a submodule, then $N' \coloneqq f^{-1}(N)$ and $N''\coloneqq p(N)$ are finitely generated. Since $0\to N' \to N \to N'' \to0$ is exact, $N$ is finitely generated.
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$.
$=$ 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 $\mathfrak{A}$ be the matrix with the $\rho_i$ as columns.
Then for all $v \in R^n: q(\mathfrak{A}\cdot v)= a \cdot q(v)$. By induction it follows that $q(P(\mathfrak{A})\cdot v)= P(a)q(v)$ for all $P \in R[T]$. Applying this to $P(T)=\det(T\cdot\mathbf{1}_n -\mathfrak{A})$ 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.
Let $a \in A$ satisfy B. Let $B$ be a subalgebra of $A$ containing $b$ and finite over $R$. Let $M_n \subseteq 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 \subseteq 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$.
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[T] Let $b \in B$ such that $b^n =\sum_{i=0}^{n-1} a_ib^{i}$. Then there is a subalgebra $\tilde{A}\subseteq A$ finite over $R$, such that all $a_i \in\tilde{A}$.
$b$ is integral over $\tilde{A}\implies\exists\tilde{B}\subseteq 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.
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 \subseteq A$ such that all $a_i \in B$.
Let $B$ be a field and $a \in A \setminus\{0\}$. Then $a^{-1}\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
On the other hand, let $B$ be integral over the field $A$. Let $b \in B \setminus\{0\}$. As $B$ is integral over $A$, there is a sub-$A$-algebra $\tilde{B}\subseteq 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 $\exists x \in\tilde{B} : b \cdot x \cdot1$.
Let $S \subseteq\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]\setminus\{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$.
$x \in\mathfrak{k}^n$ is \vocab[Ideal!zero]{a zero of $I$} if $\forall x \in I: P(x)=0$. Let $\Va(I)$ denote the set of zeros if $I$ in $\mathfrak{k}^n$.
Let $I$ be generated by $S$. Then $\{x \in R | \forall s \in S: s(x)=0\}=\Va(I)$. Thus zero sets of ideals correspond to solutions sets to systems of polynomial equations.
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$.
$R /\mathfrak{m}$ is of finite type, since the images of the $X_i$ generate it as a $\mathfrak{l}$-algebra.
There are thus a field extension $\mathfrak{i}/\mathfrak{l}$ and an isomorphism $R /\mathfrak{m}\xrightarrow{\iota}\mathfrak{i}$ of $\mathfrak{l}$-algebras.
Both sides are morphisms $R \to\mathfrak{i}$ 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.
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
\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 \subseteq M \subseteq 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}).
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)\subseteq\Va(\sum_{\lambda\in\Lambda} I_\lambda)$.
There is a topology on $\mathfrak{k}^n$ for which the set of closed sets coincides with the set $\mathfrak{A}$ of subsets of the form $\Va\left(I \right)$ for ideals $I \subseteq 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.
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$.
\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 \setminus A =\bigcup_{j =0}^{\infty}(X \setminus A_j)$ has a finite subcovering.
\item[B $\implies$ C] Suppose $\mathcal{M}$ does not have a $\subseteq$-minimal element. Using DC, one can construct a counterexample $A_1\subsetneq A_2\supsetneq\ldots$ to B.
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.
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$.
A subset $Z \subseteq 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 \subseteq Y \subseteq X$ coincides with $Z$.
\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$.
Let $\mathfrak{M}$ be the set of closed subsets of $X$ which cannot be decomposed as a union of finitely many irreducible subsets.
Suppose $\mathfrak{M}\neq\emptyset$. Then there exists a $\subseteq$-minimal $Y \in\mathfrak{M}$. $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 \subseteq Z_i$. Thus the $Z_i$ are irreducible components. Conversely, if $Y$ is an irreducible component of $X$, $Y \subseteq Z_i$ for some $i$ and $Y = Z_i$ by the definition of irreducible component.
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 \subseteq 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 \setminus I, g \in K \setminus 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 $\subseteq$-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 \subseteq 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$.
\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$.
f: \{A \subseteq X | A \text{ irreducible, closed and } Y \subseteq A\}&\longrightarrow\{B \subseteq U | B \text{ irreducible, closed and } Y \cap U \subseteq B\}\\
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}
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(\mathfrak{K}(Z)/\mathfrak{k})=\trdeg(Q(\mathfrak{k}[X_1,\ldots,X_n])/\mathfrak{k})= n$).
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)\subseteq\mathfrak{k}^n$ has codimension one, and every codimension one subset of $\mathfrak{k}^n$ has this form.
If $X \subseteq Y \subseteq\mathfrak{k}^n$ is irreducible and closed, then $Y = V(\fq)$ for some prime ideal $\fp\subseteq pR$.
If $Y \neq\mathfrak{k}^n$, then $\fp\neq\{0\}$. By \ref{ufdprimeideal} there exists a prime element $q \in\fq$. As $\fq\subseteq pR$ we have $p \divides q$.
Let $X$ be a set, $\mathcal{P}(X)$ the power set of $X$. A \vocab{Hull operator} on $X$ is a map $\mathcal{P}(X)\xrightarrow{\mathcal{H}}\mathcal{P}(X)$ such that
\item[M] If $m,n \in X$ and $A \subseteq X$ then $m \in\mathcal{H}(\{n\}\cup A)\setminus\mathcal{H}(A)\iff n \in\mathcal{H}(\{m\}\cup A)\setminus\mathcal{H}(A).$
\item[F]$\mathcal{H}(A)=\bigcup_{F \subseteq A \text{ finite}}\mathcal{H}(F)$.
If $\mathcal{H}$ 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.
Let $L / K$ be a field extension and let $\mathcal{H}(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$.}
H1, H2 and F are trivial. For an algebraically closed subfield $K \subseteq M \subseteq L$ we have $\mathcal{H}(M)= M$. Thus $\mathcal{H}(\mathcal{H}(T))=\mathcal{H}(T)$ (H3).
Let $x,y \in L$, $T \subseteq L$ and $x \in\mathcal{H}(T \cup\{y\})\setminus\mathcal{H}(T)$. We have to show that $y \in\mathcal{H}(T \cup\{x\})\setminus\mathcal{H}(T)$.
If $y \in\mathcal{H}(T)$ we have $\mathcal{H}(T \cup\{y\})\subseteq\mathcal{H}(\mathcal{H}(T))=\mathcal{H}(T)\implies x \in\mathcal{H}(T)\setminus\mathcal{H}(T)\lightning$.
Hence it is sufficient to show $y \in\mathcal{H}(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\mathcal{H}(\emptyset)$. Thus $\hat{P}\in\hat{M}[X]\setminus\{0\}$, where $\hat{M}$ is the subfield of $L$ generated by $K$ and $x$. Thus $y$ is algebraic over $\hat{M}$ and $y \in\mathcal{H}(\{x\})$,
Let $L / K$ be a field extension and $\mathcal{H}(T)$ the algebraic closure in $L$ of the subfield generated by $K$ and $T$. A base for $(L, \mathcal{H})$ 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$.
\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.
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$.
\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.
However, if $b =\varepsilon\prod_{i=1}^{l} P_i$ is a decomposition of $b$ into prime factors $P_i$ and a unit $\varepsilon$ in $R$ and $g =\frac{1}{P}$, wehere $P \in R$ is a prime element not multiplicatively equvalent to any $P_i$,
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 \subseteq 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}
As the elements of $\fp$ vanish on $X$, $R /\fp$ may be viewed as the ring of polynomials and $\mathfrak{K}(X)$ as the field of rational functions on $X$.
If $X \subseteq\mathfrak{k}^n$ is irreducible, then $\dim X =\trdeg(\mathfrak{k}(X)/\mathfrak{k})$ and $\codim(X, \mathfrak{k}^n)= n -\trdeg(\mathfrak{K}(X)/\mathfrak{k})$.
More generally if $Y \subseteq\mathfrak{k}^n$ is irreducible and $X \subseteq Y$, then $\codim(X,Y)=\trdeg(\mathfrak{K}(Y)/\mathfrak{k})-\trdeg(\mathfrak{K}(X)/\mathfrak{k})$.
\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 $\MaxSpec R$.
This defines a bijection $\mathfrak{k}^n \cong\MaxSpec R$ which is a homeomorphism if $\MaxSpec R$ is equipped with the induced topology from the Zariski topology on $\Spec R$.
Let $S \subseteq R$ be a multiplicative subset. Then there is a ring homomorphism $R \xrightarrow{i} R_S$ such that $i(S)\subseteq 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)\subseteq T^{\times}$, then there is a unique ring homomorphism $R_S \xrightarrow{\iota} T$ with $j =\iota i$.
Let $R_S \coloneqq(R \times S)/\sim$, where $(r,s)\sim(\rho, \sigma) : \iff\exists 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.}
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.
Let $R$ be any ring, $I \subseteq 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$.
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}}$.
We show that both rings have the universal property for ring homomorphisms $R \xrightarrow{\tau} T$ with $\tau(I)=\{0\}$ and $\tau(S)\subseteq 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)\subseteq 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$.
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 $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\MaxSpec(A_1)$ and the special case of $\fq\in\MaxSpec(A)$
Let $X, Y \subseteq\mathfrak{k}^n$ be irreducible and closed. Then $\codim(X,Y)\le\trdeg(\mathfrak{K}(Y)/\mathfrak{k})-\trdeg(\mathfrak{K}(X)/\mathfrak{k})$.
Assume that $\mathfrak{m}= R \setminus 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\mathfrak{m}$. Hence $R = xR \subseteq I \subseteq\mathfrak{m}$. It follows that $\mathfrak{m}$ is the only maximal ideal of $R$.
\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 \setminus\fp$ is a multiplicative subset, $A_S$ is a local ring with maximal ideal $\mathfrak{m}=\fp_S =\{\frac{p}{s}| p \in\fp, s \in S\}$.
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 \setminus S$ for all $a \in A, s \in 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 \setminus\fp$ iff $\fr\subseteq\fp$.
Let $Y = V(\fp)\subseteq\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\subseteq\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$''.
\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\subseteq\tilde\fq$ and $\tilde\fp=\tilde\fq\sqcap R$.
\vocab{Going-down} holds for $A / R$ if for arbitrary $\tilde\fq\in\Spec A$ and arbitrary $\fp\in\Spec R$ with $\fp\subseteq\tilde\fq\sqcap R$, there exists $\fq\in\Spec A$ with $\fq\subseteq\tilde\fq$ and $\fp=\fq\sqcap R$.
\item[A] Suppose $\fp\in\Spec R$ and let $S \coloneqq R \setminus\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}$.
D has already been shown and applies to $A_\fp/ R_\fp$, hence $i^{-1}(\mathfrak{m})=\fp_\fp$ is the only maximal ideal of the local ring $R_\fp$. Hence $\fq=\alpha^{-1}(\mathfrak{m})$ satisfies
\item[B] The map $\Spec A_\fp\xrightarrow{\alpha^{-1}}\Spec A$ is injective with image equal to $\{\fq\in\Spec A | \fq\cap R \subseteq\fp\}$. In particular, it contains the set of all $\fq$ lying over $\fp$.
If $\fq=\alpha^{-1}(\fr)$ lies over $\fp$, then \[\rho^{-1}(i^{-1}(\fr))=(\alpha^{-1}(\fr))\cap R =\fq\cap R =\fp=\rho^{-1}(\fp_\fp)\]
hence $i^{-1}(\fr)=\fp_\fp$ by the injectivity of $\Spec R_\fp\xrightarrow{\rho^{-1}}\Spec R$.
There are thus no inclusions between different such $\fr$. Because $\Spec A_\fp\xrightarrow{\alpha^{-1}}\Spec A$ is $\subseteq$-monotonic and injective, there are no inclusions between different $\fp\in\Spec A$ lying over $\fp$.
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 $\mathfrak{K}(Y)$ of the subfield of $\mathfrak{K}(Y)$ generated by $\mathfrak{k}$ and the $f_i$. We have $A \subseteq L$ and since $\mathfrak{K}(Y)= Q(B /\fp)= Q(A)$\footnote{by definition} it follows that $\mathfrak{K}(Y)= L$. Hence $(f_i)_{i=1}^d$ is a transcendence base for $\mathfrak{K}(y)/\mathfrak{k}$ and $d =\trdeg\mathfrak{K}(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}\subseteq\fq_i$ and $\fq_i \cap R =\fp_i$ (thus $\fq_{i-1}\subsetneq\fq_i$ as $\fp-i \neq\fp_{i-1})$.
The general case of $\codim(X,Y)\ge\trdeg(\mathfrak{K}(Y)/\mathfrak{k})-\trdeg(\mathfrak{K}(X)\setminus\mathfrak{k})$ is shown in \ref{proofcodimletrdeg}.
Let $A$ be a ring and $I \subseteq 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 \subseteq\fp_i$. Then $I \not\subseteq\bigcup_{i=1}^n \fp_i$.
By the induction assumption, there is $f_k \in I \setminus\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.
\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.
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 \subseteq\Aut(L / K)$ be a subgroup. Then the \vocab{fixed field } is definied as
If $K \subseteq M \subseteq 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 \subseteq N \subseteq 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$.
If $M = K(l)\subseteq 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.
A finite field extension of $\Q$ is called an \vocab{algebraic number field} (ANF). If $K$ is an ANF, let $\mathcal{O}_K$ (the \vocab[Ring of integers in an ANF]{ring of integers in $K$}) be the integral closure of $\Z$ in $K$.
This is equivalent to $\fq\subseteq\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\setminus\bigcup_{\sigma\in G}\sigma(\fr)$.
As $\fr$ is a prime ideal, $y =\prod_{\sigma\in G}\sigma(x)\in\fq\setminus\fr$.\footnote{$\prod_{\sigma\in G}\sigma(x)=\prod_{\sigma\in G}\sigma^{-1}(x)$}
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$.
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 $\mathcal{O}_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\mathcal{O}_L$ for which $\fq\cap K$ is a given $\fp\in\Spec\mathcal{O}_K$.
Let $\fp\subseteq\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' \subseteq\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\subseteq\tilde\fr$ and $\fr\cap A =\fp$.
If $\fp\subseteq\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\subseteq\tilde\fr$ and $\fr\cap A =\fp$.
Then $\fq\coloneqq\fr\cap B \in\Spec B, \fq\subseteq\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\subseteq A$ we have $X =\frac{X}{Y}\cdot Y \in\fq$.
Consider $(Y)_R \subsetneq(X,Y)_R \subseteq\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$.
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^{-1}(\{0\})$ but cannot rule out that there are other $y \in F^{-1}(\{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(\mathfrak{K}(Y)/\mathfrak{k})-\trdeg(\mathfrak{K}(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 $Y \coloneqq V(\fq)\subseteq\mathfrak{k}^n$, $\tilde\fp\coloneqq\pi_{B, \fq}^{-1}(\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\subseteq\fp$ of $A$ contained in $\fp$ and the prime ideals and the prime ideals $\tilde\fr\in\Spec B$ with $\fq\subseteq\tilde\fr\subseteq\tilde\fp$:
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 \subseteq Y$ of irreducible subsets and
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 \subseteq\Spec A$ of irreducible subsets, and $\hght(\fp)=\codim(V(\fp), \Spec A)$.
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\}\subseteq\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}(\mathfrak{m})= A /\mathfrak{m}$ 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\mathfrak{m})=0$ in $\mathfrak{k}(\mathfrak{m})$.
Let $\tilde x_i \coloneqq P_i(x_i)\in\mathfrak{m}$ 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\mathfrak{m}$.
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 \subseteq R$ be the ideal generated by $(X_j)_{j=i+1}^d$. We have $\mathfrak{m}\sqcap R =\fp_0$ as all $X_i \in\mathfrak{m}$, hence $X_i \in\mathfrak{m}\sqcap R$ and $\fp_0$ is a maximal ideal.
By applying going-down and induction on $i$, there is a chain $\mathfrak{m}=\fq_0\supsetneq\fp_1\supsetneq\ldots\supsetneq\fp_d$ of elements of $\Spec A$ such that $\fq_i \sqcap R =\fp_i$.
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\MaxSpec(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_{\mathfrak{m}\in\MaxSpec A}\hght(\mathfrak{m})$, the Krull dimension of the Noetherian topological space $\Spec A$ may nevertheless be infinite.
\begin{example}+[Noetherian ring with infinite dimension]\footnote{\url{https://math.stackexchange.com/questions/1109732/noetherian-ring-with-infinite-krull-dimension-nagatas-example}}
Let $X \subseteq\mathfrak{k}^n$ and $Y \subseteq\mathfrak{k}^n$ be irreducible and closed. Then $X \times Y$ is also an irreducible closed subset of $\mathfrak{k}^{m+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 \subseteq\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 \subseteq 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.
For a ring $A$, $\bigcap_{\fp\in\Spec A}\fp=\sqrt{\{0\}}=\{a \in A | \exists k \in\N ~ a^k =0\}\text{\reflectbox{$\coloneqq$}}\nil(A)$, the set of nilpotent elements of $A$.
It is clear that elements of $\sqrt{\{0\}}$ must belong to all prime ideals. Conversely, let $a \in A \setminus\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}}
Under this bijection, the irreducible subsets correspond to the prime ideals and the closed points $\{\mathfrak{m}\}, \mathfrak{m}\in\Spec A$ to the maximal ideals.
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.
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.
If $R$ is Noetherian and $I \subseteq R$ an ideal, then the set $\Vspec(I)=\{\fp\in\Spec R | I \subseteq\fp\}$ has finitely many $\subseteq$-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.
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 \subseteq\fq$. Also $\fp_i \in\Vspec(\fp_i)\subseteq\Vspec(I)$.
It follows that the sets of $\subseteq$-minimal elements of $\Vspec(I)$ and of $\{\fp_1,\ldots,\fp_k\}$ coincide.
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 $\subseteq$-minimal element of $\bigcap_{i=1}^k V(a_i)$, the set of prime ideals containing all $a_i$.
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 \subseteq\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)$.
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 $\subseteq$-minimal element of the set of non-zero prime ideals of $R$} is a principal ideal.
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\setminus\{0\}$. Replacing $p$ by a prime factor of $p$, we may assume $p$ to be prime. Thus $\{0\}\subsetneq pR \subseteq\fp$ is a chain of prime ideals and since $\hght(\fp)=1$ it follows that $\fp= pR$.
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.
For a ring $A, \bigcap_{\mathfrak{m}\in\MaxSpec A}\mathfrak{m}=\{a \in A | \forall x \in A ~ 1- ax \in A^{\times}\}\text{\reflectbox{$\coloneqq$}}\rad(A)$, the \vocab{Jacobson radical} of $A$.
Suppose $\mathfrak{m}\in\MaxSpec A$ and $a \in A \setminus\mathfrak{m}$. Then $a \mod\mathfrak{m}\neq0$ and $A /\mathfrak{m}$ is a field. Hence $a \mod\mathfrak{m}$ has an inverse $x \mod\mathfrak{m}$.
Conversely, let $a \in A$ belong to all $\mathfrak{m}\in\MaxSpec 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 $\mathfrak{m}$. As $a \in\mathfrak{m}, 1=(1-ax)+ ax \in\mathfrak{m}$, a contradiction.
Hence every element of $\bigcap_{\mathfrak{m}\in\MaxSpec A}\mathfrak{m}$ 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
For a $\mathfrak{l}$-vector space $V$, let $\mathbb{P}(V)$ be the set of one-dimensional subspaces of $V$.
Let $\mathbb{P}^n(\mathfrak{l})\coloneqq\mathbb{P}(\mathfrak{l}^{n+1})$, the \vocab[Projective space]{$n$-dimensional projective space over $\mathfrak{l}$}.
For $0\le i \le n$ let $U_i \subseteq\mathbb{P}^n$ denote the set of $[x_0,\ldots,x_{n}]$ with $x_{i}\neq0$.
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\mathbb{P}^n$ differ by scaling with a $\lambda\in\mathfrak{l}^{\times}$, $x_i =\lambda\xi_i$. Since not all $x_i$ may be $0$, $\mathbb{P}^n =\bigcup_{i=0}^n U_i$. We identify $\mathbb{A}^n =\mathbb{A}^n(\mathfrak{l})=\mathfrak{l}^n$ with $U_0$ by identifying $(x_1,\ldots,x_n)\in\mathbb{A}^n$ with $[1,x_1,\ldots,x_n]\in\mathbb{P}^n$.
Then $\mathbb{P}^1=\mathbb{A}^1\cup\{\infty\}$ where $\infty=[0,1]$. More generally, when $n > 0$$\mathbb{P}^n \setminus\mathbb{A}^n$ can be identified with $\mathbb{P}^{n-1}$ identifying $[0,x_1,\ldots,x_n]\in\mathbb{P}^n \setminus\mathbb{A}^n$ with $[x_1,\ldots,x_n]\in\mathbb{P}^{n-1}$.
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 \subseteq 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$.
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$.
If $1=\sum_{d \in\bI}\varepsilon_d$ is the decomposition into homogeneous components, then $\varepsilon_a =1\cdot\varepsilon_a =\sum_{b \in\bI}\varepsilon_a\varepsilon_b$ with $\varepsilon_a\varepsilon_b \in A_{a+b}$.
By the uniqueness of the decomposition into homogeneous components, $\varepsilon_a \varepsilon_0=\varepsilon_a$ and $b \neq0\implies\varepsilon_a \varepsilon_b =0$.
Applying the last equation with $a =0$ gives $b\neq0\implies\varepsilon_b =\varepsilon_0\varepsilon_b =0$.
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.
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\mathbb{A}^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 $\mathbb{A}^n = U_0$, and the same holds for $U_i$ with $0\le i \le n$.
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.
\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 \subseteq R_0$, C implies the Noetherianness of $R_0$.
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$.
If $X \subseteq\mathbb{P}^n$ is closed, then $X =\Vp(J)$ for some homogeneous ideal $J \subseteq A$. \Wlog$J =\sqrt{J}$. If $J \not\subseteq A_+$, then $J = A$ (\ref{proja}), hence $X =\Vp(J)=\emptyset=\Vp(A_+)$.
Assume $X = X_1\cup X_2$ is a decomposition into proper closed subsets, where $X_k =\Vp(I_k)$ for some $I_k \subseteq A_+, I_k =\sqrt{I_k}$. Since $X_k$ is a proper subset of $X$, there is $f_k \in I_k \setminus\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}\setminus\fp$.
A homogeneous ideal $I \subseteq 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$.
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\}\]
If $Y$ and $Z$ are also irreducible with $X \subseteq Y \subseteq Z$, then $\codim(X,Y)=\codim(X \cap\mathbb{A}^n, Y \cap\mathbb{A}^n)$, $\codim(X,Z)=\codim(X \cap\mathbb{A}^n, Z \cap\mathbb{A}^n)$ and $\codim(Y,Z)=\codim(Y \cap\mathbb{A}^n, Z \cap\mathbb{A}^n)$.
The first assertion follows from \ref{bijproj} and \ref{bijiredprim} (bijection of irreducible subsets and prime ideals in the projective and affine case).
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 $P \in A_d$ is a prime element, then $H =\Vp(P)$ is a hypersurface in $\mathbb{P}^n$ and every hypersurface $H$ in $\mathbb{P}^n$ can be obtained in this way.
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 $\mathbb{P}^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}\subseteq 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$.
Let $A \subseteq\mathbb{P}^n$ and $B \subseteq\mathbb{P}^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$.
This shows that $\mathbb{P}^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 $\mathbb{P}^n$
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}).
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 \subseteq U$ of open subsets of $X$ such that $r_{U,W}= r_{V,W} r_{U,V}$ for inclusions $U \subseteq V \subseteq W$ of open subsets.
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}.
A presheaf is a contravariant functor $\cG : \mathcal{O}(X)\to C$ where $\mathcal{O}(X)$ denotes the category of open subsets of $X$ with inclusions as morphisms and $C$ is the category of sets, rings or (abelian) groups.
A subsheaf $\cG'$ is defined by subsets (resp. subrings or subgroups) $\cG'(U)\subseteq\cG(U)$ for all open $U \subseteq X$ such that the sheaf axioms still hold.
If $\cG$ is a sheaf on $X$ and $\Omega\subseteq X$ open, then $\cG\defon{\Omega}(U)\coloneqq\cG(U)$ for open $U \subseteq\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$.
If in the previous example $G$ carries a topology and $\cG(U)\subseteq\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$.
If $X =\R^n$, $\bK\in\{\R, \C\}$ and $\mathcal{O}(U)$ is the sheaf of $\bK$-valued $C^{\infty}$-functions on $U$, then $\mathcal{O}$ is a subsheaf of the sheaf (of rings) of $\bK$-valued continuous functions on $X$.
If $X =\C^n$ and $\mathcal{O}(U)$ the set of holomorphic functions on $X$, then $\mathcal{O}$ is a subsheaf of the sheaf of $\C$-valued $C^{\infty}$-functions on $X$.
For open subsets $U \subseteq X$, let $\mathcal{O}_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 \subseteq\mathfrak{k}$ be closed. We must show the closedness of $N \coloneqq\phi^{-1}(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 \subseteq U$ and $f_x, g_x \in R$ such that $\phi=\frac{f_x}{g_x}$ on $V_x$.
Let $\phi\in\mathcal{O}_X(X)$. for $x \in X$, there are an open subset $U_x \subseteq X$ and $f_x, g_x \in R$ such that $\phi=\frac{f_x}{g_x}$ on $U_x$.
For open $U \subseteq X$, let $\mathcal{O}_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 \subseteq 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$.
Under the identification $\mathbb{A}^n =\mathfrak{k}^n$ with $\mathbb{P}^n \setminus\Vp(X_0)$, one has $\mathcal{O}_X \defon{X \setminus\Vp(X_0)}=\mathcal{O}_{X \cap\mathbb{A}^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$:
$\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$.
It follows from the previous remark and the similar result in the affine case that the elements of $\mathcal{O}_X(U)$ are continuous on $U \setminus V(X_0)$.
\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).$
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^{-1}$ of $f$)} such that $g \circ f =\Id_X$ and $f \circ g =\Id_Y$.
\item It is easy to see that $\Id_A$ is uniquely determined by the above condition $B$, and that the inverse $f^{-1}$ of an isomorphism $f$ is uniquely determined.
\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.
A \vocab{subcategory} of $\cA$ is a category $\cB$ such that $\Ob(\cB)\subseteq\Ob(\cA)$, such that $\Hom_\cB(X,Y)\subseteq\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.
\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\subseteq$ 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, \mathcal{O}_X)$, where $X$ is a topological space and $\mathcal{O}_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 \subseteq U_x$ and every function $V\xrightarrow{f}\mathfrak{k}$, we have $f \in\mathcal{O}_X(V)\iff\iota\st_x(f)\in\mathcal{O}_{Y_x}(\iota_x^{-1}(V))$,
A morphism $(X, \mathcal{O}_X)\to(Y, \mathcal{O}_Y)$ of varieties is a continuous map $X \xrightarrow{\phi} Y$ such that for all open $U \subseteq Y$ and $f \in\mathcal{O}_Y(U)$, $\phi\st(f)\in\mathcal{O}_X(\phi^{-1}(U))$.
\item If $(X, \mathcal{O}_X)$ is a variety and $U \subseteq X$ open, then $(U, \mathcal{O}_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 $\mathbb{P}^n$, then $(X, \mathcal{O}_X)$ is a variety, where $\mathcal{O}_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. $\mathbb{P}^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)\subseteq\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 All elements of $\mathcal{O}_X(U)$ are continuous.
\item If $U \subseteq X$ is open, $U \xrightarrow{\lambda}\mathfrak{k}$ any function and every $x \in U$ has a neighbourhood $V_x \subseteq U$ such that $\lambda\defon{V_x}\in\mathcal{O}_X(V_x)$, then $\lambda\in\mathcal{O}_X(U)$.
\item If $\vartheta\in\mathcal{O}_X(U)$ and $\vartheta(x)\neq0$ for all $x \in U$, then $\vartheta\in\mathcal{O}_X(U)^{\times}$.
The $V_x$ cover $U$. By the sheaf axiom for $\mathcal{O}_X$ there is $\ell\in\mathcal{O}_X(U)$ with $\ell\defon{V_x}=\lambda_x$. It follows that $\ell=\lambda$.
\item By the definition of variety, every $x \in U$ has a quasi-affine neighbourhood $V \subseteq U$. We can assume $U$ to be quasi-affine and $X = V(I)\subseteq\mathfrak{k}^n$, as the general assertion follows by an application of ii).
If $x \in U$ there are a neighbourhood $x \in W \subseteq 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 $\foralllg_\mathfrak{k}$,
It is clear that $\nil(\mathcal{O}_X(X))=\{0\}$ for arbitrary varieties. For general varieties it is however not true that $\mathcal{O}_X(X)$ is a $\mathfrak{k}$-algebra of finite type.
It suffices to investigate $\phi$ when $Y$ is an open subset of $V(I)\subseteq\mathfrak{k}^n$, where $I =\sqrt{I}\subseteq 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 \subseteq\mathfrak{k}^n$. Let $Y \xrightarrow{\xi_i}\mathfrak{k}$ be the $i$-th coordinate.
By definition $f_i = f\st(\xi_i)$. Thus $f$ is uniquely determined by $\mathcal{O}_Y(Y)\xrightarrow{f\st}\mathcal{O}_X(X)$.
Conversely, let $Y = V(I)$ and $\mathcal{O}_Y(Y)\xrightarrow{\phi}\mathcal{O}_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\subseteq\mathfrak{k}^n$.
For open $\Omega\subseteq Y, U = f^{-1}(\Omega)=\{x \in X | \forall\lambda\in J ~ (\phi(\lambda))(x)\neq0\}$ is open in $X$, where $Y \setminus\Omega= V(J)$.
If $\lambda\in\mathcal{O}_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^{-1}(V)$. Then $\alpha\coloneqq\phi(a)\defon{W}\in\mathcal{O}_X(W)$, $\beta\coloneqq\phi(b)\defon{W}\in\mathcal{O}_X(W)$.
By the second part of \ref{localinverse}$\beta\in\mathcal{O}_X(W)^{\times}$ and $f\st(\lambda)\defon{W}=\frac{\alpha}{\beta}\in\mathcal{O}_X(W)$.
The first part of \ref{localinverse} shows that $f\st(\lambda)\in\mathcal{O}_X(U)$.
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\foralllg_\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$.
If $X$ is a set, then $\cB\subseteq\mathcal{P}(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$.
Let $X$ be an affine variety over $\mathfrak{k}$, $\lambda\in\mathcal{O}_X(X)$ and $U = X \setminus V(\lambda)$.
Then $U$ is an affine variety and the morphism $\phi: \mathcal{O}_X(X)_\lambda\to\mathcal{O}_X(U)$ defined by the restriction $\mathcal{O}_X(X)\xrightarrow{\cdot |_U }\mathcal{O}_X(U)$ and the universal property of the localization is an isomorphism.
Let $X$ be an affine variety over $\mathfrak{k}, \lambda\in\mathcal{O}_X(X)$ and $U = X \setminus V(\lambda)$. The fact that $\lambda\defon{U}\in\mathcal{O}_x(U)^{\times}$ follows from \ref{localinverse}.
Thus the universal property of the localization $\mathcal{O}_X(X)_\lambda$ can be applied to $\mathcal{O}_X(X)\xrightarrow{\cdot |_U}\mathcal{O}_X(U)$.
For the rest of the proof, we may assume $X = V(I)\subseteq\mathfrak{k}^n$ where $I =\sqrt{I}\subseteq R \coloneqq\mathfrak{k}[X_1,\ldots,X_n]$ is an ideal.
Let $Y = V(J)\subseteq\mathfrak{k}^{n+1}$ where $J \subseteq\mathfrak{k}[Z,X_1,\ldots,X_n]$ is generated by the elements of $I$ and $1- Z\ell(X_1,\ldots,X_n)$.
Then $\mathcal{O}_Y(Y)\cong\mathfrak{k}[Z,X_1,\ldots,X_n]/ J \cong A[Z]/(1-\lambda Z)\cong A_\lambda$.
By the proposition about affine varieties (\ref{propaffvar}), the morphism $\mathfrak{s}: \mathcal{O}_Y(Y)\cong A_\lambda\to\mathcal{O}_X(U)$ corresponds to a morphism $U \xrightarrow{\sigma} Y$.
Let $X = V(I)\subseteq\mathfrak{k}^n$ with $I =\sqrt{I}$. If $U \subseteq X$ is open then $X \setminus U = V(J)$ with $J \supseteq I$ and $U =\bigcup_{f \in J}(X \setminus V(f))$.
Let $X$ be any variety, $U \subseteq 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 \subseteq 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:
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}:
Because of $\gamma_x =\delta_x$, there is $x \in W_x \subseteq U$ open such that $\gamma\defon{W_x}=\delta\defon{W_x}$. As the $W_x$ cover $U$, $\gamma=\delta$ by the sheaf axiom.
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}
By \ref{localring} it suffices to show that $\mathfrak{m}_x$ is a proper ideal, which is trivial, and that the elements of $\mathcal{O}_{X,x}\setminus\mathfrak{m}_x$ are units in $\mathcal{O}_{X,x}$.
Let $g =(U, \gamma)/\sim\in\mathcal{O}_{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 \setminus V(\gamma)$ we may assume that $\gamma$ vanishes nowhere on $U$.
Let $X =\Va(I)\subseteq\mathfrak{k}^n$ be equipped with its usual structure sheaf, where $I =\sqrt{I}\subseteq R =\mathfrak{k}[X_1,\ldots,X_n]$ . Let $x \in X$ and $A =\mathcal{O}_X(X)\cong R / I$.
$\{P \in R | P(x)=0\}\text{\reflectbox{$\coloneqq$}}\fn_x \subseteq R$ is maximal, $I \subseteq\fn_x$ and $\mathfrak{m}_x \coloneqq\fn_x / I$ is the maximal ideal of elements of $A$ vanishing at $x$.
If $\lambda\in A \setminus\mathfrak{m}_x$, we have $\lambda_x \in\mathcal{O}_{X,x}^{\times}$, where $\lambda_x$ denotes the image under $A \cong\mathcal{O}_X(X)\to\mathcal{O}_{X,x}$.
By the universal property of the localization, there exists a unique ring homomorphism $A_{\mathfrak{m}_x}\xrightarrow{\iota}\mathcal{O}_{X,x}$
We have $X \setminus U = V(J)$ where $J \subseteq A$ is an ideal. As $x \in U$ there is $f \in J$ with $f(x)\neq0$. Replacing $U $ by $X \setminus V(f)$ we may assume $U = X \setminus V(f)$.
By the isomorphism $\mathcal{O}_X(W)\cong A_h$, there is $n \in\N$ with $h^{n}\vartheta=0$ in $A$. Since $h \not\in\mathfrak{m}_x$, $h$ is a unit and the image of $\vartheta$ in $A_{\mathfrak{m}_x}$ vanishes, implying $\lambda=0$.
Let $\ell\in R_1$ such that $\ell(x)\neq0$. Then $x \in U =\mathbb{P}^2\setminus V(\ell)$ and the rational functions $\gamma=\ell^{-g}G, \eta=\ell^{-h}H$ are elements of $\mathcal{O}_{\mathbb{P}^2}(U)$.
Let $I_x(G,H)\subseteq\mathcal{O}_{\mathbb{P}^2,x}$ denote the ideal generated by $\gamma_x$ and $\eta_x$.
\noindent The dimension $\dim_{\mathfrak{k}}(\mathcal{O}_{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 $\mathcal{O}_{\mathbb{P}^2}(U)\to\mathcal{O}_{\mathbb{P}^2,x}$ is a unit, showing that the image of $\tilde\gamma=\tilde\ell^{-g} G$ in $\mathcal{O}_{\mathbb{P}^2,x}$ is multiplicatively equivalent to $\gamma_x$, and similarly for $\eta_x$.
In the above situation, assume that $V(H)$ and $V(G)$ intersect properly in the sense that $V(G)\cap V(H)\subseteq\mathbb{P}^2$ has no irreducible component of dimension $\ge1$.
\item[HNS2 $\implies$ HNS1b] Let $I \subseteq\mathfrak{l}[X_1,\ldots,X_n]$. $I \subseteq\mathfrak{m}$ maximal. $R /\mathfrak{m}$ 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 \subseteq\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$:
$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\MaxSpec 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(\mathfrak{K}(Y)/\mathfrak{l})-\trdeg(\mathfrak{K}(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\}$ :