Let $\mathfrak{l}$ be any field.
\begin{definition}
    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}$}.

    If $\mathfrak{l}$ is kept fixed, we will often write $\mathbb{P}^n$ for $\mathbb{P}^n(\mathfrak{l})$.
    
    When dealing with $\mathbb{P}^n$, the usual convention is to use $0$ as the index of the first coordinate.
    
    We denote the one-dimensional subspace generated by $(x_0,\ldots,x_n) \in \mathfrak{k}^{n+1} \setminus \{0\}$ by $[x_0,\ldots,x_n] \in \mathbb{P}^n$.
    If $x = [x_0,\ldots,x_n] \in \mathbb{P}^n$, the $(x_{i})_{i=0}^n$ are called \vocab{homogeneous coordinates}  of $x$.
    At least one of the $x_{i}$ must be $\neq 0$.
\end{definition}
\begin{remark}
    There are points $[1,0], [0,1] \in \mathbb{P}^1$ but there is no point $[0,0] \in  \mathbb{P}^1$.
\end{remark}
\begin{definition}[Infinite hyperplane]
    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}\neq 0$.
    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}$.

    Thus $\mathbb{P}^n$ is $\mathbb{A}^n \cong \mathfrak{l}^n$ with a copy of $\mathbb{P}^{n-1}$ added as an \vocab{infinite hyperplane} .
\end{definition}

\subsubsection{Graded rings and homogeneous ideals}
\begin{notation}
    Let $\mathbb{I} = \N$ or $\mathbb{I} = \Z$.
\end{notation}
\begin{definition}
    By an \vocab[Graded ring]{$\mathbb{I}$-graded ring} $A_\bullet$ we understand a ring $A$ with a collection $(A_d)_{d \in \mathbb{I}}$ of subgroups of the additive group $(A, +)$ such that $A_a \cdot  A_b \subseteq A_{a + b}$ for $a,b \in \mathbb{I}$ and such that $A = \bigoplus_{d \in \mathbb{I}} A_d$ in the sense that every $r \in A$ has a unique decomposition $r = \sum_{d \in \mathbb{I}}  r_d$ with $r_d \in A_d$ and but finitely many  $r_d \neq 0$.

    We call the $r_d$ the \vocab{homogeneous components} of $r$.

    An ideal $I \subseteq A$ is called \vocab{homogeneous}  if $r \in I \implies \forall d \in \mathbb{I} ~ r_d \in  I_d$ where $I_d \coloneqq I \cap A_d$.

    By a \vocab{graded ring}  we understand an $\N$-graded ring. Tin this case, $A_{+} \coloneqq \bigoplus_{d=1}^{\infty} A_d = \{r \in A | r_0 = 0\} $ is called the \vocab{augmentation ideal}  of $A$.
\end{definition}
\begin{remark}[Decomposition of $1$]
    If $1 = \sum_{d \in \mathbb{I}}  \varepsilon_d$ is the decomposition into homogeneous components, then $\varepsilon_a = 1 \cdot \varepsilon_a = \sum_{b \in \mathbb{I}}  \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 \neq 0 \implies \varepsilon_a \varepsilon_b = 0$.
    Applying the last equation with $a = 0$ gives $b\neq 0 \implies \varepsilon_b = \varepsilon_0 \varepsilon _b = 0$.
    Thus $1 = \varepsilon_0 \in A_0$.
\end{remark}
\begin{remark}
    The augmentation ideal of a graded ring is a homogeneous ideal.
\end{remark}

% Graded rings and homogeneous ideals (2)

\begin{proposition}\footnote{This holds for both $\Z$-graded and $\N$-graded rings.}
    \begin{itemize}
        \item A principal ideal generated by a homogeneous element is homogeneous.
        \item The operations $\sum, \bigcap, \sqrt{}$ preserve homogeneity.
        \item An ideal is homogeneous iff it can be generated by a family of homogeneous elements.
    \end{itemize}
\end{proposition}
\begin{proof}
    Most assertions are trivial. We only show that $J$ homogeneous $\implies \sqrt{J} $ homogeneous.
    Let $A$ be $\mathbb{I}$-graded, $f \in \sqrt{J} $ and $f = \sum_{d \in \mathbb{I}} f_d$ the decomposition.
    To show that all $f_d \in \sqrt{J} $, we use induction on $N_f \coloneqq \# \{d \in \mathbb{I} | f_d \neq 0\}$.
    $N_f = 0$ is trivial. Suppose $N_f > 0$ and $e \in \mathbb{I}$ is maximal with $f_e \neq 0$.
    For $l \in \N$, the $le$-th homogeneous component of $f^l$ is $f_e^l$. Choosing $l$ large enough such that $f^l \in J$ and using the homogeneity of $J$, we find $f_e \in \sqrt{J}$.
    As  $\sqrt{J} $ is an ideal, $\tilde f \coloneqq f - f_e \in \sqrt{J} $. As $N_{\tilde f} = N_f -1$, the induction assumption may be applied to $\tilde f$ and shows $f_d \in \sqrt{J} $ for $d \neq e$.
\end{proof}
\begin{fact}
    A homogeneous ideal is finitely generated iff it can be generated by finitely many of its homogeneous elements.
    In particular, this is always the case when $A$ is a Noetherian ring.
\end{fact}


\subsubsection{The Zariski topology on $\mathbb{P}^n$}
\begin{notation}
    Recall that for $\alpha \in \N^{n+1}$ $|\alpha| = \sum_{i=0}^{n}  \alpha_i$ and $x^\alpha = x_0^{\alpha_0} \cdot \ldots \cdot x_n^{\alpha_n}$.
\end{notation}
\begin{definition}[Homogeneous polynomials]
    Let $R$ be any ring and $f = \sum_{\alpha \in \N^{n+1}} f_\alpha X^{\alpha}\in R[X_0,\ldots,X_n]$.
    We say that $f$ is \vocab{homogeneous of degree $d$} if $|\alpha| \neq  d \implies f_\alpha = 0$ .
    We denote the subset of homogeneous polynomials of degree $d$  by $R[X_0,\ldots,X_n]_d \subseteq R[X_0,\ldots,X_n]$.
\end{definition}
\begin{remark}
    This definition gives $R$ the structure of a graded ring.
\end{remark}
\begin{definition}[Zariski topology on $\mathbb{P}^n(\mathfrak{k})$]\label{ztoppn}
    Let $A = \mathfrak{k}[X_0,\ldots,X_n]$.\footnote{As always, $\mathfrak{k}$ is algebraically closed}
    For $f \in A_d = \mathfrak{k}[X_0,\ldots,X_n]_d$, the validity of the equation $f(x_0,\ldots,x_{n}) = 0$ does not depend on the choice of homogeneous coordinates, as
     \[
         f(\lambda x_0,\ldots, \lambda x_n) 0 \lambda^d f(x_0,\ldots,x_n)
    \] 
    Let $\Vp(f) \coloneqq \{x \in  \mathbb{P}^n | f(x) = 0\}$.

    We call a subset $X \subseteq \mathbb{P}^n$ Zariski-closed if it can be represented as 
    \[
        X = \bigcap_{i=1}^k \Vp(f_i)
    \] 
    where the $f_i \in A_{d_i}$ are homogeneous polynomials.
\end{definition}
\pagebreak
\begin{fact}
    If $X = \bigcap_{i = 1}^k \Vp(f_i) \subseteq \mathbb{P}^n$  is closed, then $Y = X \cap \mathbb{A}^n$ can be identified with the closed subset
    \[
        \{(x_1,\ldots,x_n) \in  \mathfrak{k}^n | f_i(1,x_1,\ldots,x_n) = 0, 1 \le i \le k\}  \subseteq \mathfrak{k}^n
    \]
    Conversely, if $Y \subseteq \mathfrak{k}^n$ is closed it has the form
    \[
        \{(x_1,\ldots,x_n) \in  \mathfrak{k}^n | g_i(x_1,\ldots,x_n) = 0, 1 \le i \le k\} 
    \] 
    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$.

    In this sense, the Zariski topology on $\mathbb{P}^n$ can be thought of as gluing the Zariski topologies on the $U_i \cong \mathfrak{k}^n$.
\end{fact}

% The Zariski topology on P^n (2)

\begin{definition}
    Let $I \subseteq A = \mathfrak{k}[X_0,\ldots,X_n]$ be a homogeneous ideal.
    Let $\Vp(I) \coloneqq \{[x_0,\ldots,_n] \in \mathbb{P}^n | \forall f \in I ~ f(x_0,\ldots,x_n) = 0\}$ 
    As $I$ is homogeneous, it is sufficient to impose this condition for the homogeneous elements $f \in I$.
    Because $A$ is Noetherian, $I$ can finitely generated by homogeneous elements $(f_i)_{i=1}^k$ and $\Vp(I)=\bigcap_{i=1}^k \Vp(f_i)$ as in \ref{ztoppn}.
    Conversely, if the homogeneous $f_i$ are given, then $I = \langle f_1,\ldots,f_k \rangle_A$ is homogeneous.
\end{definition}
\begin{remark}
    Note that $V(A) = V(A_+) = \emptyset$.
\end{remark}
\begin{fact}
    For homogeneous ideals in $A$ and $m \in \N$, we have:
     \begin{itemize}
         \item $\Vp(\sum_{\lambda \in \Lambda} I_\lambda) = \bigcap_{\lambda \in \Lambda} \Vp(I_\lambda)$ 
         \item $\Vp(\bigcap_{k=1}^m I_k) = \Vp(\prod_{k=1}^{m} I_k) = \bigcup_{k=1}^m \Vp(I_k)$ 
         \item $\Vp(\sqrt{I}) = \Vp(I)$
    \end{itemize}
\end{fact}
\begin{fact}
    If $X = \bigcup_{\lambda \in \Lambda} U_\lambda$ is an open covering of a topological space then $X$ is Noetherian iff there is a finite subcovering and all $U_\lambda$ are Noetherian.
\end{fact}
\begin{proof}
    By definition, a topological space is Noetherian $\iff$  all open subsets are quasi-compact.
\end{proof}
\begin{corollary}
    The Zariski topology on $\mathbb{P}^n$ is indeed a topology.
    The induced topology on the open set $\mathbb{A}^n = \mathbb{P}^n \setminus \Vp(X_0) \cong \mathfrak{k}^n$ is the Zariski topology on $\mathfrak{k}^n$.
    The same holds for all $U_i = \mathbb{P}^n \setminus \Vp(X_i) \cong \mathfrak{k}^n$.
    Moreover, the topological space $\mathbb{P}^n$ is Noetherian.
\end{corollary}

\subsection{Noetherianness of graded rings}
\begin{proposition}
    For a graded ring $R_{\bullet}$, the following conditions are equivalent:
    \begin{enumerate}[A]
        \item $R$ is Noetherian.
        \item Every homogeneous ideal of $R_{\bullet}$ is finitely generated.
        \item Every chain $I_0\subseteq I_1 \subseteq \ldots$ of homogeneous ideals terminates.
        \item Every set $\mathfrak{M} \neq \emptyset$ of homogeneous ideals has a $\subseteq$-maximal element.
        \item $R_0$  is Noetherian and the ideal $R_+$ is finitely generated.
        \item $R_0$ is Noetherian and $R / R_0$ is of finite type.
    \end{enumerate}
\end{proposition}
\begin{proof}
    \noindent\textbf{A $\implies$ B,C,D} trivial.

    \noindent\textbf{B $\iff$ C $\iff$ D} similar to the proof about Noetherianness.

        \noindent\textbf{B $\land$ C $\implies $E} B implies that $R_+$ is finitely generated. Since $I \oplus R_+$ is homogeneous for any homogeneous ideal $I \subseteq R_0$, C implies the Noetherianness of $R_0$.

\noindent\textbf{E $\implies$ F} Let $R_+$ be generated by $f_i \in R_{d_i}, d_i > 0$ as an ideal.
            \begin{claim}
                The $R_0$-subalgebra $\tilde R$ of $R$ generated by the $f_i$ equals $R$.
            \end{claim}
            \begin{subproof}
                It is sufficient to show that every homogeneous $f \in R_d$ belongs to $\tilde R$. We use induction on $d$. The case of $d = 0$ is trivial.
                Let $d > 0$ and $R_e \subseteq \tilde R$ for all $e < d$.
                as $f \in  R_+$, $f = \sum_{i=1}^{k} g_if_i$. Let $f_a = \sum_{i=1}^{k} g_{i, a-d_i} f_i$, where $g_i = \sum_{b=0}^{\infty} g_{i,b}$ is the decomposition into homogeneous components.
                Then $f = \sum_{a=0}^{\infty} f_a$ is the decomposition of $f$ into homogeneous components, hence $a \neq d \implies f_a = 0 $. Thus we may assume $g_i \in  R_{d-d_i}$.
                As $d_i > 0$, the induction assumption may now be applied to $g_i$, hence $g_i \in  \tilde R$, hence $f \in \tilde R$.
            \end{subproof}

            \noindent\textbf{F  $\implies$ A} Hilbert's Basissatz (\ref{basissatz})

\end{proof}



% Lecture 12

\subsection{The projective form of the Nullstellensatz and the closed subsets of $\mathbb{P}^n$}
Let $A = \mathfrak{k}[X_0,\ldots,X_n]$.
\begin{proposition}[Projective form of the Nullstellensatz]\label{hnsp}
    If $I \subseteq A$ is a homogeneous ideal and $f \in A_d$ with $d>0$, then $\Vp(I) \subseteq \Vp(f) \iff f \in \sqrt{I}$.
\end{proposition}
\begin{proof}
    $\impliedby$ is clear. Let $\Vp(I) \subseteq \Vp(f)$. If $x = (x_0,\ldots,x_n) \in \Va(I)$, then either $x = 0$ in which case $f(x) = 0$ since $d > 0$
    or the point $[x_0,\ldots,x_n] \in \mathbb{P}^n$ is well-defined and belongs to $\Vp(I) \subseteq \Vp(f)$, hence $f(x) = 0$.
    Thus $\Va(I) \subseteq \Va(f)$ and $f \in  \sqrt{I}$ be the Nullstellensatz (\ref{hns3}).
\end{proof}

\begin{definition}\footnote{This definition is not too important, the characterization in the following remark suffices.}.
    For a graded ring $R_\bullet$, let $\Proj(R_\bullet)$ be the set of  $\fp \in \Spec R$ such that $\fp$ is a homogeneous ideal and $\fp \not\supseteq R_+$.
\end{definition}
\begin{remark}\label{proja}
    As the elements of $A_0 \setminus \{0\}$ are units in $A$ it follows that for every homogeneous ideal $I$ we have $I \subseteq A_+$ or $I = A$.
    In particular, $\Proj(A_\bullet) = \{\fp \in  \Spec A \setminus A_+ |  \fp \text{ is homogeneous}\} $.
\end{remark}
\begin{proposition}\label{bijproj}
    There is a bijection 
    \begin{align}
        f: \{I \subseteq A_+ | I \text{ homogeneous ideal}, I = \sqrt{I}\}  &\longrightarrow \{X \subseteq \mathbb{P}^n | X \text{ closed}\}  \\
        I &\longmapsto \Vp(I)\\
        \langle \{f \in  A_d | d >  0,  X \subseteq \Vp(f)\} \rangle & \longmapsfrom X
    \end{align}
    Under this bijection, the irreducible subsets correspond to the elements of $\Proj(A_\bullet)$.
\end{proposition}
\begin{proof}
    From the projective form of the Nullstellensatz it follows that $f$ is injective and that $f^{-1}(\Vp\left( I \right)) = \sqrt{I} = I$.
    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_+)$.
    Thus we may assume $J \subseteq A_+$, and $f$ is surjective.


    Suppose $\fp \in \Proj(A_\bullet)$. Then $\fp \neq  A_+$ hence $X = \Vp(\fp) \neq \emptyset$ by the proven part of the proposition.
    Assume $X = X_1 \cup X_2$ is a decomposition into proper closed subsets, where $X_k = \Vp(I_k)$ for some $I_k \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$.
    Then $X \not \subseteq \Vp(f_i)$ by the projective Nullstellensatz when $d_i > 0$ and because $\Vp(1) = \emptyset$ when $d_i = 0$.
    Thus $X = (X \cap \Vp\left( f_1 \right)) \cup (X \cap \Vp(f_2))$ is a proper decomposition $\lightning$.
    By lemma \ref{homprime}, $\fp$ is a prime ideal.

\end{proof}
\begin{remark}
    It is important that $I \subseteq A_{\color{red} +}$, since $\Vp(A) = \Vp(A_+) =  \emptyset$ would be a counterexample.
\end{remark}
\begin{corollary}
    $\mathbb{P}^n$ is irreducible.
\end{corollary}
\begin{proof}
    Apply \ref{bijproj} to $\{0\}  \in \Proj(A_\bullet)$.
\end{proof}

\subsection{Some remarks on homogeneous prime ideals}
\begin{lemma}\label{homprime}
    Let $R_\bullet$ be an $\mathbb{I}$ graded ring ($\mathbb{I} = \N$ or $\mathbb{I} = \Z$).
    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$.
\end{lemma}
\begin{proof}
    $\implies$ is trivial.
    It suffices to show that for arbitrary $f,g \in R fg \in I \implies f \in I \lor g \in I$.
    Let $f = \sum_{d \in \mathbb{I}} f_d, g = \sum_{d \in \mathbb{I}} g_d $ be the decompositions into homogeneous components.
    If $f \not\in  I$ and $g \not\in  I$ there are $d,e \in I$ with $f_d \in I, g_e \in I$, and they may assumed to be maximal with this property.
    As $I$ is homogeneous and $fg \in I$, we have $(fg)_{d+e} \in I$ but
    \[
        (fg)_{d+e} = f_dg_e + \sum_{\delta = 1}^{\infty} (f_{d + \delta} g_{e - \delta} + f_{d - \delta} g_{e + \delta})
    \] 
    where $f_dg_e \not\in I$ by our assumption on $I$ and all other summands on the right hand side are $\in I$ (as $f_{d+ \delta} \in I$ and $g_{e + \delta} \in I$ by the maximality of $d$ and $e$), a contradiction.
\end{proof}

\begin{remark}
    If $R_\bullet$ is $\N$-graded and $\fp \in \Spec R_0$, then $\fp \oplus R_+ = \{r \in R | r_0 \in  \fp\} $ is a homogeneous prime ideal of $R$.
    \[\{\fp  \in \Spec R | \fp \text{ is a homogeneous ideal of } R_\bullet\} = \Proj(R_\bullet) \sqcup \{\fp \oplus R_+ | \fp \in \Spec R_0\}\]
\end{remark}

\subsection{Dimension of $\mathbb{P}^n$}
\begin{proposition}
    \begin{itemize}
        \item $\mathbb{P}^n$ is catenary.
        \item $\dim(\mathbb{P}^n) = n$. Moreover, $\codim(\{x\} ,\mathbb{P}^n) = n$ for every $x \in \mathbb{P}^n$.
        \item If  $X \subseteq \mathbb{P}^n$ is irreducible and $x \in X$, then $\codim(\{x\}, X) = \dim(X) = n - \codim(X, \mathbb{P}^n)$.
        \item If $X \subseteq Y \subseteq \mathbb{P}^n$ are irreducible subsets, then $\codim(X,Y) = \dim(Y) - \dim(X)$.
    \end{itemize}
\end{proposition}
\begin{proof}
    Let $X \subseteq \mathbb{P}^n$ be irreducible. If $x \in X$, there is an integer $0 \le i \le n$ and $X \in  U_i = \mathbb{P}^n \setminus \Vp(X_i)$.
    \Wlog $i = 0$. Then $\codim(X, \mathbb{P}^n) = \codim(X \cap \mathbb{A}^n, \mathbb{A}^n)$ by the locality of Krull codimension (\ref{lockrullcodim}).
    Applying this with $X = \{x\}$ and our results about the affine case gives the second assertion.
    If $Y$ and $Z$ are also irreducible with $X \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)$.
    Thus
    \begin{align}
        \codim(X,Y) + \codim(Y,Z) &= \codim(X \cap \mathbb{A}^n, Y \cap \mathbb{A}^n) + \codim(Y \cap \mathbb{A}^n, Z \cap \mathbb{A}^n)\\
                                  &= \codim(X \cap \mathbb{A}^n, Z \cap \mathbb{A}^n)\\
                                  &= \codim(X, Z)
    \end{align}
    because $\mathfrak{k}^n$ is catenary and the first point follows.
    The remaining assertions can easily be derived from the first two.
\end{proof}

\subsection{The cone $C(X)$}
\begin{definition}
    If $X \subseteq \mathbb{P}^n$ is closed, we define the \vocab{affine cone over $X$}
    \[
        C(X) = \{0\} \cup \{(x_0,\ldots,x_n) \in  \mathfrak{k}^{n+1} \setminus \{0\}  | [x_0,\ldots,x_n] \in X\} 
    \] 
    If $X = \Vp(I)$ where $I \subseteq A_+ = \mathfrak{k}[X_0,\ldots,X_n]_+$ is homogeneous, then $C(X) = \Va(I)$.
\end{definition}
\begin{proposition}\label{conedim}
    \begin{itemize}
        \item $C(X)$ is irreducible iff  $X$ is irreducible or $X = \emptyset$.
        \item If $X$ is irreducible, then

            $\dim(C(X)) = \dim(X) + 1$ and
            
            $\codim(C(X), \mathfrak{k}^{n+1}) = \codim(X, \mathbb{P}^n)$
    \end{itemize}
\end{proposition}
\begin{proof}
    The first assertion follows from \ref{bijproj} and \ref{bijiredprim} (bijection of irreducible subsets and prime ideals in the projective and affine case).

    Let $d = \dim(X)$ and
    \[
    X_0 \subsetneq \ldots \subsetneq X_d = X \subsetneq X_{d+1} \subsetneq \ldots \subsetneq X_n = \mathbb{P}^n
    \] 
    be a chain of irreducible subsets of $\mathbb{P}^n$. Then
    \[
        \{0\}  \subsetneq C(X_0) \subsetneq \ldots \subsetneq C(X_d) = C(X) \subsetneq \ldots \subsetneq C(X_n) = \mathfrak{k}^{n+1}
    \] 
    is a chain of irreducible subsets of $\mathfrak{k}^{n+1}$. Hence $\dim(C(X)) \ge  1 + 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.
\end{proof}
\subsubsection{Application to hypersurfaces in $\mathbb{P}^n$}
\begin{definition}[Hypersurface]
    Let $n > 0$.
    By a \vocab{hypersurface}  in $\mathbb{P}^n$ or $\mathbb{A}^n$ we understand an irreducible closed subset of codimension $1$.
\end{definition}

\begin{corollary}
    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.
\end{corollary}
\begin{proof}
    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 \neq 0$ be the decomposition into homogeneous components.
If $P_e $ with $e < d$ was $\neq 0$, it could not be a multiple of $P$ contradicting the homogeneity of $\fp = P \cdot A$. Thus, $P$ is homogeneous of degree $d$.
\end{proof}
\begin{definition}
    A hypersurface $H \subseteq \mathbb{P}^n$ has \vocab{degree $d$} if $H = \Vp(P)$ where $P \in A_d$ is an irreducible polynomial.
\end{definition}

\subsubsection{Application to intersections in $\mathbb{P}^n$ and Bezout's theorem}
\begin{corollary}
    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$.
\end{corollary}

\begin{remark}
    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$
    (see \ref{affineproblem}).
\end{remark}

\begin{proof}
    The lower bound on the dimension of irreducible components of $A \cap B$ is easily derived from the similar affine result (corollary of the principal ideal theorem, \ref{codimintersection}).
    From the definition of the affine cone it follows that $C(A \cap B) = C(A) \cap C(B)$.
    We have $\dim(C(A)) = a+1$ and $\dim(C(B)) = b + 1$ by \ref{conedim}.
    If $A \cap B = \emptyset$, then $C(A) \cap C(B) = \{0\}$ with $\{0\} $ as an irreducible component, contradicting the lower bound $a + b + 1 - n > 0$ for the dimension of irreducible components of $C(A) \cap C(B)$ (again \ref{codimintersection}).
\end{proof}
\begin{remark}[Bezout's theorem]
    If $A \neq B$ are hypersurfaces of degree $a$ and $b$ in  $\mathbb{P}^2$, then $A \cap B$ has $ab$ points counted by (suitably defined) multiplicity.
\end{remark}


%TODO Proof of "Dimension of P^n"
% SLIDE APPLICATION TO HYPERSURFACES IN $\P^n$
%ERROR: C(H) = V_A(P)
%If n = 0, P = 0, V_P(P) = \emptyset is a problem!

