\subsubsection{Vertical and Real-time Forecasts with Retraining}
\label{rt}

The lower-left in Figure \ref{f:inputs} shows how models trained on vertical
    time series are extended with real-time order data as it becomes available
    during a test day:
Instead of obtaining an $H$-step-ahead forecast, we retrain a model after
    every time step and only predict one step.
The remainder is as in the previous sub-section, and the models are:
\begin{enumerate}
\item \textit{rtholt},
      \textit{rtses}, and
      \textit{rttheta}:
          Exponential smoothing without calibration and seasonal fit
\item \textit{rtets}:
          ETS calibrated as described by \cite{hyndman2008b}
\item \textit{rtarima}:
          ARIMA calibrated as described by \cite{hyndman2008a}
\end{enumerate}
Retraining \textit{fnaive} and \textit{pnaive} did not increase accuracy, and
    thus we left them out.
A downside of this family is the significant increase in computing costs.


\documentclass{article}
\usepackage{tocloft}
\include{common_symbols_and_format}
\renewcommand{\cfttoctitlefont}{\Large\bfseries}

\begin{document}
\logo
\rulename{Relative Strength Index} %Argument is name of rule
\tblofcontents

\ruledescription{Gives a buy signal when RSI is below 30 and a sell signal when RSI is above 70.}
\ruleparameters %You can include however many arguments (in groups of 4) as you want!
{Overbought}{70}{Overbought Condition}{$O_b$}
{Oversold}{30}{Oversold Condition}{$O_s$}
{Time Length}{14 Days}{Time frame on which the RSI is calculated}{$L$}
\stoptable %must be included or Tex engine runs infinitely

\section{Equation}
Below are the equations which govern how this specific trading rule calculates a trading position.

\begin{equation}
RSI = 100-\frac{100}{(1+RS)}
\end{equation}
\\
with:

$RSI$: is the relative strength index at $\currenttime$

$RS$: is the relative strength which is calculated using below formula.

\begin{equation}
RS = \frac{AvgU}{AvgD}
\end{equation}
\\
with:

$AvgU$ : average of all upward movements in the last $L$ price bars

$AvgD$ : average of all downward movements in the last $L$ price bars

$\L$ : Time Length

\keyterms
\furtherlinks %The footer
\end{document}


    \filetitle{!measurement\_equations}{Block of measurement equations}{modellang/measurementequations}

	\paragraph{Syntax}\label{syntax}

\begin{verbatim}
!measurement_equations
    Equation1;
    Equation2;
    Equation3;
    ...
\end{verbatim}

\paragraph{Syntax with equation
labels}\label{syntax-with-equation-labels}

\begin{verbatim}
!measurement_equations
    Equation1;
    'Equation label' Equation2;
    Equation3;
    ...
\end{verbatim}

\paragraph{Description}\label{description}

The \texttt{!measurement\_equations} keyword starts a new block of
measurement equations; the eqautions can stretch over multiple lines and
must be separated by semi-colons. You can have as many equation blocks
as you wish in any order in your model file: They all get combined
together when you read the model file in.

You can add descriptive labels to the equations (in single or double
quotes, preceding the equation); these will be stored in, and accessible
from, the model object.

\paragraph{Example}\label{example}

\begin{verbatim}
!measurement_equations
    'Inflation observations' Infl = 40*(P/P{-1} - 1);
\end{verbatim}


\subsection{Functions}
    \begin{frame}

        \frametitle{Functions!}
        Here is how you write functions in elm.

        \begin{codeexample}
            add : Int $\rar$ Int $\rar$ \underline{Int}\\
            add a b = a + b
        \end{codeexample}

        Here is an example of a general purpose function for Lists.

        \begin{codeexample}
            concatenate : List a $\rar$ List a $\rar$ \underline{List a}\\
            concatenate a b = a ++ b
        \end{codeexample}

    \end{frame}


\documentclass[a4paper]{article}

\def\npart{II}

\def\ntitle{Riemann Surfaces}
\def\nlecturer{H.\ Krieger}

\def\nterm{Michaelmas}
\def\nyear{2018}

\input{header}

\newtheorem*{fact}{Fact}

\begin{document}

\input{titlepage}

\tableofcontents

\section{Complex analysis \& Branching/Multivalued functions}

\subsection{Holomorphicity}

\begin{definition}[holomorphic/analytic function]
  A smooth function \(f: U \to \C\) from a domain (i.e.\ an open connected subset of \(\C\)) is \emph{holomorphic} or \emph{analytic} if either of the following holds:
  \begin{enumerate}
  \item \(f\) is differentiable in the sense of limits (which is equivalent to satisfying the Cauchy-Riemann equations),
  \item for each \(a \in U\), \(f\) has a power series expansion
    \[
      f(z) = \sum_{n \geq 0} a_n (z - a)^n,
    \]
    valid on some disk \(D(a, r)\) with positive radius \(r > 0\).
  \end{enumerate}
\end{definition}

\begin{remark}
  1 implies 2 since \(f\) being differentiable allows us to construct \(a_n\) using Cauchy Integral Formula. 2 implies 1 since \(f\) having power series allows term-by-term differentiation.
\end{remark}

By 2, if \(a \in U\) and \(f\) is not identically \(0\) near \(a\), then there exists some minimal \(m \geq 0\) such that \(a_m \neq 0\). It follows that \(f(z) = a_m (z - a)^m (1 + g(z - a))\) where \(\lim_{z \to a} g(z - a) = 0\). Therefore for \(z\) sufficiently close to \(a\), \(f\) is nonzero. This is known as

\begin{theorem}[principle of isolated zeros]
  An analytic function on a domain \(U\) which is not identically zero has isolated zeros, i.e.\ around each \(a \in U\), there exists a disk \(\Delta_a\) on which \(f(z) \neq 0\) unless possibly at \(z = a\).
\end{theorem}

If \(f\) is identically \(0\) near \(a\), then there exists a disk \(\Delta_a\) on which \(f(z) = 0\) for all \(z \in \Delta_a\). Consider \(V := \bigcup_{a: f|_{\Delta_a} = 0} \Delta_a\) and \(W := \bigcup_{a: f \neq 0 \text{ near } a} \Delta_a\). \(V\) and \(W\) are open and disjoint so by connectivity of \(U\), one of them is empty so \(f = 0\) on \(U\) or has isolated zeros. Thus having isolated zero is a property of a domain, not a local property.

\begin{corollary}
  If \(f\) and \(g\) are analytic on \(U\) then either \(f = g\) on \(U\) or \(f(z) = g(z)\) on a discrete set.
\end{corollary}

\begin{definition}[isolated singularity]
  If \(f\) is analytic on the punctured disk \(D(a, r)^* := D(a, r) \setminus \{a\}\) for some \(r > 0\), then \(f\) has an \emph{isolated singularity} at \(a\).
\end{definition}

In this case, we obtain the analogue of power series, \emph{Laurent series} at \(a\)
\[
  f(z) = \sum_{n = -\infty}^{\infty} c_n (z - a)^n.
\]

There are three possibilities:
\begin{enumerate}
\item removable singularity: \(c_n = 0\) for all \(n < 0\).
\item pole: there exists \(N < 0\) such that \(c_N \neq 0\) and \(c_n = 0\) for all \(n < N\). We say \(f\) has a pole of order \(-N\) and can write \(f(z) = (z - a)^N g(z)\) where \(g\) is analytic and nonzero at \(a\).
\item essential singularity: \(c_n \neq 0\) for infinitely many \(n < 0\).
\end{enumerate}

However, characterisation in terms of Laurent series is coordinate-dependent. Intrinsically, recall that

\begin{theorem}
  \(f\) has a removable singularity at \(a\) if and only if \(f\) is bounded on \(D(a, r)^*\).
\end{theorem}

\begin{theorem}[Casorati-Weierstrass]
  \(f\) has an essential singularity at \(a\) if and only if for every punctured disk \(D(a, r)^*\) in the domain of \(f\), the image \(f(D(a, r)^*)\) is dense in \(\C\).
\end{theorem}

For completeness sake, we state that \(f\) has a pole at \(a\) if and only if neither of the above happens (so \(\lim_{z \to a} |f(z)| = \infty\)).

This allows us, for example, to extend the definitions to infinity. Consider the Riemann sphere \(\C_\infty\), on which a neighbourhood of infinity is the complement of a closed set not including \(\infty\). Mapping it to the complex plane, we define a punctured disk around \(\infty\) to be the complement of a closed disk in \(\C\). Then we can talk conveniently about singularity at \(\infty\).

\begin{eg}
  \(f(z) = \frac{1}{e^z - 1}\) is meromorphic on \(\C\) with poles at \(z = 2\pi n i\) where \(n \in \Z\). By considering \(g(z) = \frac{z}{e^z - 1}\) which has a removable singularity at \(0\), we know \(f\) has a pole of order \(1\) at \(0\), and therefore at all poles by periodicity.

  At \(\infty\), we have an essential singularity : along the imaginary axis, \(|f(z)|\) can be arbitrarily big so it cannot be a removable singularity. Along the positive real axis, \(|f(z)| \to 0\) so it cannot be a pole.
\end{eg}

\begin{definition}[meromorphic function]\index{meromorphic function}
  \(f\) is \emph{meromorphic} on a domain \(U \subseteq \C_\infty\)  if it has only isolated singularies, none of which are essential.
\end{definition}

\subsection{Complex logarithm \& Analytic continuation}

Given nonzero \(z = r e^{i \theta}\), if \(e^w = z\), we know that \(w = \log r + (2\pi n + \theta) i\) for some \(n \in \Z\). We can make a continuous choice of \(\log z\) on, for example, \(U = \C \setminus \R_{\geq 0}\), by choosing \(0 < \theta < 2\pi\) and fixing some \(n \in \Z\). This makes \(f_n(z) := \log r + (2\pi n + \theta)i\) a well-defined continuous analytic function on \(U\).

\begin{note}\leavevmode
  \begin{enumerate}
  \item If \(g: U \to V\) is an analytic bijection, then any inverse \(h: V \to U\) is analytic.
  \item If \(g: U \to V\) is analytic, then any \emph{continuous} inverse \(h: V \to U\) is analytic.
  \end{enumerate}
\end{note}

More naturally,

\begin{proposition}
  Fix \(n \in \Z\) and define \(h(z) := \int_{-1}^z \frac{dw}{w} + (2n + 1)\pi i\) for \(z \in U\), where the integral is taken over the straight line from \(-1\) to \(z\), then \(h\) is analytic on \(U\) and inverse to \(z \mapsto e^z\).
\end{proposition}

\begin{proof}
  First show \(h\) is analytic with \(f'(z) = \frac{1}{z}\).
  \[
    \frac{h(z + \tau) - h(z)}{\tau}
    = \frac{1}{\tau} \int_z^{z + \tau} \frac{dw}{w}
  \]
  for \(\tau\) sufficiently small (such that the triangle formed by \(-1\), \(z\) and \(z + \tau\) lies in \(U\)) by Cauchy's Theorem. Then
  \[
    \left| \frac{1}{\tau} \int_z^{z + \tau} \frac{dw}{w} - \frac{1}{z} \right|
    = \left| \frac{1}{\tau} \int_z^{z + \tau} \frac{z - w}{zw} dw \right|
    \to 0
  \]
  as \(\tau \to 0\).

  Now define \(g(z) = \frac{e^{h(z)}}{z}\) so \(g'(z) = \frac{z e^{h(z)} h'(z) - e^{h(z)}}{z}\) and so \(g'(z) = 0\) identically. \(g(-1) = 1\) so \(e^{h(z)} = z\) for all \(z \in U\).

\end{proof}

\begin{definition}[direct analytic continuation]\index{analytic continuation!direct}
  A \emph{function element} in a domain \(U\) is a pair \((f, D)\) where \(D\) is a subdomain of \(U\) and \(f\) is an analytic function on \(D\). Two function elements \((f, D)\) and \((g, E)\) are equivalent, write \((f, D) \sim (g, E)\) if \(D \cap E \neq \emptyset\) and \(f = g\) on \(D \cap E\).

  We say \((g, E)\) is a \emph{direct analytic continuation} of \((f, D)\).
\end{definition}

Why do we make such a definition? We know the power series
\[
  \sum_{r \geq 0} z^k = \frac{1}{1 - z}
\]
is defined on \(D(0, 1)\) and cannot be extended to any larger domain due to natural boundary. However, \(\frac{1}{1 - z}\) is holomorphic on \(\C \setminus \{1\}\) so sometimes the domain forced by the definition of a function is not the maximal possible. In other words, sometimes we are looking at the ``correct'' function with a ``wrong'' domain.

\begin{definition}[analytic continuation along path]\index{analytic continuation!along path}
  We say \((g, E)\) is an \emph{analytic continuation of \((f, D)\) along \(\gamma\)} if \(\gamma: [0, 1] \to U\) and there exist function elements \((f_i, D_i)\), \(i \in \{0, \dots, n\}\) and \(0 = t_0 < t_2 < \dots < t_n = 1\) such that
  \[
    (f, D) = (f_0, D_0) \sim (f_1, D_1) \sim \dots \sim (f_{n - 1}, D_{n - 1}) \sim (f_n, D_n) = (g, E)
  \]
  and \(\gamma([t_j, t_{j + 1}]) \subseteq D_j\) for \(j \in \{0, \dots, n - 1\}\).

  Write \((f, D) \approx_\gamma (g, E)\).
\end{definition}

\begin{remark}
  As \(\C\) has a path-connected basis for the topology, domains are path-connected.
\end{remark}

\begin{definition}[analytic continuation]\index{analytic continuation}
  We say \((g, E)\) is an \emph{analytic continuation} of \((f, D)\) if there exists a path \(\gamma\) such that \((f, D) \approx_\gamma (g, E)\). In this case we write \((f, D) \approx (g, E)\).
\end{definition}

\begin{remark}\leavevmode
  \begin{enumerate}
  \item If \((f, D) \approx_\gamma (g, E)\) and \((f, D) \approx_\gamma (h, E)\) then \(g = h\) by repeated application of the identity principle. In other words, \(g\) is completely determined by \(f\) and \(\gamma\).
  \item Analytic continuation is an equivalence relation (exercise), but direct analytic continuation is \emph{not} transitive, even if we require pairwise intersections of the domains to be nonempty. If fact, that is the whole point of analytic continuation along path.
  \end{enumerate}
\end{remark}

\begin{definition}[complete analytic function]\index{complete analytic function}
  An equivalence class of a function element under \(\approx\) is a \emph{complete analytic function}.
\end{definition}

\begin{eg}[complex logarithm]
  Let \(U = \C\) be the ambient space. Given \(\alpha < \beta\) in \(\R\), define
  \[
    E_{(\alpha, \beta)} := \{r e^{i \theta}: r > 0, \alpha < \theta < \beta\}.
  \]
  Note \(\C \setminus \R_{\geq 0} = E_{(0, 2\pi)}\). If \(\beta - \alpha \leq 2\pi\), define
  \[
    f_{(\alpha, \beta)}(z) = \log r + i\theta
  \]
  where \(z = re^{i\theta}, \alpha < \theta < \beta\). Then \((f_{(\alpha, \beta)}, E_{(\alpha, \beta)})\) is a function element for any such \(\alpha, \beta\).

  Let
  \begin{align*}
    A &= (-\frac{\pi}{2}, \frac{\pi}{2}) \\
    B &= (\frac{\pi}{6}, \frac{7\pi}{6}) \\
    C &= (\frac{5\pi}{6}, \frac{11\pi}{6})
  \end{align*}
  and \(\gamma: [0, 1] \to U, t \mapsto e^{2\pi i t}\) and choose
  \[
    0 = t_0 < t_1 = \frac{1}{6} < t_2 = \frac{1}{2} < t_3 = \frac{5}{6} < t_4 = 1
  \]
  and \((f_A, E_A), (f_B, E_B), (f_C, E_C)\) the corresponding function elements.

  When the \emph{intervals} overlap, the function elements agree so
  \[
    (f_A, E_A) \sim (f_B, E_B) \sim (f_C, E_C),
  \]
  but
  \[
    f_C(z) = f_A(z) + 2\pi i, z \in E_A \cap E_C
  \]
  which shows nontransitivity of \(\sim\). In fact, \(f_A + 2\pi i \sim f_C\). However we see \((f_A, E_A) \approx_\gamma (f_C, E_C)\) and so \((f_A, E_A) \approx (f_C, E_C)\). By repeating the process with intervals moving to infinity in \(\R\), we see that all the \(\log r + (2\pi n + \theta) i\) are in the same class for \(\approx\). On the other hand, if \((f, D) \approx_\gamma (f_{A'}, E_{A'})\) for some interval \(A'\) then applying identity principle along the path to \(e^{f_i}\) shows that \(f\) is one of the branches of \(\log\).

  Now we can define a space that contains all branches of logarithm. On \(U = \C \setminus \R_{\geq 0}\), define
  \[
    f_n(z) = \log n + (2\pi n + \theta)i
  \]
  where \(0 < \theta < 2\pi\). Then \((f_n, U)\) are function elements in the complete analytic function of \(\log\), and ``almost'' all of them. Take \(\Z\) copies of \(U\) and we can glue them along \(\R_{\geq 0}\). More precisely, for any \(n \in \Z\) and \(\alpha > 0\), there exists a neighbourhood \(V\) of \(\alpha\) and a function element \((g, V)\) such that
  \[
    (f_{n + 1}, E_{(0, \varepsilon)}) \sim (g, V) \sim (f_n, E_{(2\pi - \varepsilon, 2\pi)})
  \]
  for some \(\varepsilon > 0\).

  This object is the ``gluing construction'' of the Riemann surface associated to \(\log\). Since these \((g, V)\) exist, the resulting surface \(R\) will admit a \emph{continuous} function \(f\) such that the following diagram commutes:
  \[
    \begin{tikzcd}
      R \ar[r, "f"] \ar[d, "\pi"] & \C \ar[dl, "\exp"] \\
      \C^*
    \end{tikzcd}
  \]

  The rigorous construction is as follow. Let \(R = \coprod _{k \in \Z} \C^*\) and a basis for the topology on \(R\) is
  \begin{enumerate}
  \item disks contained in a single sheet: \(D((\eta, k), r)\) disk of radius \(r\) about \(\eta \in \C \setminus \R_{\geq 0}\) at level \(k\), where \(r\) is sufficently small such that the disk does not intersect \(\R_{\geq 0}\),
  \item disks along \(\R_{\geq 0}\): for \(\eta > 0, k \in \Z, r < |\eta|\),
    \[
      A((\eta, k), r) = \{(z, k): |z - \eta| < r, \Im z \geq 0\} \amalg \{(z, k - 1), |z - \eta| < r, \Im z < 0\}.
    \]
  \end{enumerate}

Check that this makes \(R\) a Hausdorff, path-connected space. \(R\) comes with a natural projection \(\pi: R \to \C^*, (\eta, k) \mapsto \eta\). This is a continuous map as the preimage of a small disk \(D(\eta, r) \subseteq \C^*\) is the union of countably many copies of that disk, one for each sheet. This is precisely the definition of a covering space.
\end{eg}

\begin{definition}[covering space]\index{covering space}\index{covering space!regular}
  A \emph{covering space} of a topological space \(X\) is a continuous map \(p: \tilde X \to X\) where \(\tilde X\) and \(X\) are Hausdorff and path-connected and \(p\) is a local homeomorphism, i.e.\ for each \(\tilde x \in \tilde X\), there exists a neighbourhood \(\tilde N\) of \(\tilde x\) such that \(p|_{\tilde N}\) is a homeomorphism.

    \(X\) is the \emph{base space} of \(p\).

    The cover is \emph{regular} if for all \(x \in X\), there exists a neighbourhood \(N\) of \(x\) such that \(p^{-1}(N)\) is a disjoint union of sets mapped homeomorphically by \(p\) to \(N\).
\end{definition}

\begin{note}
  Whether including regularity in the definition of covering space is a matter of taste. It is ususally included in algebraic topology, e.g.\ in IID Algebraic Topology.
\end{note}

\begin{remark}
  \(\pi: R \to \C^*\) is a regular cover.
\end{remark}

\begin{eg}[a non-regular cover]
  Consider \(p: \tilde X \to \C^*, z \mapsto e^z\) where
  \[
    \tilde X = \{z \in \C: 0 < \Im z < 4\pi\}.
  \]
  It is a covering space but consider \(1 \in \C^*\). Any preimage of a sufficiently small disk centred at \(1\) will be the disjoint union of one disk at \(2\pi i\) and two half disks at \(0\) and \(4\pi i\) each. Thus \(p\) fails to be a regular cover as we choose the ``wrong'' domain.
\end{eg}

Define
\begin{align*}
  f: R &\to \C \\
  (\eta, k) &\mapsto \log r + (2\pi k + \theta) i
\end{align*}
where \(\eta = re^{i\theta}, 0 \leq \theta < 2\pi\). Then \(f\) is a continuous bijection and the following diagram commutes:
\[
  \begin{tikzcd}
    R \ar[r, "f"] \ar[d, "\pi"] & \C \ar[dl, "\exp"] \\
    \C^*
  \end{tikzcd}
\]

A similar construction can be done for the multivalued function \(z^{1/n}\) where \(n \in \N\). As a multivalued function,
\[
  (r e^{i\theta})^{1/n} = r^{1/n} e^{i\theta/n} e^{2\pi ki/n}
\]
for \(k \in \Z/n\Z\). Define \(R_n = \coprod_{k \in \Z/n\Z} \C^*\) and glue near modulo \(n\) (``top sheet to bottom sheet''). Then we have \(f_n, \pi_n\) such that the following diagram commutes:
\[
  \begin{tikzcd}
    R_n \ar[r, "f_n"] \ar[d, "\pi_n"] & \C^* \ar[dl, "z \mapsto z^n"] \\
    \C^*
  \end{tikzcd}
\]

\begin{definition}[regular/singular point]\index{regular point}
  Let \(f(z) = \sum_{k \geq 0} a_k z^k\) with radius of convergence \(1\). A point \(z \in \p D(0, 1)\) is \emph{regular} if there exists a neighbourhood \(N\) of \(z\) and a holomorphic \(g\) on \(N\) such that \(g = f\) on \(N \cap D(0, 1)\), i.e.\ \(g\) is a direct analytic continuation of \(f\).

  If \(z \in \p D(0, 1)\) is not regular it is \emph{singular}.
\end{definition}

\begin{remark}\leavevmode
  \begin{enumerate}
  \item The regular points of \(\p D(0, 1)\) form an open set in the subspace topology on \(\p D(0, 1)\).
  \item \(z\) is regular does \emph{not} mean that the series converges at \(z\). Consider the classical example \(f(z) = \sum_{k \geq 0} z^k\), which is regular everywhere except \(z = 1\) (\(g(z) = \frac{1}{1 - z}\)).
  \item The converse does not hold either. A series converges at \(z\) does not imply that it is regular there. For example, \(g(z) = \sum_{k \geq 2} \frac{z^k}{(k - 1)k}\) converges at all \(z \in \p D(0, 1)\). If it was regular at such a point then the second derivative \(g''(z) = \sum_{k \geq 0} z^k\) would also be regular at \(z\). But \(g''(z) \to \infty\) as \(z \to 1\) so \(f\) cannot agree on a neighbourhood of \(1\) with any holomorphic function.
  \end{enumerate}
\end{remark}

However, regularity does affect radius of convergence:
\begin{proposition}
  Suppose \(f(z) = \sum_{k \geq 0} a_kz^k\) with radius of convergence \(1\). Then there exists a singular point on \(\p D(0, 1)\).
\end{proposition}

\begin{proof}
  Suppose not so for each \(z \in \p D(0, 1)\) there exists a neighbourhood \(N_z\) of \(z\) and \(g_z\) on \(N_z\) holomorphic with \(g_z = f\) on \(N_z \cap D(0, 1)\). These extensions can be glued together by identity principle. As \(\p D(0, 1)\) is compact, there exists a finite collection of \(z_1, \dots, z_m \in \p D(0, 1)\) such that \(N_{z_i}\)'s cover \(\p D(0, 1)\). wlog let the neighbourhoods be disks. Then we can choose \(\delta > 0\) sufficiently small such that \(f\) is holomorphic on \(D(0, 1 + \delta)\). Contradiction.
\end{proof}

\begin{definition}[natural boundary]\index{natural boundary}
  The disk boundary \(\p D(0, 1)\) is the \emph{natural boundary} for \(f\) if all points on the boundary are singular.
\end{definition}

\begin{eg}
  \(f(z) = \sum_{k \geq 0} z^{k!}\) has natural boundary \(\p D(0, 1)\). Consider \(\omega = e^{2\pi i \frac{p}{q}}\) a root of unity. For \(0 < r < 1\),
  \[
    f(r \omega)
    = \sum_{k \geq 0} r^{k!} \omega^{k!}
    = \sum_{k \leq q - 1} r^{k!} \omega^{k!} + \sum_{k \geq q} r^{k!}
  \]
  so as \(r \to 1\) the last term goes to infinity so this cannot agree with a holomorphic function on a neighbourhood of \(\omega\). Since the closure of roots of unity is \(\p D(0, 1)\), every point is singular.
\end{eg}

\subsection{Definition of Riemann surface}

\begin{definition}[Riemann surface]\index{Riemann surface}
  A \emph{Riemann surface} \(R\) is a connected, Hausdorff topological space, together with a collection of homeomorphisms \(\phi_\alpha: U_\alpha \to D_\alpha \subseteq \C\) with \(U_\alpha\) open, so that
  \begin{enumerate}
  \item \(\bigcup_{\alpha} U_\alpha = R\),
  \item if \(U_\alpha \cap U_\beta \neq \emptyset\) then \(\phi_\beta \compose \phi_\alpha^{-1}\) is analytic on \(\phi_\alpha(U_\alpha \cap U_\beta)\).
  \end{enumerate}

  For a given \(\alpha\), \((U_\alpha, \phi_\alpha)\) is a \emph{chart}, and these compositions \(\phi_\beta \compose \phi_\alpha^{-1}\) are \emph{transition functions}. The collection of charts is known as an \emph{atlas} on \(R\).
\end{definition}

In other words, a Riemann surface is precisely a connected one-dimensional complex manifold.

\begin{definition}[analytic function between Riemann surfaces]\index{analytic}
  Let \(R, S\) be Riemann surfaces with atlases \(\{(U_\alpha, \phi_\alpha)\}\) and \(\{(V_\beta, \psi_\beta)\}\) respectively. A continuous map \(f: R \to S\) is \emph{analytic} or \emph{holomorphic} if whenever \(U_\alpha \cap f^{-1}(V_\beta) \neq \emptyset\), then
  \[
    \psi_\beta \compose f \compose \phi_\alpha^{-1}
  \]
  on \(\phi_\alpha(U_\alpha \cap f^{-1}(V_\beta))\) is analytic.
\end{definition}

\begin{remark}
  Analyticity is local. An equivalent definition is to say \(f\) is analytic at \(x \in R\) if whenever \(x \in U_\alpha \cap f^{-1}(V_\beta)\) then \(\psi_\beta \compose f \compose \phi_\alpha^{-1}\) is analytic on a neighbourhood of \(\phi_\alpha(x)\).
\end{remark}

\begin{eg}
  \((\C, z)\) is a Riemann surface with one chart where we denote by \(z\) the map \(z \mapsto z\), as is \((\C, z + 1)\) and \((\C, \conj z)\).
\end{eg}

\begin{eg}
  The Möbius band cannot be made into a Riemann surface because it is non-orientable. Informally, if we put an atlas on the Möbius band, we could choose it so that the centre circle maps to a space homeomorphic to a circle. And as analytic transition implies conformity, consistent choice of ``inside'' of the circle leads to a consistent choice on ``inside'' on the Möbius band, which is a contradiction.
\end{eg}

\begin{remark}\leavevmode
  \begin{enumerate}
  \item Each transition function has continuous inverses and so are conformal equivalence on their domains.
  \item \(R\) is connected with a path-connected basis so \(R\) is path-connected.
  \end{enumerate}
\end{remark}

\begin{definition}[equivalent atlas]\index{atlas!equivalent}
  Two atlases \(\{(U_\alpha, \phi_\alpha)\}\) and \(\{(V_\beta, \psi_\beta)\}\) are \emph{equivalent} if their union is also an atlas, i.e.\ whenever \(U_\alpha \cap V_\beta \neq \emptyset\) then \(\psi_\beta \compose \phi_\alpha^{-1}\) on \(\phi(U_\alpha \cap V_\beta)\) is analytic.
\end{definition}

\begin{eg}
  \((\C, z)\) and \((\C, z + 1)\) are equivalent: \(z \mapsto z + 1\) (or \(z \mapsto z - 1\)) are analytic. On the other had \((\C, z)\) and \((\C, \conj z)\) are not equivalent as \(z \mapsto \conj z\) is not analytic.
\end{eg}

We will see later that the notion of equivalence defines an equivalence relation on the collection of atlases on a fixed \(R\).

\begin{definition}[conformal structure]\index{conformal structure}
  An equivalence class of atlases on \(R\) is a \emph{conformal structure} on \(R\).
\end{definition}

\begin{remark}\leavevmode
  \begin{enumerate}
  \item If \(R\) is a Riemann surface and \(S \subseteq R\) is open and connected then restrictions of the charts provide a conformal structure on \(S\), for which \(i: S \embed R\) is analytic.
  \item Two atlases are equivalent if and only if the identity map is analytic.
  \end{enumerate}
\end{remark}

\begin{proposition}
  Let \(f: R \to S, g: S \to T\) be analytic maps of Riemann surfaces. Then \(g \compose f\) is analytic.
\end{proposition}

\begin{proof}
  Suppose \(\{(U_\alpha, \phi_\alpha)\}, \{(V_\beta, \psi_\beta)\}\) and \(\{(W_\gamma, \theta_\gamma)\}\) are atlases on \(R, S\) and \(T\) respectively. Let \(h = g \compose f\) which is continuous. Suffices to show that whenever
  \[
    Y := U_\alpha f^{-1}(V_\beta) \cap h^{-1} (W_\gamma)
  \]
  is nonempty then
  \[
    \theta_\gamma \compose g \compose f \compose \phi_\alpha^{-1}
  \]
  is analytic on \(Y\). Since \(\psi_\beta \compose f \compose \phi_\alpha^{-1}\) is analytic on \(\phi_\alpha(Y)\) and \(\theta_\gamma \compose g \compose \psi_\beta^{-1}\) is analytic on \(\psi_\beta \compose f (Y)\), we concluded that
  \[
    \theta_\gamma \compose g \compose \psi_\beta^{-1} \compose \psi_\beta \compose f \compose \phi_\alpha^{-1}
  \]
  is analytic on \(\alpha_\alpha(Y)\).
\end{proof}

\begin{corollary}
  Equivalence of atlas is an equivalence relation.
\end{corollary}

\begin{proposition}
  Suppose \(R\) is a Riemann surface and \(\pi: \tilde R \to R\) is a covering map. Then there is a unique conformal structure on \(\tilde R\) which makes \(\pi\) analytic.
\end{proposition}

\begin{proof}
  Given \(\tilde z \in \tilde R\), we can find \(\tilde N\) of \(\tilde z\) on which \(\pi: \tilde N \to N\) is a homeomorphism onto its image. Let \((V, \varphi)\) be a chart containing the image \(\pi(\tilde z)\). Define \(U_{\tilde z} = \pi^{-1}(V) \cap \tilde N\) and \(\varphi_{\tilde z} = \varphi \compose \pi\). This defines a chart on some neighbourhood of \(\tilde z\) and \(\{(U_{\tilde z}, \varphi_{\tilde z})\}_{\tilde z \in \tilde R}\) defines an atlas: this is clearly a cover and the transition functions \(\varphi_{\tilde z} \compose \varphi_{\tilde w}^{-1}\) are the restrictions of transition functions for \(R\). \(\pi\) is analytic with respect to this conformal structure as the composite maps are transition maps of \(R\). Uniqueness follows from a similar argument.
\end{proof}

\begin{eg}
  Let \(R = \coprod_{k \in \Z} \C^*\) and \(\pi: R \to \C^*, (\eta, k) \mapsto \eta\) be a covering map. Then there exists a unique conformal structure on \(R\) for which \(\pi\) is analytic. Note that the following diagram commutes, \(f\) is a continuous map and locally \(f\) is the composition of inverse of \(\exp\) and projection so \(f\) is analytic.
  \[
    \begin{tikzcd}
      R \ar[r, "f"] \ar[d, "\pi"] & \C \ar[dl, "\exp"] \\
      \C^*
    \end{tikzcd}
  \]
  As \(f\) is a bijection by construction, it has a global analytic inverse.
\end{eg}

\begin{definition}[conformal equivalence]\index{conformal equivalence}
  An analytic map \(f: R \to S\) of Riemann surfaces is a \emph{conformal equivalence} if there exists \(g: S \to R\) analytic inverse to \(f\).
\end{definition}

\begin{eg}\leavevmode
  \begin{enumerate}
  \item \(f\) as above for the logarithm Riemann surface is a conformal equivalence: the inverse of \(f\) is continuous and locally it is given by \(\pi^{-1} \compose \exp\) so is analytic. Therefore \((R, \pi)\) and \((\C, \exp)\) cannot be ``told apart''.
  \item \((\C, z)\) and \((\C, \conj z)\) are conformally equivalent as \(f(z) = \conj z\) is a conformal equivalence.
  \item
    \[
      \begin{tikzcd}
        R_n \ar[r, "f_n"] \ar[d, "\pi_n"] & \C^* \ar[dl, "z \mapsto z^n"] \\
        \C^*
      \end{tikzcd}
    \]
    Again there exists a unique conformal structure on \(R_n\) making \(\pi\) analytic. It follows that \(f_n\) is analytic. Note that one could imagine adding two points to \(R_n\) and replacing \(\C^*\) with \(\C \cup \{\infty\} = \C_\infty\). Doing so ruins \(\pi\) as a cover, but sometimes it's worth it (compactness!).
  \item \(\C_\infty = \C \cup \{\infty\}\) equipped with the sphere topology via steoreographic projection. Define two charts: \((\C, z)\) and \((\C_\infty \setminus \{0\}, \frac{1}{z})\). The transition functions are \(\frac{1}{z}\) which are anlaytic on \(\C^*\). It makes \(\C_\infty\) a compact Riemann surface. This is sometimes denoted by \(\widehat \C\).
  \end{enumerate}
\end{eg}

\begin{definition}[analytic function]
  If \(R\) is a Riemann surface, an analytic map \(f: R \to \C\) is an \emph{analytic function}.
\end{definition}

Therefore we use ``map'' to denote maps between Riemann surfaces and reserve ``function'' for a \(\C\)-valued map.

Recall from IB Analysis II and IB Complex Analysis

\begin{theorem}[inverse function theorem]
  Given analytic \(g\) on a domain \(V \subseteq \C\) and \(a \in V\) such that \(g'(a) \neq 0\), there exists a neighbourhood \(N\) of \(a\) such that \(g|_N : N \to g(N)\) is a conformal equivalence.
\end{theorem}

Consider an analytic function \(f: R \to \C\). Given \(p \in R\), choose a chart \((U, \varphi)\) with \(p \in U\). wlog \(f(p) = 0\). and write \(a = \varphi(p)\). Locally around \(a\), \(f \compose \varphi^{-1}\) is analytic so can be written as \(g(z)^r\) where \(g\) is a conformal equivalence: we can write any nonconstant analytic function sending \(a \mapsto 0\) as \((z - a)^r h(z)\) where \(h\) is analytic and nonzero on a neighbourhood of \(a\). Then there is a neighbourhood \(V\) of \(a\) such that \(h(V)\) does not intersect some ray from the origin. This allows us to define a logarithm on \(h(V)\) and \(r\)th root
\[
  \ell(z) := \exp( \frac{1}{r} \log h(z)).
\]
Then \(f \compose \varphi^{-1}\) is of the form \(g(z)^r\) where \(g(z) = (z - a)\ell(z)\). Then \(g'(a) = \ell(a) \neq 0\) so conformal.

Define a chart on the intersection of \(\varphi(U)\) with domain of \(g\), together with the chart \(\psi = g \compose \phi\). Therefore up to translation, any analytic function on a Riemann surface is locally equivalent to a powering map.

\begin{definition}[complex torus]\index{complex torus}
  Let
  \[
    \Lambda = \Z \tau_1 \oplus \Z \tau_2 \subseteq \C
  \]
  be a lattice where \(\tau_1, \tau_2\) are nonzero in \(\C\) with \(\frac{\tau_1}{\tau_2} \notin \R\), i.e.\ are linearly independent over \(\R\). The quotient group \(T = \C / \Lambda\) can be equipped with a complex structure, known as a \emph{complex torus}.
\end{definition}

The complex structure is constructed as follow. Equip the quotient group \(T = \C / \Lambda\) with quotient topology. \(\pi: \C \to T\) is continuous so \(T\) is connected. \(\pi\) is also open: if \(U\) is an open set in \(\C\) then
\[
    \pi^{-1}(\pi(U)) = \bigcup_{\omega \in \Lambda} \omega + U
  \]
  a union of open sets so open. Note that any closed parallelogram
  \[
    P_z = \{z + r \tau_1 + s \tau_2: r, s \in [0, 1]\}
  \]
  maps onto \(T\) by \(\pi\). So \(T\) is the continuous image of a compact set so compact. \(T\) is also Hausdorff: note first that \(\Lambda\) is a discrete set: if \(\Lambda\) contained an accummultaion point then \(0\) would also be a limit point, i.e.\ for all \(k \in \N\) there exists \(m_k, n_k \in \Z\) (and wlog \(n_k \neq 0\)) such that
  \[
    |m_k \tau_1 - n_k \tau_2| < \frac{1}{k}
  \]
  but then
  \[
    \left| \frac{m_k}{n_k} - \frac{\tau_2}{\tau_1} \right|
    < \frac{1}{k|n_k|\tau_1}
    \leq \frac{1}{k|\tau_1|}
    \to 0
  \]
  as \(k \to \infty\) so \(\frac{\tau_2}{\tau_1} \in \R\), contradiction. Thus given two points \(w_1, w_2 \in T\) we can choose preimages \(x_i \in p^{-1}(w_i)\) and neighbourhoods \(N_i\) of \(x_i\) such that
  \[
    \left( \bigcup_{\omega \in \Lambda} N_1 + \omega \right) \cap \left( \bigcup_{\omega \in \Lambda} N_2 + \omega \right) = \emptyset,
  \]
  i.e.\ \(\pi(N_1)\) and \(\pi(N_2)\) are open disjoint with \(w_i \in \pi(N_i)\).

  Now show \(\pi\) is a covering map: by the above \(\pi\) is a covering map, in fact regular: given \(w \in T\), choose \(z \in \C\) such that \(\pi^{-1}(w)\) lies in the interior of \(\Lambda\)-translates of \(P_z\), then choose a neighbourhood \(N\) of the unique preimage of \(w\) in \(P_z\) which is contained in the interior of \(P_z\). Then \(\pi(N)\) satisfies
  \[
    \pi^{-1}(\pi(N)) = \bigcup_{\omega \in \Lambda} \omega + N
  \]
  is a disjoint union of \(\pi(N)\).

  Finally for the complex structure of \(T\), given \(a \in T\), choose \(z \in \C\) such that \(\pi(z) = a\) and a neighbourhood \(N_a\) of \(a\) on which the regularity is realised. In particular, the component \(N_z\) of \(\pi^{-1}(N_a)\) containing \(z\) has \(\pi|_{N_z}: N_z \to N_a\) a homeomorphism. Define a chart to be the image of a disk \(D_z\) about \(z\) contained in \(N_z\). Write \(U_a = \pi(D_z)\) and define a chart map \(\phi_a = (\pi|_{N_z})^{-1}\) on \(U_a\). Claim this defines an atlas on \(T\): clearly this is a cover and claim the trasition maps are translations: suppose \(U_a \cap U_b \neq \emptyset\), then for each \(w \in U_a \cap U_b\) there exists \(\omega_w \in \Lambda\) such that \(\phi_b^{-1} \compose \phi_a(w) = w + \omega_w\). But \(w \mapsto \omega_w\) is a continuous function on a connected set and it takes values in a discrete set so is constant. Thus the transition functions are translations so analytic.

In example sheet 1 we'll show that different lattices can yield conformally equivalent tori. In example sheet 2 we give characterisation of conformal equivalence classes of tori in terms of \(\Lambda\). Complex tori are an important class of Riemann surfaces.

\begin{theorem}[open mapping theorem]\index{open mapping theorem}
  Let \(f: R \to S\) be a nonconstant analytic map of Rieman surfaces. Then \(f\) is an open map.
\end{theorem}

\begin{proof}
  Suppose \(W \subseteq R\) is open. Choose \(z \in W\) and charts \((U, \phi)\) of \(z\), \((V, \psi)\) of \(f(z)\). Choose a disk \(D\) about \(\phi(z)\) sufficiently small such that
  \[
    \phi^{-1}(D) \subseteq W \cap f^{-1}(V) \cap U.
  \]
  Then
  \[
    (\psi \compose f \compose \phi^{-1})(D)
  \]
  is open so \((f \compose \phi^{-1})(D) = f(\phi^{-1}(D))\) is open. Thus
  \[
    f(z) \in (f \compose \phi^{-1})(D)) \subseteq f(W)
  \]
  so \(f(W)\) is open.
\end{proof}

\begin{corollary}
  Let \(f: R \to S\) be a nonconstant analytic map. If \(R\) is compact then \(f(R) = S\) and \(S\) is compact.
\end{corollary}

\begin{proof}
  \(f(R)\) is open because \(f\) is open. It is also closed as it is compact in \(S\), a Hausdorff space. As \(S\) is connected, the nonempty clopen set \(f(R)\) is precisely \(S\). The second claim follows.
\end{proof}

\begin{corollary}
  Complex tori and \(\C_\infty\) admit no analytic function which are nonconstant.
\end{corollary}

We have seen a special case of this in IB Complex Analysis: if \(f: \C_\infty \to \C\) is analytic then \(f(\infty) \in \C\) so \(f\) is bounded on a neighbourhood of \(\infty\). By Liouville's theorem \(f\) is constant.

\begin{definition}[harmonic]\index{harmonic}
  Let \(h: R \to \R\) be a continuous function on a Riemann surface \(R\). \(h\) is \emph{harmonic} if for all charts \((U, \phi)\) of \(R\), \(h \compose \phi^{-1}\) is harmonic on \(\phi(U)\).
\end{definition}

Recall that a harmonic function on a domain in \(\C\) is the real part of some analytic funciton locally, same is true for harmonic functions on Riemann surfaces. Thus harmonicity is well-defined independent of charts.

\begin{proposition}
  Suppose \(h: R \to \R\) is harmonic on a Riemann surface \(R\). Then if \(h\) is nonconstant, \(h\) is open. In particular if \(R\) is compact, \(R\) admits no nonconstant harmonic function.
\end{proposition}

\begin{proof}
  Given such a nonconstant \(h: R \to \R\) and open set \(U \subseteq R\) and \(z \in U \subseteq R\), choose \(z \in V \subseteq U\) open such that \(h = \Re g\) for some analytic function \(g\) on \(V\).
  \[
    \begin{tikzcd}
      V \ar[d, "g"] \ar[dr, "h"] \\
      g(V) \ar[r, "\Re"] & \R
    \end{tikzcd}
  \]
  By open mapping theorem if \(g\) is nonconstant then it is open. Since \(\Re\) is open, their composition \(h\) is as well. For a proof that \(g\) is nonconstant, see example sheet 1 Q13.

  The second claim follows.
\end{proof}

Here we digress a little bit on non-examibable content before heading to the next chapter. A fundamental result about harmonic functions on Riemann surfaces is that they ``almost'' exist. We cannot find nonconstant harmonic function from a compact Riemann surface. But as the next best alternative we have

\begin{theorem}
  Let \(R\) be a Riemann surface, \(P \neq Q \in R\). Then there exists a harmonic function \(h: R \setminus \{P, Q\} \to \R\) such that for any chart \(\phi: U \to \C\) about \(P\) with \(\phi(P) = 0\), \(h \compose \phi^{-1}\) is \(\log |z|\) plus a bounded function near \(0\), and for any chart \(\psi: V \to \C\) about \(Q\) with \(\psi(Q) = 0\), \(h \compose \psi^{-1}\) is \(-\log |z|\) plus a bounded function near \(0\).
\end{theorem}

\begin{theorem}[Riemann existence theorem, classical version]\index{Riemann existence theorem}
  Let \(R\) be a compact Riemann surface and \(P \neq Q\) in \(R\). Then there exists a meromorphic function \(f\) on \(R\) with \(f(P) \neq f(Q)\).
\end{theorem}

% separating points in algebraic geometry
% for reference, see Doanldson's notes (wait till we do monodromy)

\section{Meromorphic functions}

\begin{definition}[meromorphic]\index{meromorphic}
  A \emph{meromorphic} function on a Riemann surface \(R\) is an analytic map to \(\C_\infty\).
\end{definition}

\begin{proposition}
  Let \(U \subseteq \C\) is a domain. A function \(f: U \to \C_\infty\) is meromorphic if and only if it is meromorphic as a map from a Riemann surface.
\end{proposition}

\begin{proof}
  Assume \(f: U \to \C_\infty\) is analytic. Given \(a \in U\), if \(f(a) \in \C\) then \(f\) is an analytic function near \(a\) so meromorphic. If \(f(a) = \infty\) then by considering the chart \((\C \setminus \{0\}, \frac{1}{z})\) of \(\C_\infty\) near \(\infty\), we see that \(g(z) = \frac{1}{f(z)}\) is analytic on a neighbourhood of \(a\) with \(g(a) = 0\). Thus \(g(z) = (z - a)^r h(z)\) where \(h\) is analytic nonzero on a neighbourhood of \(a\) so \(f(z) = (z - a)^{-r} \frac{1}{h(z)}\), which is meromorphic as a complex function.

  All the implications above are equivalences so the reverse also holds.
\end{proof}

\begin{eg}
  In example sheet 1 Q15 we show that \(\{(z, w): w^2 = z^3 - z\} \subseteq \C^2\) admits a conformal structure via the coordinate projection maps. We may alternatively do this geometrically by gluing. Define \(f(z) = z^3 - z\) and define \(U = \C \setminus ([-1, 0] \cup [1, \infty))\). Claim that we can define a square root of \(f\) on \(U\) (in other words, direct analytic continuation is transitive): this can be done locally at any point of \(U\). To show it's well-defined, consider a closed path \(\gamma \subseteq U\). By a result about winding number in example sheet 1 Q1,
  \[
    I(f \compose \gamma, 0) = I(\gamma, -1) + I(\gamma, 0) + I(\gamma, 1).
  \]
  We can check that \(I(\gamma, 1) = 0\) and \(I(\gamma, -1) = I(\gamma, 0)\) so \(I(f \compose \gamma, 0) \in 2 \Z\). Therefore if we define locally some \(\exp(\frac{1}{2} \log f(z))\), as we travel along \(\gamma\), the change in \(\log\) is
  \[
    \int_\gamma \frac{f'(z)}{f(z) - 0} dz = 2\pi i I(f \compose \gamma, 0) = 2n\pi i
  \]
  for some \(n \in 2\Z\) by argument principle. Thus \(\frac{1}{2} \log f(z)\) change by \(n\pi i\).

  If we let \(U_+, U_-\) be two copies of \(U\) and denote by \(g_+: U_+ \to \C\) the map we just constructed and let \(g_- = -g_+\), glue according to the identifying segments (see image) to obtain a single surface \(R\) and an analytic function \(g\) on \(R\) which agrees with \(g_+\) on \(U_+\) and \(g_-\) on \(U_-\). Topologically, this is a torus minus four points.

  It might be instructive to compare algebraic and gemeotric/topological construction and advantage of each. Later we'll learn to extract topological information \emph{directly} from the algebraic definition.
\end{eg}

\subsection{Space of germs and monodromy}

\begin{definition}[lift]\index{lift}
  Suppose \(\pi: \tilde X \to X\) is a (topological) covering map, and \(\gamma: [0, 1] \to X\) is a path. Then a \emph{lift} of \(\gamma\) is a path \(\tilde \gamma: [0, 1] \to \tilde X\) such that \(\pi \compose \tilde \gamma = \gamma\).
\end{definition}

\begin{proposition}
  If \(\tilde \gamma_1, \tilde \gamma_2\) are lifts of \(\gamma\) with \(\gamma_1(0) = \gamma_2(0)\) then \(\gamma_1 = \gamma_2\).
\end{proposition}

\begin{proof}
  Define
  \begin{align*}
    I_1 &= \{t \in [0, 1]: \tilde \gamma_1(t) = \tilde \gamma_2(t)\} \\
    I_2 &= \{t \in [0, 1]: \tilde \gamma_1(t) \neq \tilde \gamma_2(t)\}
  \end{align*}
  Claim that both are open in \([0, 1]\). First suppose \(\tau \in I_2\). As \(\tilde X\) is Hausdorff, there exist open disjoint \(U_1, U_2\) with \(\tilde \gamma_1(\tau) \in U_1, \tilde \gamma_2(\tau) \in U_2\). Paths are continuous so \(\tilde \gamma_1^{-1}(U_1)\) and \(\tilde \gamma_2^{-1}(U_2)\) are open neighbourhoods of \(\tau\) in \([0, 1]\), their intersection is thus open and contained in \(I_2\), so \(I_2\) is open.

  Suppose now that \(\tau \in I_1\). Choose an open neighbourhood \(\tilde N\) of \(\tilde \gamma_1(\tau) = \tilde \gamma_2(\tau)\) in \(\tilde X\) such that \(\pi|_{\tilde N}\) is a homeomorphism onto its image. We have \(\pi(\tilde \gamma_1(t)) = \pi(\tilde \gamma_2(t))\) for all \(t\) as they are both lifts for \(\gamma\), so on \(\tilde N\) this implies that \(\tilde \gamma_1(t) = \tilde \gamma_2(t)\). By continuity of paths, there exists \(\delta > 0\) such that \(t \in (\tau - \delta, \tau + \delta) \subseteq [0, 1]\) implies \(\tilde \gamma_1(t), \tilde \gamma_2(t) \in \tilde N\). So the interval \((\tau - \delta, \tau + \delta) \subseteq [0, 1] \subseteq I_1\) so \(I_1\) is open. Thus \(I_1 = [0, 1]\) by connectivity.
\end{proof}

In summary, lifts are unique up to choice of basepoints.

As for existence, lifts may not exist if the cover is not regular. c.f.\ nonregular cover exmaple. However, it is the \emph{only} obstruction to the construction of a lift.

\begin{proposition}
  Suppose \(\pi: \tilde X \to X\) is a regular covering map. Given \(\gamma\) in \(X\) and \(z \in \tilde X\) such that \(\pi(z) = \gamma(0)\), there is a (unique) lift \(\tilde \gamma\) of \(\gamma\) with \(\tilde \gamma(0) = z\).
\end{proposition}

\begin{proof}
  Define
  \[
    I = \{t \in [0, 1]: \text{ exists lift } \tilde \gamma: [0, 1] \to \tilde X \text{ of \(\gamma\) with } \tilde \gamma(0) = z\}
  \]
  and let \(\tau = \sup I\). Suppose for contradiction \(\tau \neq 1\). Choose an open neighbourhood \(U\) of \(\gamma(\tau)\) such that \(\pi^{-1}(U) = \coprod_j \tilde U_j\) and \(\pi|_{\tilde U_j}\) is a homeomorphism onto \(U\). By continuity of \(\gamma\), there exists \(\delta > 0\) such that \(\gamma([\tau - \delta, \tau + \delta]) \subseteq U\). Since \(\tau\) is the supremum, exists \(\tau_1 \in [\tau - \delta, \tau]\) such that \(\gamma\) lifts to \(\tilde \gamma\) on \([0, \tau_1]\) with \(\tilde \gamma(0) = z\). Choose \(j\) such that \(\tilde \gamma(\tau_1) \in \tilde U\). Define an extension of \(\tilde \gamma\) on \([\tau, \tau + \delta]\) by \((\pi|_{\tilde U_j})^{-1} \compose \gamma\). This gives a lift of \(\gamma\) to \([0, \tau + \delta]\), contradicting \(\tau = \sup I\). Thus \(\tau = 1\).
\end{proof}

\begin{definition}[homotopy]\index{homotopy}
  We say paths \(\alpha, \beta\) in \(X\) are \emph{homotopic} in \(X\) if there exists a family \(\gamma_s\) of paths where \(s \in [0, 1]\) such that
  \begin{enumerate}
  \item \(\gamma_0 = \alpha, \gamma_1 = \beta\),
  \item \(\gamma_s(0) = \alpha(0) = \beta(0)\) and \(\gamma_s(1) = \alpha(1) = \beta(1)\) for all \(s \in [0, 1]\),
  \item \([0, 1] \times [0, 1] \to X, (s, t) \mapsto \gamma_s(t)\) is continuous.
  \end{enumerate}
\end{definition}

\begin{definition}[simply connected]\index{simply connected}
  We say \(X\) is \emph{simply connected} if any closed path in \(X\) is homotopic to a constant path.
\end{definition}

\begin{theorem}[monodromy theorem]\index{monodromy theorem}
  Let \(\pi: \tilde X \to X\) be a covering map and \(\alpha, \beta\) be paths in \(X\). Assume that
  \begin{enumerate}
  \item \(\alpha\) and \(\beta\) are homotopic in \(X\),
  \item \(\alpha\) and \(\beta\) have lifts \(\tilde \alpha\) and \(\tilde \beta\) respectively with \(\tilde \alpha(0) = \tilde \beta(0)\),
  \item every path in \(X\) with \(\gamma(0) = \alpha(0) = \beta(0)\) has a lift \(\tilde \gamma\) with \(\tilde \gamma(0) = \tilde \alpha(0) = \tilde \beta(0)\).
  \end{enumerate}
  Then the lifts \(\tilde \alpha\) and \(\tilde \beta\) are homotopic. In particular, \(\tilde \alpha(1) = \tilde \beta(1)\).
\end{theorem}

\begin{proof}
  Non-examinable and omitted. See, for example, IID Algebraic Topology.
\end{proof}

\begin{eg}
  Consider \(z \mapsto z^n\) on \(\C^* = \C \setminus \{0\}\). This is a regular covering map. Consider a loop \(\gamma\) based at \(1\). The preimages of \(1\) are the \(n\)th roots of unity \(\zeta_n^k\), \(1 \leq k \leq n\). Any lift of \(\gamma\) will start at some \(\zeta_n^k\) and end at \(\zeta_n^{k + 1}\). As this is a regular cover, monodromy theorem tells that any path based at \(1\) has a lift whose endpoints are the same as if we lifted \(\gamma^{0n}\) for some \(n \in \Z\). Note that to any path \(\gamma\) we have an associated permutation of the set \(\{\zeta_n^k\}_{1 \leq k \leq n}\) by considering where the lift starting at \(\zeta_n^k\) ends, i.e.\ an element of \(S_n\). The subgroup of \(S_n\) arising in this way is generated by \((123\dots n)\), which is the cyclic subgroup \(C_n\).

  (It is an exercise to show that any closed path in the punctured plane is homotopic to an integer multiple of \(\gamma\).)
\end{eg}

\subsection{Space of germs}

Suppose \(G \subseteq \C\) is a domain throughout this section.

\begin{definition}[germ]\index{germ}
  Given \(z \in G\) and \((f, D)\) and \((g, E)\) function elements. We say \((f, D) \equiv_z (g, E)\) if \(z \in D \cap E\) and \(f = g\) on a neighbourhood of \(z\). The equivalence class under \(\equiv_z\) of \((f, D)\) is called the \emph{germ} of \(f\) at \(z\), denoted by \([f]_z\).
\end{definition}

Compare this with direct analytic continuation, which is \emph{not} an equivalence relation.

Note that two germs \([f]_z, [g]_w\) are equal if and only if \(z = w\) and \(f = g\) on a neighbourhood of \(z = w\).

\begin{definition}
  The \emph{space of germs on \(G\)} is the set
  \[
    \mathcal G = \{[f]_z: z \in G \text{ and } (f, D) \text{ is a function element with } z \in D\}.
  \]
\end{definition}

\begin{notation}
  Given a function element \((f, D)\), write
  \[
    [f]_D = \{[f]_z: z \in D\} \subseteq \mathcal G.
  \]
\end{notation}

The goal is to show that \(\mathcal G\) is a Riemann surface. First we define the topology on \(\mathcal G\) to be the one generated  by basis element of the form \([f]_D\). Given \([f]_D\) and \([g]_E\), if \([h]_z \in [f]_D \cap [g]_E\) then \(z \in D \cap E\) and \(h = f = g\) on a neighbourhood of \(z\). Thus there exists domain \(D'\) with \(z \in D'\) and \([h]_{D'} \subseteq [f]_D \cap [g]_E\).

The topology is Hausdorff: suppose \([f]_z \neq [g]_w\) in \(\mathcal G\), represented by \((f, D)\) and \((g, E)\) repsectively. If \(z \neq w\) choose \(D \cap E = \emptyset\) so \([f]_z \in [f]_D\) and \([g]_w \in [g]_E\) and these open sets are disjoint. If \(z = w\) choose \(D = E\). Claim that \([f]_D \cap [g]_E = \emptyset\): for suppose \([h]_s \in [f]_D \cap [g]_E\) then by definition exists neighbourhood \(N\) of \(s\) such that \(h = f = g\) on \(N\) so that \(f = g\) on \(D = E\). In particular \([f]_z = [g]_z = [g]_w\), contradiction.

The connected components of \(\mathcal G\) cover \(G\) via the forgetful map \(\pi([f]_z) = z\). To show this is a cover, let \(V \subseteq G\) be an open set, then
\[
  \pi^{-1}(V) = \{[f]_z: z \in V\} = \bigcup_{D \subseteq V} \{[f]_D: (f, D) \text{ is a function element}\}
\]
which is open. Locally on \([f]_D\), \(\pi\) is a bijection. On such a set \([f]_D\), \(U \subseteq [f]_D\) is open if and only if \(U = \bigcup_\alpha [f]_{D_\alpha}\), if and only if \(\pi(U) = \bigcup_\alpha D_\alpha\), if and only if \(\pi(U)\) is open.

For conformal structure on \(\mathcal G\), we know by a previous proposition that on each connected component of \(\mathcal G\), there exists a unique conformal structure making \(\pi\) analytic. These charts can be taken to be \((U, \varphi)\) with \(U = [f]_D\) and \(\varphi = \pi|_U\).

Moreover \(\mathcal G\) comes with an evaluation map
\begin{align*}
  E: \mathcal G &\to \C \\
  [f]_z &\mapsto f(z)
\end{align*}
which is analytic: given a chart \(([f]_D, \pi|_{[f]_D})\) of \(\mathcal G\),
\[
  E \compose (\pi|_{[f]_D})^{-1}(z) = E([f]_z) = f(z)
\]
which is analytic in \(z\). So \(E\) is analytic.

The stalk space \(\mathcal G\) incorporates all information about analytic functions on \(G\). The following theorem translates topological information of \(\mathcal G\) to analytic information of complete analytic functions:

\begin{theorem}
  Let \((f, D)\) and \((g, E)\) be function elements on \(G\) and \(\gamma: [0, 1] \to G\) a path with \(\gamma(0) \in D, \gamma(1) \in E\). Then \((g, E)\) is analytic continuation of \((f, D)\) along \(\gamma\) if and only if there exists a lift \(\tilde \gamma: [0, 1] \to \mathcal G\) of \(\gamma\) such that \(\tilde \gamma(0) = [f]_{\gamma(0)}, \tilde \gamma(1) = [g]_{\gamma(1)}\).
\end{theorem}

\begin{proof}
  Suppose there exists \((f_j, D_j)_{j = 1}^n\) and \(0 = t_0 < t_1 < \dots < t_n = 1\) with
  \[
    (f, D) = (f_1, D_1) \sim (f_2, D_2) \sim \dots \sim (f_n, D_n) = (g, E)
  \]
  and \(f_{j - 1} = f_j\) on \(D_{j - 1} \cap D_j\) and \(\gamma([t_{j - 1}, t_j]) \subseteq D_j\) for all \(j\). We can define a lift
  \[
    \tilde \gamma(t) = [f_j]_{\gamma(t)}, t \in [t_{j - 1}, t_j]
  \]
  which is well-defined. Claim it is continuous: suppose \([h]_U \subseteq \mathcal G\) and \(\tilde \gamma(\tau) \in [h]_U\). Then
  \[
    \tilde \gamma(\tau) = [f_j]_{\gamma(\tau)}
  \]
  for some \(j\) so \(f_j = h\) on an open neighbourhood \(N\) of \(\gamma(\tau)\). As \(\gamma\) is continuous, there exists \(\delta > 0\) such that if \(|t - \tau| < \delta\) then \(\gamma(t) \in N\). Then for such \(t\),
  \[
    \tilde \gamma(t) = [f_j]_{\gamma(t)} = [h]_{\gamma(t)} \in [h]_U
  \]
  so \(\tilde \gamma\) is continuous. \(\tilde \gamma\) satisfies the lifting properties.

  Conversely, suppose there is a lift \(\tilde \gamma\) of \(\gamma\) in \(\mathcal G\) with \(\tilde \gamma(0) = [f]_{\gamma(0)}\) and \(\tilde \gamma(1) = [g]_{\gamma(1)}\). For each \(t \in [0, 1]\), there exists a function element \((f_t, D_t)\) with \(\tilde \gamma(t) = [f_t]_{\gamma(t)}\). Note that \([f_t]_{D_t}\) contains \(\tilde \gamma(t)\). We have for each \(t\) an open interval \(I_t\) with \(\tilde \gamma(I_t) \subseteq [f_t]_{D_t}\). By compactness there exists a finite subcover, say intervals \([a_k, b_k]\), ordered so that \(a_{k + 1} < b_k\) for \(k = 1, \dots, n - 1\). Choose for each \(k\) some \(t_k \in (a_{k + 1}, b_k)\) and rename the corresponding open sets in \(\mathcal G\) \([f_k]_{D_k}\). wlog assume all \(D_k\)'s are disks. Since \(\tilde \gamma(0) = [f]_{\gamma(0)}\) and \(\tilde \gamma(1) = [g]_{\gamma(1)}\), we can also assume \(D_1 \subseteq D, D_n \subseteq E\) so \(f = f_1\) on \(D_1\) and \(g = f_n\) on \(D_n\). for each \(1 \leq k \leq n - 1\), we have
  \[
    \tilde \gamma(t_k) \in [f_k]_{D_k} \subseteq [f_{k + 1}]_{D_{k + 1}},
  \]
  so \(f_k = f_{k + 1}\) on \(D_k \cap D_{k + 1}\) by the identity principle, as \(f_k = f_{k + 1}\) on a neighbourhood of \(\gamma(t_k)\). So
  \[
    (f, D) \sim (f_1, D_1) \sim \dots \sim (f_n, D_n) \sim (g, E).
  \]
  Finally, on \([t_{k - 1}, t_k]\), we have
  \[
    \gamma([t_{k - 1}, t_k]) = \pi(\tilde \gamma([t_{k -1}, t_k])) \subseteq \pi([f_k]_{D_k}) = D_k,
  \]
  thus completing the proof.
\end{proof}

Once we have established the correspondence between analytic continuation in the base space and lift of paths in stalk space, we can use monodromy thoerem (which we stated as a result purely in topology) to deduce uniqueness of analytic continuations:

\begin{proposition}
  If \((g, E)\) and \((h, E)\) are analytic continuations of \((f, D)\) along \(\gamma \subseteq G\) then \(g = h\) on \(E\).
\end{proposition}

\begin{proof}
  Let \((g, E)\) and \((h, E)\) correspond to lifts \(\tilde \gamma\) and \(\tilde \gamma'\) respectively based at \([f]_{\gamma(0)}\). Uniqueness of lifts implies that \(\tilde \gamma(1) = \tilde \gamma'(1)\), i.e.\ \([g]_{\gamma(1)} = [h]_{\gamma(1)}\), so \(g = h\) on a neighbourhood of \(\gamma(1)\) so on \(E\) by identity principle.
\end{proof}

We can also derive the so-called classical monodromy theorem

\begin{theorem}[classical monodromy theorem]\index{monodromy theorem!classical}
  Suppose \((f, D)\) can be continued analytically along all paths in \(G\) starting in \(D\). Then if \((g, E)\) and \((h, E)\) are analytic continuations of \(f\) along paths \(\alpha\) and \(\beta\) respectively, and \(\alpha\) is homotopic to \(\beta\) then \(g = h\) on \(E\).
\end{theorem}

\begin{proof}
  Find lifts \(\tilde \alpha\) and \(\tilde \beta\) corresponding to \((g, E)\) and \((h, E)\) respectively. Note \(\tilde \alpha(0) = [f]_{\alpha(0)} = [f]_{\beta(0)} = \tilde \beta(0)\). By monodromy theorem we have \(\tilde \alpha(1) = \tilde \beta(1)\) so \(g = h\) on \(E\) again by identity principle.
\end{proof}

\begin{corollary}
  Suppose \(G\) is a simply connected domain and \((f, D)\) is a function element on \(G\) which can be analytically continued along all \(\gamma \subseteq G\) paths with \(\gamma(0) \in D\). Then \(f\) extends to \(G\).
\end{corollary}

\begin{proof}
  Define for \(z \in G\), \(f(z)\) as follows: we fix \(z_0 \in D\) and find a path \(\gamma\) on \(G\) with \(\gamma(0) = z_0\) and \(\gamma(1) = z\). By assumption \(f\) can be analytically continued along the path so by classical monodromy theorem and simply connectedness this is well-defined for all \(z \in G\).
\end{proof}

% compactness, tells us exactly what the connected componenets are

\begin{corollary}
  Let \(\mathcal F\) be a complete analytic function on \(G\) and define
  \[
    \mathcal G_{\mathcal F} = \bigcup_{(f, D) \in \mathcal F} [f]_D.
  \]
  Then \(\mathcal G_{\mathcal F}\) is a connected component of \(\mathcal G\).
\end{corollary}

\begin{proof}
  Each \(\mathcal G\) is locally path-connected, so path-connected component is the same as connected component. The corollary follows from the theorem.
\end{proof}

\begin{definition}[Riemann surface associated to complete analytic function]\index{Riemann surface!associated to complete analytic function}
  \(\mathcal G_{\mathcal F}\) is the \emph{Riemman surface associated to the complete analytic function \(\mathcal F\)}.
\end{definition}

\begin{remark}\leavevmode
  \begin{enumerate}
  \item For each \((f, D) \in \mathcal F\), the evaluation map \(E\) provides a single valued extension \(f \compose \pi\) on \([f]_D\) to all of \(\mathcal G_{\mathcal F}\).
    \[
      \begin{tikzcd}
        {[f]_D} \ar[r, "E"] \ar[d, "\pi"] & \C \\
        D \ar[ur, "f"']
      \end{tikzcd}
    \]
  \item In example sheet 2 Q7 we will show that in general \(\pi: \mathcal G_{\mathcal F} \to G\) is not a regular cover.
  \end{enumerate}
\end{remark}

\begin{eg}
  Let \(R' = \{(z, w) \in \C^2: w^2 = z^3 - z, w \neq 0\}\) and let \(\mathcal G_{\mathcal F}\) be the Riemann surface associated to \(\sqrt{z^3 - z}\) over the domain \(G = \C \setminus\{-1, 0, 1\}\). Recall that the Riemann surface structure on \(R'\) can be obtained via \(\pi_z\).

  Define
  \begin{align*}
    g: \mathcal G_{\mathcal F} &\to R' \\
    [f]_z &\mapsto (\pi([f]_z), E([f]_z))
  \end{align*}
  \(g\) is continuous as a product of continuous map. \(g\) is also analytic: if \(([f]_D, \pi)\) is a chart of \(\mathcal G_{\mathcal F}\) then
  \[
    (\pi_z \compose g \compose \pi^{-1})(s) = (\pi_z \compose g)([f]_s) = \pi_z(\pi([f]_s), E([f]_s)) = \pi([f]_s) = s
  \]
  so analytic and open.

  Define an inverse \(h\) of \(g\): given \((z, w) \in R'\), choose a neighbourhood \(N\) on which \(\pi_z\) is a local homeomorphism. Define \(h((z, w)) = [\pi_w \compose \pi_z^{-1}]_z\), then this is inverse to \(g\) so \(g\) is a conformal equivalence.
\end{eg}

We have so far seen three constructions of this Riemann surface:
\begin{enumerate}
\item embedded curve construction,
\item space of germs \(\mathcal G_{\mathcal F}\) of \(\sqrt{z^3 - z}\),
\item gluing construction.
\end{enumerate}
The above shows 1 and 2 are equivalent. 1 and 3 are shown to be equivalent in example sheet 1, and 2 and 3 in example sheet 2. The advantage of each is
\begin{enumerate}
\item inherits properties of \(\C^2\),
\item always exists, although quite abstract. Moreover it is a covering space and is equipped with analytic maps \(\pi\) and \(E\),
\item can get our hands on topology. Compactification is easy to describe and visualise.
\end{enumerate}

\subsection{Compactifying Riemann surfaces}

Recall the construction of Riemann sphere. We one-point compactify \(\C\) by adding a point \(\infty\). Then we define charts \((\C, z)\) and \(((\C\setminus \{0\}) \cup \{\infty\}, \frac{1}{z})\). The result is a map \(\C \embed \C_\infty\) that is not only a (dense) topological embedding into a compact space, but also an analytic map.

In general, suppose \(X\) and \(Y\) are topological spacs, \(U \subseteq X, V \subseteq Y\) open and \(\phi: U \to V\) a homeomorphism. Let \(Z = X \amalg Y / \sim_\phi\) where \(a \sim_\phi b\) if and only if \(a = b, a = \phi(b)\) or \(a = \phi^{-1}(b)\). \(Z\) is known as the \emph{gluing of \(X\) and \(Y\) along \(\phi\)}.

\begin{proposition}
  Suppose \(X\) and \(Y\) are Riemann surfaces and \(U \subseteq X\) and \(V \subseteq Y\) are nonempty open sets with \(\phi: U \to V\) an isomorphism of Riemann surfaces. If \(Z = X \amalg Y / \sim_\phi\) is Hausdorff then there exists a unique conformal structure on \(Z\) for which \(i_X: X \embed Z, i_Y: Y \embed Z\) are analytic.
\end{proposition}

\begin{proof}
  Note \(i_X, i_Y\) are homeomorphisms. For each chart \((W, \psi)\) of \(X\) we define a chart \((i_X(W), \psi \compose i_X^{-1})\) on \(Z\), similarly for charts of \(Y\). Transition maps come from those of \(X\) or \(Y\) or those composed with \(\phi\) so are analytic. \(Z\) is connected for if we could disconnect \(Z\) we could disconnect \(X\) or \(Y\). So \(Z\) admits a conformal structure which makes inclusions analytic. Uniqueness is immediate.
\end{proof}

\begin{eg}
  \(R = \{(z, w) \in \C^2: w^2 = z^3 - z\}\). We have seen via gluing that \(R\) minus points where \(w \neq 0\) is a topological torus minus 4 points. Now we compactify it.

  Consider \(t =  \frac{1}{z}, u = \frac{1}{w}\). Then the defining equation becomes
  \[
    \frac{1}{u^2} = \frac{1}{t^3} - \frac{1}{t},
  \]
  i.e.
  \[
    t^3 = u^2 - u^2t^2 = u^2 (1 - t^2).
  \]
  Unfortunately it is not a Riemann surface via either \(\pi_t\) or \(\pi_u\) at \((0, 0)\). But not all hope is lost. Write
  \[
    t = \left(\frac{u}{t} \right)^2 (1 - t^2)
  \]
  and let \(v = \frac{u}{t} = \frac{z}{w}\). Then the surface becomes \(Y = \{(t, v) \in \C^2: t = v^2 (1 - t^2)\}\). \(Y\) does have one or both projections \(\pi_t, \pi_v\) a local homeomorphism around each point, including \((0, 0)\), so \(Y\) admits a conformal structure. Consider the isomorphism
  \begin{align*}
    U &\to V \\
    (z, w) &\mapsto (t, v) = (\frac{1}{z}, \frac{z}{w})
  \end{align*}
  where \(U \subseteq R\) are points where neither \(z\) nor \(w\) is \(0\) and \(V\) its isomorphic image in \(Y\). Consider the gluing of \(R\) and \(Y\) along this isomorphism, call it \(X\), with inclusions \(i_R: R \embed X, i_Y: Y \embed X\). The image of \(R\) in \(X\) is \(X \setminus \{1 \text{ points}\}\) % why so?
  and all points in \(i_R(R)\) can be separated, similarly in \(i_Y(Y)\). If \(P \in X \setminus i_Y(Y)\) and \(Q \in X \setminus i_R(R)\) so \(P\) is \((0, 0)\) and \(Q\) is \((0, 0)\) in local coordinates then
  \begin{align*}
    &\{(z, w) \in R: |z| < 1\} \\
    &\{(t, v) \in Y: |t| < 1\}
  \end{align*}
  separate \(P\) and \(Q\).

  \(X\) admits a conformal structure for which \(i_R, i_Y\) are analytic. Consider
  \begin{align*}
    D_R &= \{(z, w) \in R: |z| \leq 2\} \\
    D_Y &= \{(t, v) \in Y: |t| \leq 2\}
  \end{align*}
  these are compact in \(R \amalg Y\) so map to compact sets in \(X\) via the continuous quotient map. Thus as a finite union of compact sets \(X\) is compact. Note this agrees with our topological intuition that \(R\) can be compactified by the addition of a single point.
\end{eg}

\subsection{Branching}

Note these projection maps are \emph{not} coverings on \(R\) (or \(X\)) but they still have controlled behaviour.

\begin{definition}[multiplicity/valency]\index{multiplicity}\index{valency}
  Let \(f: R \to S\) be an nonconstant analytic map of Riemann surfaces and \(z_0 \in R\). Locally we can write
  \[
    \hat f(z) = \hat f(z_0) + (z - z_0)^{m_f(z_0)} g(z)
  \]
  where \(g(z)\) nonzero analytic. \(m_f(z_0)\) is the \emph{multiplicity} or \emph{valency} of \(f\) at \(z_0\).
\end{definition}

\begin{lemma}
  Suppose \(g, h\) are nonconstant analytic on domains in \(\C\) and the image of \(h\) is contained in the domain of \(g\). Then
  \[
    m_{g \compose h}(z) = m_h(z) m_g(h(z)).
  \]
\end{lemma}

\begin{proof}
  Exercise.
\end{proof}

As a corollary, multiplicity is well-defined. Indeed if \(z \in R, f(z) \in S\) and \((U, \phi), (\tilde U, \tilde \phi)\) are charts for \(z\), \((V, \psi), (\tilde V, \tilde \psi)\) are charts for \(f(z)\) then \(m_f(z)\) is given by the multiplicity of its local expression, which is
\begin{align*}
  \tilde \psi \compose f \compose \tilde \phi^{-1}
  &= \tilde \psi \compose (\psi^{-1} \compose \psi \compose f \compose \phi^{-1} \compose \phi) \compose \tilde \phi^{-1} \\
  &= (\tilde \psi \compose \psi^{-1}) \compose (\psi \compose f \compose \phi^{-1}) \compose (\phi \compose \tilde \phi^{-1})
\end{align*}
the transition maps have multiplicity 1 everywhere so by the lemma the multiplicity of the local expressions agree.

Note that the points at which \(m_f(z) > 1\) are isolated, by the (local) principle of isolated zeros. In particular if \(R\) is compact then \(\{z \in R: m_f(z) > 1\}\) is finite. %Note that in complex analysis we expressed local mapping degree in terms of derivatives. On Riemann surfaces we don't have derivative (really???) but multiplicity still makes sense.

\begin{definition}[ramification point, ramification index, branch point]\index{ramification point}\index{ramification index}\index{branch point}
  Let \(f: R \to S\) be nonconstant analytic. If \(z \in R\) has \(m_f(z) > 1\), we call \(z\) a \emph{ramification point} of \(f\) and \(m_f(z)\) in this case is called the \emph{ramification index} at \(z\), and \(f(z)\) is a \emph{branch point} of \(f\).
\end{definition}

\begin{eg}
  Let \(p(z) = \sum_{k = 0}^d a_kz^k\) be an analytic map \(\C \to \C\) with \(d \geq 1, a_d \neq 0\). \(p\) extends to an analytic map of the Riemann sphere via \(p(\infty) = \infty\). At \(\infty\) the local expression is
  \[
    \frac{1}{p(\frac{1}{z})} = \frac{1}{\sum_{k = 0}^d a_k z^{-k}} = \frac{z^d}{\sum_{k = 0}^d a_k z^{d - k}} = z^d g(z)
  \]
  for some \(g\) analytic and nonzero near \(0\). Thus \(m_p(\infty) = d\).
\end{eg}

\begin{theorem}[valency theorem]\index{valency theorem}
  Let \(f: R \to S\) be a nonconstant analytic map of Riemann surfaces. If \(R\) is compact then there exists \(n \geq 1\) such that \(f\) is an \(n\)-to-\(1\) map counting multiplicity, i.e.\ for all \(w \in S\),
  \[
    \sum_{z \in f^{-1}(w)} m_f(z) = n.
  \]
\end{theorem}

See how false this can be for noncompact Riemann surfaces!

\begin{proof}
  By the principle of isolated zeros \(f^{-1}(w)\) is a finite set for all \(w \in S\). Define then
  \[
    n(w) = \sum_{z \in f^{-1}(w)} m_f(z).
  \]
  We want to show \(n: S \to \Z\) is constant. But \(S\) is connected so suffice to show \(n\) is locally constant. Fix \(w_0 \in S\) and let \(f^{-1}(w_0) = \{z_1, \dots, z_q\}\). For each \(z_k\), By choosing appropriate charts centred at \(z_k\) and \(w_0\), \(f\) is locally \(z \mapsto z^{m_f(z_k)}\). Moreover we can wlog choose a chart \((N_k, \phi)\) around \(z_k\) such that \(\phi(N_k)\) is a disk around \(\phi(z_k)\), on which \(f|_{N_k}\) is an \(m_f(z_k)\)-to-\(1\) map to its image. wlog choose the \(N_k\) disjoint. Note that \(R \setminus \bigcup N_k\) is compact so \(f(R \setminus \bigcup N_k)\) is compact, and there exists open neighbourhood \(M\) of \(w_0\) such that \(f(R \setminus \bigcup N_k) \cap M = \emptyset\). Let \(N = f(N_1) \cap \dots \cap f(N_q) \cap M\), an open neighbourhood of \(w_0\). For \(w \in N\), \(f^{-1}(w) \subseteq \bigcup_{k = 1}^q N_k\) so
  \[
    n(w) = \sum_{z \in f^{-1}(w)} m_f(z) = \sum_{z \in f^{-1}(w_0)} m_f(z) = n(w_0).
  \]
\end{proof}

\begin{definition}[degree/valency]\index{degree}\index{valency}
  Let \(f: R \to S\) be a nonconstant analytic map with \(R\) compact. Then we call the number \(n\) the \emph{degree} or \emph{valency} of \(f\).
\end{definition}

\begin{corollary}[fundamental theorem of algebra]
  Let \(p\) be nonconstant polynomial of degree \(d\). Then \(p\) has \(d\) roots in \(\C\).
\end{corollary}

\begin{proof}
  \(p\) extends to a map \(p: \C_\infty \to \C_\infty\) and \(p^{-1}(\infty) = \infty\) with multiplicity \(d\). So by valency theorem \(0\) also has \(d\) preimages counting multiplicity.
\end{proof}

As a consequence we have

\begin{proposition}
  Let \(f: \C_\infty \to \C_\infty\) be an nonconstant analytic map. Then we can write \(f\) as a rational function
  \[
    f(z) = c \frac{(z - a_1) \cdots (z - a_m)}{(z - b_1) \cdots (z - b_n)}
  \]
  where \(a_i, b_j \in \C, c \in \C^*\).
\end{proposition}

\begin{proof}
  Assume wlog \(f^{-1}(\infty) \subseteq \C\), so that \(f^{-1}(\infty) = \{b_1, \dots, b_n\}\). \(f\) analytic at \(b_i\) is equivalent to saying that \(\frac{1}{f}\) is an analytic function on a neighbourhood of \(b_i\), i.e.
  \[
    \frac{1}{f(z)} = (z - b_i)^{m_f(b_i)} g(z)
  \]
  where \(g\) is nonzero analytic at \(b_i\), so \(f\) has Laurent series
  \[
    f(z) = \sum_{j = -k_i}^\infty a_{j, i} (z - b_i)^j
  \]
  so the function
  \[
    f(z) - \sum_{i = 1}^n \left(\sum_{j = -k_i}^{-1} a_{j, i} (z - b_i)^j \right)
  \]
  has no preimage of \(\infty\) so is constant.
\end{proof}

\begin{remark}
  If \(f(\infty) \neq \infty\) then \(m \leq n\), in which case \(\deg f = n\). In general, by considering \(f^{-1}(\infty)\) and \(f^{-1}(0)\) to see that
  \[
    \deg f = \max \{m, n\}.
  \]
\end{remark}

\begin{corollary}
  The analytic isomorphisms of \(\C_\infty\) are Möbius transformations.
\end{corollary}

\section{Riemann-Hurwitz formula}

\subsection{Triangulation and Euler characteristic}

Let \(S\) be a compact Riemann surface. We say \(T \subseteq S\) is a \emph{topological triangle}\index{topological triangle} if it is the homeomorphic image of a closed triangle in \(\R^2\).

\begin{definition}[triangulation]\index{triangulation}
  A \emph{triangulation} of \(S\) is a finite collection of topological triangles \(\{T_1, \dots, T_n\}\) in \(S\) such that
  \begin{enumerate}
  \item \(\bigcup_{i = 1}^n T_i = S\),
  \item If \(T_i \cap T_j \neq \emptyset\) then \(T_i \cap T_j\) is a common edge or a common vertex,
  \item every edge is the edge of exactly two triangles.
  \end{enumerate}
\end{definition}

\begin{definition}[Euler characteristic]\index{Euler characteristic}
  The \emph{Euler characteristic} of \(S\) is
  \[
    \chi(S) = F - E + V
  \]
  where \(F, E, V\) are the number of faces, edges and vertices respectively for any choice of triangulation of \(S\).
\end{definition}

We state without proof the following results:
\begin{fact}\leavevmode
  \begin{enumerate}
  \item \(\chi(S)\) is independent of choice of triangulation (to check this suffices to check it is invariant under refinement).
  \item (corollary of classification of compact surfaces) every compact Riemann surface is homeomorphic to a surface with handles. The number of handles is the \emph{genus}\index{genus} of the surface.
  \item Every compact Riemann surface can be triangulated and \(\chi(S) = 2 - 2g\) where \(g\) is the genus of \(S\). It is possible to check this by assuming 2 and induct on \(g\).
  \end{enumerate}
\end{fact}

\begin{eg}
  Let \(S = \C_\infty\). Take three orthogonal great cricles. Then \(S\) is divided into \(8\) topological triangles. We have
  \[
    F= 8, V = 6, E = 12
  \]
  so
  \[
    \chi(S) = 8 - 12 + 6 = 2
  \]
  which agrees with \(2 - 2g = 2\) as \(S\) has genus \(0\).
\end{eg}

\begin{eg}
  Let \(S\) be a complex torus and triangulate the fundamental parallelogram. Triangulate it into \(18\) triangles. Have
  \[
    F = 18, E = 27, V = 9
  \]
  so
  \[
    \chi(S) = 0
  \]
  which agrees with \(2 - 2g\) as \(S\) has genus \(1\).
\end{eg}

\begin{remark}
  The topological torus admits infinitely many nonisomorphic conformal structures. See example sheet 2. For future reference, the collection for a fixed surface of the conformal structures it admits is known as the \emph{Teichmüller space}\index{Teichmüller space}. It is the key object in the advanced study of Riemann surfaces.
\end{remark}

\begin{theorem}[Riemann-Hurwitz formula]\index{Riemann-Hurtiwz formula}
  Let \(f: R \to S\) be a nonconstant analytic map of compact Riemann surfaces of degree \(n \geq 1\). Then
  \[
    \chi(R) = n \chi(S) - \sum_{P \in R} (e_P - 1)
  \]
  where \(e_P = m_f(P)\), the ramification index of \(f\) at \(P\).
\end{theorem}

Intuitively, the first term on RHS says that in a covering every sufficiently small triangle in \(S\) have \(n\) homeomorphic preimages in \(R\). The second terms add a correction term in case of ramification, as at a branch point \(P\), \(e_P\) vertices, each from a preimage, are mapped to a single point.

\begin{proof}
  The idea is to consider preimage of triangulations of \(S\) under \(f\) and compute its Euler characterisic. Call \(\{Q_1, \dots, Q_r\}\) the branch points of \(f\). Choose chart preimages of disks (as in the proof of valency theorem) and use compactness, we can find open sets \(U_1, \dots, U_r, U_{r + 1}, \dots, U_s\) of \(S\) so that
  \begin{enumerate}
  \item if \(j > r\) then \(f^{-1}(U_j)\) is a disjoint union of preimages \(V_1, \dots, V_n\), and \(f|_{V_i}: V_i \to U_j\) is an isomorphism,
  \item if \(1 \leq j \leq r\) then for each component \(V\) of \(f^{-1}(U_j)\), we have a unique preimage \(P\) of \(Q_j\), and \(f|_V: V \to U_j\) is an \(e_P\)-to-\(1\) map, whose local expression is an \(e_P\)-to-\(1\) powering map.
  \end{enumerate}
  Let \(\mathcal T\) be a triangulation of \(S\) which contains the \(Q_i\)'s as vertices. We can refine the triangulation to assume wlog that every triangle is contained in some \(U_j\). Given \(T \in \mathcal T\), if \(j > r\) and \(T \subseteq U_j\) then \(f^{-1}(T)\) is a disjoint union of copies of \(T\). If \(1 \leq j \leq r\) and \(T \subseteq U_j\), if \(Q_j\) is not a vertex of \(T\), refine if necessary so triangles are contained in some \(2\pi/e_p\) sector, then again \(f^{-1}(T)\) is a disjoint union of triangles, by valency theorem. If, however, \(Q_j\) is a vertex of \(T\), again refine if needed, we have \(e_P\) triangles as preimage, which have common vertex \(P\).

  Thus we have that the preimage of \(\mathcal T\) is a triangulation of \(R\). Let \(F', E', V'\) be the number of faces, edges and vertices of this triangulation. Have
  \[
    F' = nF, E' = nE, V' = nV - \sum_{P \in R}(e_P - 1)
  \]
  so
  \[
    \chi(R) = n \chi(S) - \sum_{P \in R}(e_P - 1).
  \]
\end{proof}

\begin{remark}
  Equivalently we may express Euler characteristic in terms of genus,
  \[
    2g_R - 2 = n(2g_S - 2) + \sum_{P \in R}(e_P - 1).
  \]
  There are lots we can say about this. At the very least, ramification satisfies certain relation modulo \(2\). In addition as \(e_P - 1 \geq 0\), Riemann-Hurwitz restricts the existence of degree \(n\) maps in terms of genus of surfaces. We list a few implications here.
\end{remark}

\begin{corollary}\leavevmode
  \begin{enumerate}
  \item
    \[
      \sum_{P \in R}(e_P - 1) = 0 \pmod 2.
    \]
  \item \(g_R \geq g_S\).
  \item If \(g_S = 0\) and \(g_R > 1\) then \(f\) must be ramified.
  \item If \(f\) is unramified and \(g_S > 1\) then either \(g_R = g_S\) and \(n = 1\) or \(g_R > g_S\).
  \item If \(R\) admits an unramified self-map with degree \(n > 1\) then \(g_R = 1\).
  \end{enumerate}
\end{corollary}

\begin{eg}
  Let \(R' = \{(z, w): w^2 = z^3 - z\} \subseteq \C^2\). Let \(f(z) = z^3 - z\). The ramification points of \(\pi_z: R' \to \C\) are precisely \((-1, 0), (0, 0)\) and \((1, 0)\). Charts around these points are given by \(\pi_w\) so for example, the valency of \(\pi_z\) at \((0, 0)\) is the degree of
  \[
    \pi_z \compose \pi_w^{-1}
  \]
  at \(0\). But \(\pi^{-1}(w) = (f^{-1}(w^2), w)\) for some branch of \(f^{-1}\) locally so \(\pi_z \compose \pi_w^{-1}(w) = f^{-1}(w^2)\). We can show
  \begin{align*}
    \frac{d}{dw} f^{-1}(w^2) &= 0 \\
    \frac{d^2}{dw^2} f^{-1}(w^2) &\neq 0 \\
  \end{align*}
  so these points ramify with multiplicity \(2\) each.

  We have seen that \(R'\) embeds analytically in its compactification \(R\). Claim that \(\pi_z\) extends to some analytic map \(\overline \pi_z: R \to \C_\infty\) with \(\overline \pi_z(R \setminus R') = \{\infty\}\): \(\frac{1}{\pi_z}\) is a bounded analytic function on a punctured neighbourhood of \(P \in R \setminus R'\) with
  \[
    \lim_{Q \to P} \frac{1}{\pi_z(Q)} = 0
  \]
  so \(P\) is a removable singularity of \(\frac{1}{\pi_z}\). Thus extends to \(P\) and takes value \(0\). This is precisely an analytic map to \(\C_\infty\).

  Now we have an analytic map \(\overline \pi_z: R \to \C_\infty\) between compact Riemann surfaces. By considering, for example, that for finite \(z\), \(w^2 = z^3 - z\) has two solutions, \(\overline \pi_z\) has degree \(2\). Thus the only point \(P\) in \(R \setminus R'\) ramifies with multiplicity \(2\).

  Suppose we merely knew \(\overline \pi_z: R \to \C_\infty\) existed but didn't know how many points over \(\infty\) were in \(R \setminus R'\). Must have \(\overline \pi^{-1}(\infty) = R \setminus R'\) so either there are two points in \(R \setminus R'\) each with degree \(1\) or one point with degree \(2\). By Riemann-Hurwitz,
  \[
    2g_R - 2 = 2(0 - 2) + \sum_{P \in R} (e_P - 1)
  \]
  Reduce mod \(2\), there must be ramification above \(\infty\), and so there is a single point in \(R \setminus R'\), mapped with degree \(2\) to \(\infty\) and \(2g_R - 2 = -4 + 4\) so \(g_R = 1\).
\end{eg}

\begin{eg}
  Let \(R\) and \(R'\) be as above and \(X' = \{(x, y): y^2 = x^4 - 1\} \subseteq \C^2\). \(X'\) admits a complex structure via \(\pi_x, \pi_y\), and a compactification \(X\) via topological gluing such that both \(\pi_x\) and \(\pi_y\) extend to \(X\). There exists a map
  \begin{align*}
    X' &\to R' \\
    (x, y) &\mapsto (x^2, xy)
  \end{align*}
  which extends to an analytic map \(f: X \to R\). This map has degree \(2\), and is ramified if and only if \(x = -x\) and \(y = -y\), so in particular \(f\) is unramified on \(X'\). By Riemann-Hurwitz,
  \[
    2g_X - 2 = 2(2 \cdot 1 - 2) + \sum_{P \in X} (e_P - 1).
  \]
  The points of \(X \setminus X'\) are mapped to \(R \setminus R'\). Again reduce mod \(2\), there are two points of \(X \setminus X'\) and \(f\) is unramified at both. \(g_X = 1\).
\end{eg}

\begin{eg}[Fermat curve]\index{Fermat curve}
  For \(d \geq 3\), define the \emph{Fermat curve}
  \[
    F_d' = \{(x, y) \in \C^2: x^d + y^d = 1\}.
  \]
  By example sheet 3 Q13 there exists a compactification \(F_d\) of \(F_d'\) by gluing
  \[
    \{(t, u) \in \C^2: 1+ u^d = t^d\}
  \]
  via \(t = \frac{1}{x}, u = \frac{y}{x}\), and \(\pi_x, \pi_y\) extend to analytic maps \(F_d \to \C_\infty\). Note that there are \(d\) points in \(F_d \setminus F_d'\). \(\pi_x\) has degree \(d\) with ramification at \((\zeta_d, 0)\) for all \(d\)th roots of unity \(\zeta_d\). By Riemann-Hurwitz, as \(\pi_x\) has multiplicity \(d\) at such point,
\[
  2g_{F_d} - 2 = d(2 \cdot 0 - 2) + d(d - 1)
\]
so
\[
  g_{F_d} = \frac{(d - 1)(d - 2)}{2}.
\]
\end{eg}

\begin{corollary}
  There exist Riemann surfaces of arbitrarily large genus.
\end{corollary}

Our next goal is to show complex tori are algebraic, i.e.\ they are all compactification of \(\{(x, y) \in \C^2: p(x, y) = 0\}\) where \(p\) is some polynomial.

\begin{definition}[period]\index{period}
  Let \(f: \C \to \C_\infty\) be nonconstant analytic. \(\omega \in \C\) is a \emph{period} of \(f\) if
  \[
    f(z + \omega) = f(z)
  \]
  for all \(z \in \C\).
\end{definition}

It is immediate by principle of isolate zeros that periods of \(f\) consists of isolated point and they form an additive group. By example sheet 3 Q1, let \(\Lambda\) be the set of periods of \(f\), then exactly one of the following happens:
\begin{enumerate}
\item \(\Lambda = \{0\}\),
\item \(\Lambda = \Z\omega\) for some \(\omega \neq 0\),
\item \(\Lambda = \Z\omega_1 \oplus \Z\omega_2\) with \(\frac{\omega_2}{\omega_1} \notin \R\).
\end{enumerate}
In case 2 we say \(f\) is \emph{simply periodic}\index{periodic!simply} and in case 3 \(f\) is \emph{doubly periodic}\index{periodic!doubly}, or \emph{elliptic}\index{elliptic}.

\begin{proposition}
  Suppose \(f\) is simply periodic. By composing with scalar, assuming wlog \(\Lambda = \Z\). Then there exists analytic map \(\tilde f: \C^\times \to \C_\infty\) such that
  \[
    \tilde f(e^{2\pi i z}) = f(z).
  \]
\end{proposition}

\begin{proof}
  Since \(\Lambda = \Z\) there is a well-defined function \(\tilde f: \C^\times \to \C_\infty\) via \(\tilde f(e^{2\pi i z}) = f(z)\). Left to show this is analytic.
  \[
    \begin{tikzcd}
      \C \ar[r, "f"] \ar[d, "z \mapsto e^{2\pi iz}"'] & \C_\infty \\
      \C^\times \ar[ur, "\tilde f"']
    \end{tikzcd}
  \]
  \(\tilde f\) is continuous as \(e^{2\pi iz}\) and \(f\) are continuous and open. Locally \(\tilde f(w) = f(\frac{\log w}{2\pi i})\) so \(f\) is analytic.
\end{proof}

Let \(f\) be doubly periodic with \(\Lambda = \Z\omega_1 \oplus \Z\omega_2\), so that \(f\) takes all its values on a fundamental parallelogram
\[
  P_z = \{z + t_1\omega_1 + t_2\omega_2: t_1, t_2 \in [0, 1)\}.
\]
If \(f\) has no pole then \(f\) is bounded on \(\C\) so constant by Liouville.

\begin{proposition}
  Let \(f\) be doubly periodic with periods \(\Lambda\). Then there exists \(\tilde f: \C/\Lambda \to \C_\infty\) nonconstant analytic so that \(f = \tilde f \compose \pi\) where \(\pi: \C \to \C / \Lambda\) is the quotient.
\end{proposition}

\begin{proof}
  Ditto.
  \[
    \begin{tikzcd}
      \C \ar[r, "f"] \ar[d, "\pi"'] & \C_\infty \\
      \C/\Lambda \ar[ur, "\tilde f"']
    \end{tikzcd}
  \]
\end{proof}

\begin{corollary}
  If \(f\) is nonconstant elliptic then exists \(n \geq 1\) such that \(\deg f = n\), i.e.\ every point in \(\C_\infty\) has \(n\) preimages, counting multiplicity, on any period parallelogram.
\end{corollary}

\begin{proof}
  Immediate from valency theorem.
\end{proof}

Here we say \(f\) has degree \(n\) to mean \(\tilde f: \C/\Lambda \to \C_\infty\) has degree \(n\).

\begin{corollary}
  If \(f\) is nonconstant elliptic of degree \(n\) then \(n \geq 2\).
\end{corollary}

\begin{proof}
  If \(n = 1\) then \(\tilde f\) is a conformal isomorphism. But \(\C/\Lambda\) and \(\C_\infty\) are not even homeomorphic.

  Alternatively, choose a period parallelogram \(P\) for \(\Lambda\) with no zeros or poles of \(f\) on its boundary (exists by principle of isolated zeros and discreteness of lattice). Then by residue theorem,
  \[
    \sum_{z \in P} \operatorname{res}_z(f) = \oint_{\p P} f(z) dz = 0
  \]
  where the last equality is because \(f\) is doubly periodic. Thus there are at least \(2\) poles of \(f\) counting multiplicity.
\end{proof}

\subsection{Weierstrass \(p\)-function}

We exhibit a degree \(2\) elliptic function asssociated to each lattice.

\begin{definition}[Weierstrass \(\wp\)-function]\index{Weierstrass \(\wp\)-function}
  Let \(\Lambda\) be a lattice in \(\C\). The \emph{Weierstrass \(\wp\)-function} associated to \(\Lambda\) is
  \[
    \wp(z) = \wp_\Lambda(z) = \frac{1}{z^2} + \sum_{\omega \in \Lambda \setminus \{0\}} \left( \frac{1}{(z - \omega)^2} - \frac{1}{\omega^2} \right).
  \]
\end{definition}

To show that we have written down a sensible thing we should check this converges. We use the following lemma:

\begin{lemma}
  Let \(\Lambda\) be a lattice. Then \(\sum_{\omega \in \Lambda \setminus \{0\}} \frac{1}{|\omega|^t}\) converges if and only if \(t > 2\).
\end{lemma}

As a comment, in general when trying to understand a series defined in terms of a lattice \(\Lambda\), we always relate \(\Lambda\) to the square lattice \(\Z \oplus \Z i\).

\begin{proof}
  Let \(\Lambda = \Z \omega_1 \oplus \Z \omega_2\). Consider the function \((t_1, t_2) \mapsto |t_1 \omega_1 + t_2 \omega_2|\). This is continuous, and since \(\frac{\omega_1}{\omega_2} \notin \R\), this is nonzero on \(\R^2 \setminus \{0\}\), and so achieves positive bounds \(c_1, c_2\) on the compact set \(\{(t_1, t_2): |t_1| + |t_2| = 1\}\), i.e.
  \[
    0 < c_1 \leq |t_1 \omega_1 + t_2 \omega_2| \leq c_2
  \]
  on this set.

  Given \((k, \ell) \in \Z^2 \setminus \{(0, 0)\}\), let
  \begin{align*}
    t_1 &= \frac{k}{|k| + |\ell|} \\
    t_2 &= \frac{\ell}{|k| + |\ell|} \\
  \end{align*}
  so that
  \[
    c_1(|k| + |\ell|) \leq |k\omega_1 + \ell \omega_2| \leq c_2(|k| + |\ell|).
  \]
  So \(\sum_{\omega \in \Lambda \setminus \{0\}} \frac{1}{|\omega|^2}\) converges if and only if \(\sum_{(k, \ell) \in \Z \setminus \{0\}} \frac{1}{(|k| + |\ell|)^t}\) converges but
  \[
    \sum_{(k, \ell) \in \Z \setminus \{0\}} \frac{1}{(|k| + |\ell|)^t}
    = \sum_{q = 1}^\infty \sum_{|k| + |\ell| = q} \frac{1}{q^t}
    = \sum_{q = 1}^\infty \frac{4q}{q^t}
  \]
  which converges if and only if \(t > 2\).
\end{proof}

\begin{proposition}
  \(\wp\) converges to an elliptic function with period lattice \(\Lambda\). Moreover \(\wp\) is an even function of degree \(2\).
\end{proposition}

\begin{proof}
  We show \(\wp\) converges on compact sets: choose \(R \gg 1\) and let \(|z| \leq R\). There exist finitely many points \(\Lambda \cap D(0, 2R)\) and if \(|\omega| > 2R\) for \(\omega \in \Lambda\),
  \[
    \Bigg| \frac{1}{(z - \omega)^2} - \frac{1}{\omega^2} \Bigg|
    = \Bigg| \frac{2\omega z - z^2}{\omega^2(z - \omega)^2} \Bigg|
    \leq \frac{R |2\omega - z|}{|\omega|^4 \cdot \frac{1}{4}}
    \leq \frac{12R}{|\omega|^3}
  \]
  so by the lemma we have convergence.

  Thus \(\wp\) is meromorphic with well-define derivative
  \[
    \wp'(z) = \sum_{\omega \in \Lambda} \frac{-2}{(z - \omega)^3}.
  \]
  \(\wp'\) has all \(\omega \in \Lambda\) as periods so \(\wp(z + \omega) - \wp(z)\) is constant. Evaluate at, for example, \(z = - \frac{\omega}{2}\), we get \(\wp(\frac{\omega}{2}) - \wp(-\frac{\omega}{2})\). But \(\wp\) is manifestly even so this constant is \(0\). Thus every \(\omega \in \Lambda\) is a period for \(\wp\). Moreover since these are the only poles, they are the only periods for \(\wp\).

  Finally since \(0 \mapsto \infty\) with degree \(2\), and we can choose a period parallelogram with no other lattice points so no other pole of \(\wp\), by a previous corollary \(\deg \wp = 2\).
\end{proof}

\begin{remark}\leavevmode
  \begin{enumerate}
  \item Using factorisation through quotient, we can show that \(\wp\) is the unique meromorphic function that satisfy the following:
    \begin{enumerate}
    \item elliptic with periods \(\Lambda\),
    \item have poles only in \(\Lambda\),
    \item \(\wp(z) - \frac{1}{z^2} \to 0\) as \(z \to 0\).
    \end{enumerate}
  \item \(\wp'\) has degree \(3\), with a pole of degree \(3\) at lattice points, \(\wp'\) is odd and \(\wp'(\frac{\omega}{2}) = \wp'(-\frac{\omega}{2})\) for \(\omega \in \Lambda\) by periodicity. Thus \(\wp'(\frac{\omega}{2}) = 0\), i.e.\ \(\wp' = 0\) at the half-lattice points. There are 3 of these, so these are the only zeros of \(\wp'\). So \(\wp\) ramifies at the lattice points and half-lattice points. Because \(\deg \wp = 2\), the multiplicity is \(2\) at all such points. Additionally, the branch points \(\infty = \wp(0), e_1, e_2, e_3\) are distinct.

    Note that Riemann-Hurwitz is satisfied on \(\C/\Lambda\): \(\wp\) induces an analytic \(\tilde \wp: \C/\Lambda \to \C_\infty\) of degree \(2\) so
    \[
      2g_{\C/\Lambda} - 2 = 2(2 g_{\C_\infty} - 2) + 4.
    \]
  \end{enumerate}
\end{remark}

\begin{proposition}
  Let \(\Lambda\) be a lattice. There exist constants \(g_2, g_3\) (depending on \(\Lambda\)) such that \(\wp_\Lambda\) satisfies
  \[
    (\wp')^2 = 4 \wp^3 - g_2 \wp - g_3.
  \]
\end{proposition}

\begin{proof}
  Locally around \(0\), we have Laurent series
  \[
    \wp(z) = \frac{1}{z^2} + az^2 + \dots
  \]
  because \(\wp(z) - \frac{1}{z^2} = 0\) at \(z = 0\) and the first order term vanishes because \(\wp\) is even. So
  \[
    \wp'(z) = - \frac{2}{z^3} + 2az + \dots
  \]
  square and set \(g_2 = 20a\),
  \[
    (\wp')^2 - 4\wp^3 = \frac{-g_2}{z^2} + \text{ analytic}
  \]
  so
  \[
    (\wp')^2 - 4\wp^3 + g_2 \wp(z)
  \]
  is analytic so constant as it has no poles. Thus
  \[
    (\wp')^2 = 4\wp^3 - g_2 \wp - g_3
  \]
  as required.
\end{proof}

\begin{note}\leavevmode
  \begin{enumerate}
  \item Note that \(4\wp^3 - g_2 \wp - g_3 = 4 (\wp - e_1) (\wp - e_2) (\wp - e_3)\) where \(e_1, e_2, e_3\) are the branch points of \(\wp\). In particular, the sum \(e_1 + e_2 + e_3 = 0\).
  \item The ramification points of \(\wp\) are precisely the elements of the group \(\C/\Lambda\) which are \(2\)-torsion, i.e.\ \(2P = 0\).
  \end{enumerate}
\end{note}

\begin{corollary}
  Let \(\C / \Lambda\) be a complex torus and \(g_2, g_3\) as in the previous proposition. Then \(\C / \Lambda\) is conformally isomorphic to the Riemann surface \(X\) compactifiying
  \[
    X' = \{(z, w) \in \C^2: w^2 = 4z^3 - g_2z - g_3\}.
  \]
\end{corollary}

Every complex torus is algebraic.

\begin{proof}
  Exercise: As the \(e_i\)'s are distinct, the coodinates define a Riemann surface, and add a single point via gluing to give \(X\) with analytic embedding.

  Define
  \begin{align*}
    F: \C / \Lambda &\to X \\
    z &\mapsto (\wp(z), \wp'(z))
  \end{align*}
  Claim \(F\) has degree \(1\), which will imply that \(F\) is an isomorphism by valency theorem. Let \(P\) be the period parallelogram for \(\Lambda\) centred at \(0\). For \(z\) in interior of \(P\), \(\wp(z) = \wp(w)\) if and only if \(z = \pm w\) for \(w\) in the interior of \(P\). If \(z = -w\) then \(\wp'(z) = \wp'(-z)\), and since it is odd, \(\wp'(z) = -\wp'(z) = 0\). Thus \(z \neq 0\) is the unique preimage under \(F\) of \(F(z)\), i.e.\ \(\deg F = 1\). % ? can z be a half lattice point?
\end{proof}

\begin{remark}
  In example sheet we show \(\C/(\Z\omega_1 \oplus \Z\omega_2) \cong \C/(\Z \oplus \tau \Z)\) where \(\tau = \frac{\omega_2}{\omega_1}\), and \(\C/(\Z \oplus \tau_1\Z) \cong \C/(\Z \oplus \tau_2\Z)\) if and only if \(\tau_1, \tau_2\) are in the same orbit of action of \(\SL_2(\Z)\). Algebraically, \(g_2, g_3\) do \emph{not} quite determine \(\C/\Lambda\), rather we have the \emph{\(j\)-invariant}\index{\(j\)-invariant} defined by
  \[
    j(\Lambda) = \frac{1728g_2^3}{g_2^3 - 27 g_3^2}
  \]
  and \(j(\Lambda_1) = j(\Lambda_2)\) if and only if \(\C/\Lambda_1 \cong \C/\Lambda_2\).
\end{remark}

\begin{theorem}
  Let \(f\) be elliptic with periods \(\Lambda\). Then
  \[
    f = Q_1(\wp) + \wp' Q_2(\wp)
  \]
  for some \(Q_1, Q_2\) rational. Moreover, if \(f\) is even then we can take \(Q_2 = 0\).
\end{theorem}

Compare this with the statement that meromorphic functions on \(\C_\infty\) are precisely rationals.

\begin{proof}
  First assume \(f\) is even. Let
  \[
    E = \{z \in \C: z \in \frac{1}{2} \Lambda \text{ or } f'(z) = 0\}
  \]
  so to avoid branch points of \(\wp\). As \(f(E)\) is finite, we can find \(c \neq d\) in \(\C \setminus f(E)\) so that
  \[
    g(z) = \frac{f(z) - d}{f(z) - c}
  \]
  has only simple zeros and poles. Then in a period parallelogram centred at \(0\), we can write the zeros of \(g\) as \(\{a_1, \dots, a_n, -a_1, \dots, -a_n\}\) and poles as \(\{b_1, \dots, b_n, -b_1, \dots, -b_n\}\). Define
  \[
    h(z) = \frac{(\wp(z) - \wp(a_1)) \cdots (\wp(z) - \wp(a_n))}{(\wp(z) - \wp(b_1)) \cdots (\wp(z) - \wp(b_n))}
  \]
  so that \(h\) has the same poles and zeros (counting multiplicity) as \(g\). Thus \(g(z) = kh(z)\) for some constant \(k\), so that
  \[
    f = Q_1(\wp)
  \]
  for some rational \(Q_1\).

  If \(f\) is odd then \(\frac{f}{\wp'}\) is even so
  \[
    f = \wp' Q_2(\wp)
  \]
  by the same argument. Any \(f\) can be written as sum of an even and odd function.
\end{proof}

\section{Quotients of Riemann surfaces}

\begin{definition}[properly discontinuous action]\index{properly discontinuous action}
  Given a group \(G\) of homeomorphisms of a topological space \(X\), we say \(G\) acts \emph{properly discontinuously} if for every \(x \in X\) there exists a neighbourhood \(U\) of \(x\) such that if \(g(U) \cap h(U) \neq \emptyset\) then \(g = h\).
\end{definition}

\begin{remark}\leavevmode
  \begin{enumerate}
  \item If there exists \(g \in G\) nontrivial with a fixed point then \(G\) does not act properly discontinuously.
  \item If \(G\) is finite, \(G\) acts properly discontinuously implies that all stabilisers are trivial so all orbits have size \(|G|\).
  \end{enumerate}
\end{remark}

Given such a group action, we can form the quotient \(X/G\) and equip it with quotient topology via \(\pi: X \to X/G\). \(\pi\) is a local homeomorphism, \(X\) is path-connected so \(\pi\) is a regular cover. Note that if \(G\) is finite then \(\pi\) has well-defined degree \(|G|\).

\begin{lemma}
  If \(X\) is a Riemann surface and \(G \leq \aut(X)\) acting properly discontinuously, then \(X/G\) is a Riemann surface via \(\pi^{-1}\) together with charts of \(X\). Moreover the transition maps are in \(G\).
\end{lemma}

\begin{proof}
  Easy.
\end{proof}

\begin{eg}
  \(\C/\Lambda\) is the lattice resulted from translation action.
\end{eg}

\begin{proposition}[Hurwitz]\index{Hurwitz theorem}
  Let \(X\) be a compact Riemann surface of genus \(g_X \geq 2\). Let \(G \leq \aut(X)\) act properly discontinuously on \(X\). Then \(G\) is finite and
  \[
    |G| \leq g_X - 1.
  \]
\end{proposition}

\begin{proof}
  Suppose \(G\) is not finite. Fix \(P_0 \in X\). Then \(\{g(P_0): g \in G\}\) is infinite. By compactness of \(X\) it has a converging subsequence \(g_n(P) \to Q\). For any neighbourhood \(V\) of \(Q\) and \(n, m \gg 1\), we have
  \[
    P_0 \in g_n^{-1}(V) \cap g_m^{-1}(V).
  \]
  Absurd.

  By previous remark \(\pi: X \to X/G\) is a degree \(|G|\) map of compact Riemann surfaces so by Riemann-Hurtwitz
  \[
    2g_X - 2 = |G| (2g_{X/G} - 2)
  \]
  as there is no ramification (\(\pi\) is a local homeomorphism). As both sides are positive and \(2g_{X/G} - 2 \geq 2\),
  \[
    |G| \leq g_X - 1.
  \]
\end{proof}

\begin{remark}
  There is no such bound on \(|G|\) for \(g_X = 1\): complex tori admit translations via the group structure so choosing an arbitrarily large discrete subgroup of \(\C/\Lambda\) to translate by, we obtain arbitrarily large \(|G|\). For example let \(G\) be the points \(P \in \C/\Lambda\) such that
  \[
    [n] P = \id_{\C/\Lambda}.
  \]
\end{remark}

\subsection{Uniformisation theorem and consequences}

\begin{theorem}[uniformisation theorem]\index{uniformisation theorem}
  Let \(R\) be a simply connected Riemann surface. Then \(R\) is conformally isomorphic to one of \(\C, \C_\infty, \mathbb D\) (or \(\mathbb H\), the upper half plane).
\end{theorem}

\begin{proof}
  Non-examinable. Omitted.
\end{proof}

\begin{fact}
  Any Riemann surface \(X\) is the quotient \(\pi: \tilde X \to X\) of a simply connected Riemann surface \(\tilde X\) by the deck transformation of \(\pi\), i.e.\ automorphisms \(p: \tilde X \to \tilde X\) such that \(\pi \compose p = \pi\). This group acts properly discontinuously. Note then that \(\pi\) is regular.
\end{fact}

\begin{definition}[universal cover]\index{universal cover}
  \(\pi: \tilde X \to X\) is the \emph{universal cover} of \(X\).
\end{definition}

\begin{remark}
  \(\C, \C_\infty, \mathbb D\) are distinct: \(\C_\infty\) is the only compact one, and if there is an isomorphism \(\C \cong \mathbb D\) then it is bounded and entire, contradicting Liouville's theorem.
\end{remark}

Let's discuss different cases.
\begin{enumerate}
\item \(X\) has \(\C_\infty\) as universal cover: i.e.\ there exists \(G \leq \aut(\C_\infty)\) acting properly discontinuously such that \(X \cong \C_\infty/G\). We've already figured out that \(\aut(\C_\infty)\) is the set of Möbius transformations. Since any Möbius transformation has a fixed point in \(\C_\infty\), \(G\) is trivial so \(X \cong \C_\infty\).

  This also agrees with Riemann-Hurwitz: we can only decrease genus.
\item \(X\) has \(\C\) as universal cover. As any automorphism of \(\C\) extends to an automorphism of \(\C_\infty\), we concluded that \(\aut(\C) = \{az + b: a \neq 0, b \in \C\}\). If \(a \neq 1\) then \(z \mapsto az + b\) has a fixed point so \(G \leq \{z + b: b \in \C\}\). Identify \(z \mapsto z + b\) with \(b\), \(G\) must consist of isolated points. By example sheet 3 Q1, \(G\) is one of \(0, \Z\omega\) or \(\Z \omega_1 \oplus \Z \omega_2\). So one of the following happens:
  \begin{align*}
    X &\cong \C \\
    X &\cong \C/2\pi\Z \cong \C^* \\
    X &\cong \C/\Lambda
  \end{align*}
  where \(\Lambda\) is a lattice.

  \begin{remark}
    If \(X\) is compact with \(\C_\infty\) or \(\C\) as universal cover, \(g_X \in \{0, 1\}\). Equivalently if \(g_X \geq 2\) then \(X\) must have \(\mathbb D\) as universal cover.
  \end{remark}
\item \(X\) has \(\mathbb D\) as universal cover: we can only barely scratch the surface the final, and most interesting family. Recall (or note) that
  \[
    \aut(\mathbb D) = \{z \mapsto e^{i\theta} \frac{z - a}{1 - \conj a z}\}.
  \]
  Alternatively,
  \[
    \aut(\mathbb H) = \PSL_2(\R) = \SL_2(\R)/\{\pm 1\}.
  \]
  The subgroups of \(\PSL_2(\R)\) which act properly discontinuously are \emph{Fuschsian groups}\index{Fuschsian group}, studied in \emph{hyperbolic geometry}.
\end{enumerate}

\begin{corollary}
  If \(X\) is uniformised by \(\mathbb D\) then \(X\) is a metric space.
\end{corollary}

\begin{proof}
  \(\aut(\mathbb D)\) are isometries for the hyperbolic metric.
\end{proof}

\begin{corollary}[Picard]\index{Picard theorem}
  If \(f: \C \to \C \setminus \{0, 1\}\) is analytic then \(f\) is constant.
\end{corollary}

\begin{proof}
  Claim that \(\C \setminus \{0, 1\}\) has \(\mathbb D\) as universal cover: if not then as it is noncompact it is isomorphic to either \(\C\) or \(\C^*\). Suppose \(\varphi: \C \setminus \{0, 1\} \to \C\) is an isomorphism, then by Liouville this is unbounded near \(\infty\). If the singularity at \(\infty\) is essential then by Casorati-Weierstrass \(\deg \varphi > 1\). So there is a pole of order \(1\) at \(\infty\), so \(\varphi\) extends to an isomorphism \(\C_\infty \setminus \{0, 1\} \to \C_\infty\). Similar for \(\C^*\).

  Given such an \(f\), as \(\C\) is simply connected it can be lifted to \(\tilde f: \C \to \mathbb D\). Can check \(\tilde f\) is analytic so constant, so \(f\) is too.
  \[
    \begin{tikzcd}
      & \mathbb D \ar[d, "\pi"] \\
      \C \ar[ur, "\tilde f"] \ar[r, "f"] & \C \setminus \{0, 1\}
    \end{tikzcd}
  \]
\end{proof}

\begin{corollary}[Riemann mapping theorem]\index{Riemann mapping theorem}
  Let \(U \subsetneq \C\) be a domain. If \(U\) is simply connected then \(U \cong \mathbb D\).
\end{corollary}

\begin{proof}
  Similar to above, suffices to show \(U \ncong \C\). If it were we would have \(\C_\infty \cong U \cup \{\text{pt}\}\), contradicting compactness.
\end{proof}

\section{Non-examinable collection}

Let
\[
  X' = \{(x, y) \in \C^2: y^2 = (x - \alpha_1) \cdots (x - \alpha_{2g + 2})\}
\]
where \(\alpha_1, \dots, \alpha_{2g + 2}\) are distinct points in \(\C\). \(X'\) is a Riemann surface via \(\pi_x, \pi_y\), and can be compactified via gluing to
\[
  Y' = \{(z, w) \in \C^2: w^2 = (1 - \alpha_1z) \cdots (1 - \alpha_{2g + 2} z)\}
\]
and \((x, y) \mapsto (\frac{1}{x}, \frac{y}{x^{g + 1}})\). Call the compactification \(X\) and note that \(X \setminus X'\) contains 2 points. \(\pi_x\) extends to \(X\) with \(\pi_x(X \setminus X') = \{\infty\}\), has degree \(2\) so by Riemann-Hurwitz
\[
  2g_X - 2 = 2(-2) + (2g + 2)
\]
so \(g_X = g\). This is a natural generalisation of Fermat curve\index{Fermat curve} and in particular shows that we can construct a Riemann surface with arbitrary genus.

Define \(i_h: X \to X\) by \((x, y) \mapsto (x, -y)\) on \(X'\) and \((z, w) \mapsto(z, -w)\) on \(Y'\). Check it is well-defined.
\[
  G = \langle i_h \rangle \leq \aut(X)
\]
does \emph{not} act properly discontinuously as \((\alpha_i, 0)\) is a fixed point for all \(i\). Nonetheless we have a topological covering \(\pi_x: X \to X/G\), which is isomorphic to \(\C_\infty\). We study Riemann surfaces via understanding the collection of such quotients.

\printindex
\end{document}

% https://www.dpmms.cam.ac.uk/~hk439/teaching.html