\documentclass{homework}
\course{Math 5522H}
\author{Alex Li}
\input{preamble}

\begin{document}
\maketitle

\begin{inspiration} % https://frinkiac.com/caption/S01E04/240324
  As far as anybody knows, we're a nice normal family.
  \byline{Homer Simpson in S01E04}
  \end{inspiration}

  \section{Terminology}

  \begin{problem}
    What is a \textbf{normal family} of holomorphic functions on an open set $U$?
    \end{problem}
    \begin{solution}
    A normal family $\mathcal{F}$ of functions $f\in \mathcal{F}: U \to \C$ is a family of functions where for any subsequence of functions $<f_n\in\mathcal{F}>_{n\in \N}$, there is a subsequence $<f_{n_k}>$ that converges normally in $U$.

    A sequence of functions is said to converge normally if it converges uniformly on every compact subset of $U$ and pointwise on all of $U$.

    \end{solution}
    \begin{problem}
      What does it mean to say that the infinite product
        \(
            \prod_{n=1}^\infty \left( 1 + a_n \right)
              \)
                converges?
                \end{problem}
                \begin{solution}
                Let $s_N = \prod_{n=1}^N \left(1 + a_n\right).$ The infinite product converges if the sequence $\{s_N\}$ converges, or if there is a value $s_\infty$ such that for all $\epsilon> 0$ there exists $N\in \N$ such that $\abs{s_N - s_\infty} \leq \epsilon$.

                \end{solution}
                \section{Numericals}

                \begin{problem}
                  For which $z$ does the series
                    \[
                        \sum_{n=0}^\infty \frac{\cos \left( nz \right)}{n!}
                          \]
                            converge?

                              Does it converge to a holomorphic function you recognize?
                              \end{problem}
                              \begin{solution}
                              This series converges for every $z\in \C$. First note that
                              \[
                              \abs{\cos(nz)} = \abs{\frac{e^{inz} + e^{-inz}}{2}} \leq e^{n\abs{z}}
                              \]
                              Using Stirling's approximation, there is some $c\in R$ so that $n! \geq \frac{1}{c}(\frac{n}{e})^n$
                              \[
                              \abs{\frac{\cos(nz)}{n!}} \leq \frac{e^{n\abs{z}}}{\frac{1}{c}(\frac{n}{e})^n} \leq \frac{ce^{n(|z|+1)}}{n^n}
                              \]
                              Thus
                              \[
                              \abs{\sum_{n=0}^\infty \frac{\cos(nz)}{n!}} \leq \sum_{n=0}^\infty \frac{ce^{n(|z|+1)}}{n^n}  = \sum_{n=0}^\infty c(\frac{e^{|z|+1)}}{n})^n
                              \]
                              The series on the right converges by comparison to a geometric series like $\frac{1}{2}$, and so by the weirstrauss M test, the series converges everywhere.

                              Next we notice that $\cos(nz) = \frac{e^{inx} + e^{-inx}}{2}$ and use this to expand the sum
                              \begin{align*}
                              \sum_{n=0}^\infty \frac{\cos(nx)}{n!} &= \sum_{n=0}^\infty \frac{e^{inx} + e^{-inx}}{n!2}\\
                              &= \frac{1}{2}\sum_{n=0}^\infty \frac{(e^{ix})^n}{n!} + \frac{1}{2}\sum_{n=0}^\infty \frac{(e^{-ix})^n}{n!}\\
                              &= \frac{1}{2}(e^{e^{ix}} + e^{e^{-ix}})
                              \end{align*}
                              \end{solution}
                              \begin{problem}\label{p4h10}
                                For which $z$ does the series
                                  \[
                                      \sum_{0 \neq n \in \Z} \left( \frac{1}{z+n} - \frac{1}{n} \right)
                                        \]
                                          converge?

                                            Does it converge to a meromorphic function you recognize?
                                              \textit{Hint:} \ref{residues-all-one}.
                                              \end{problem}
                                              \begin{solution}
                                              When $z\in \Z$, the series doesn't converge since some of it's terms are infinite. Otherwise, it should converge (pointwise).
                                                \begin{align*}
                                                \abs{\sum_{0 \neq n \in \Z} \left( \frac{1}{z+n} - \frac{1}{n} \right) }&= \abs{ \sum_{0 \neq n \in \Z} \left( \frac{n - (z+n)}{(z+n)n} \right) }\\
                                                &=  \abs{\sum_{0 \neq n \in \Z} \left( \frac{-z}{(z+n)n} \right)}\\
                                                &= \abs{ z\left(\sum_{\{n: |n|<=|z+n|\}} \left( \frac{-1}{(z+n)n} \right) + \sum_{\{n: |n|>|z+n|\}} \left( \frac{-1}{(z+n)n} \right)\right)}\\
                                                &\leq \abs{z}\left(\sum_{\{n: |n|<=|z+n|\}} \frac{1}{\abs{n^2}} + \sum_{\{n: |n|>|z+n|\}} \frac{1}{\abs{z+n}^2} \right)\\
                                                &\leq \abs{z}\left(\sum_{0\neq n\in \Z}  \frac{1}{\abs{n^2}}+ \sum_{\{0\neq n \in \Z\}} \frac{1}{\abs{z+n}^2} \right)
                                                  \end{align*}
                                                  And both of these sums are clearly finite (by say comparison to the integral $\int_{-\infty}^\infty \frac{dn}{(z+n)^2}$.)

                                                  Now add $\frac{1}{z}$ to the sum and let's compare this sum to $\pi\cot(\pi z)$. Both are holomorphic everywhere but the integers, and at those points, both of these functions have simple poles at $\Z$ with residue $1$. (This was proved for cot in the last assignment, and for the expression, we can just see that there's a single $1/(z-n)$ term plus a holomorphic function at each integer $n$). Also, both are periodic in that $f(z)=f(z+1)$ for all $z$.

                                                  So the function
                                                  \[
                                                  \pi \cot(\pi z) -\left(\sum_{n\in \Z} \frac{1}{z+n} - \frac{1}{n}\right)
                                                  \]
                                                  is holomorphic and also periodic. We will show that it is bounded for $\abs{\Re{(z)}}\leq .5$. First note that if we also have that $\abs{\Im(z)}\leq 1$, the function is bounded since it is holomorphic and we are considering a bounded region.
                                                  Otherwise, on this strip,
                                                  \[
                                                  \abs{\pi\cot(\pi z)} = \pi\abs{i\frac{e^{iz}+e^{-iz}}{e^{iz}-e^{-iz}}}
                                                  \leq \pi \frac{\abs{e^{iz}+e^{-iz}}}{\abs{e^{iz}-e^{-iz}}}\leq \frac{\pi\abs{e^{-\Im(z)}+e^{-\Im(z)}}}{\abs{e^{-\Im(z)}-e^{\Im(z)}}}
                                                  \leq \frac{\abs{2\pi e^{-1}}}{\abs{e-\frac{1}{e}}}
                                                  \]
                                                  Since the function is 1 periodic, $\pi\cot(\pi z)$ is bounded everywhere.

                                                  Next we look at the infinite sum:
                                                  \begin{align*}
                                                  \abs{\sum_{n\in \Z} \frac{1}{z+n} - \frac{1}{n}} &\leq \sum_{0\neq n\in \Z} \abs{\frac{1}{z+n} - \frac{1}{n} }\\
                                                  &\leq \sum_{n\in \Z} \frac{\abs{z}}{\abs{n}\abs{z+n}}\\
                                                  &\leq \sum_{n\in \Z}\abs{\frac{z}{(\abs{n}-.5)^2}}\leq \infty
                                                  \end{align*}
                                                  Where the last line comes from the fact that for any point $n\in \Z$, $\abs{n+z-.5} \geq \abs{z}$, since $z$ has real part no more than $.5$ in magnitude. Thus this function is finite and hence constant. Since it is 0 at the point 0, it is 0 everywhere so
                                                  \[
                                                  \pi \cot(\pi z) -\frac{1}{z} = \left( \sum_{0\neq n\in \Z} \frac{1}{z+n} - \frac{1}{n}\right).
                                                  \]
                                                  \end{solution}
                                                  \section{Exploration}

                                                  \begin{problem}\label{poisson-summation}Describe conditions on $f$ so
                                                    that, for a suitable $\gamma_1$ and $\gamma_2$,
                                                      \[
                                                          \sum_{n=-\infty}^\infty f(n) = \int_{\gamma_1} \frac{f(z)}{e^{2\pi i z} - 1} \, dz - \int_{\gamma_2} \frac{f(z)}{e^{2\pi i z} - 1} \, dz.
                                                            \]
                                                              Then expand $1/(e^{2\pi i z} - 1)$ as a geometric series to deduce the \textbf{Poisson summation formula}
                                                                \[
                                                                    \sum_{n=-\infty}^\infty f(n) = \sum_{n=-\infty}^\infty \hat{f}(n)
                                                                      \]
                                                                        where $\hat{f}$ is the Fourier transform, i.e.,
                                                                          \[
                                                                              {\hat {f}}(\xi ) := \int _{-\infty }^{\infty} f(x) \, e^{-2\pi ix \xi} \,dx.
                                                                                \]
                                                                                \end{problem}
                                                                                \begin{solution}
                                                                                Let's explore! Noting that the (order 1) zeros of $e^{2\pi i z} - 1$ are the integers, we likely want to use the residue theorem. So let $f$ be holomorphic. The residue of $f(z)$ at $k\in Z$ is
                                                                                \[
                                                                                \lim_{z\to k} \frac{(z-k)f(z)}{e^{2\pi i z}-1} = \lim_{z\to k}\frac{(z-k)f'(z)+f(z)}{2\pi i e^{2\pi iz}} = \frac{f(k)}{2\pi i e^{2\pi ik}} = \frac{f(k)}{2\pi i}
                                                                                \]
                                                                                So if we take a curve around all the zeros, we get the sum. In particular, let $\gamma$ be the curve around the rectangle centered at $(0,0)$ with height $h$ and width $R\to \infty$. Provided that $f$ gets small enough for everything to converge (say $O(\frac{1}{z^2}$) as $R\to \infty$, the two sides of the rectangle will go to zero and so the residue theorem shows us that
                                                                                \begin{align*}
                                                                                \sum_{k=-\infty}^\infty f(k) &= \int_{-\infty}^\infty -\frac{f(x+ih)}{e^{2\pi i (x+ih)}-1} dx + \int_{-\infty}^\infty \frac{f(x-ih)}{e^{2\pi i (x-ih)}-1} dx\\
                                                                                &= \lim_{h\to 0}\int_{-\infty}^\infty -\frac{f(x+ih)}{e^{2\pi i (x+ih)}-1} + \frac{f(x-ih)}{e^{2\pi i (x-ih)}-1} dx\\
                                                                                &= \lim_{h\to 0}\int_{-\infty}^\infty \frac{f(x)}{1 - e^{2\pi i (x+ih)}} + \frac{f(x)}{e^{2\pi i (x - ih)}-1} dx\\
                                                                                &= \lim_{h\to 0}\int_{-\infty}^\infty \frac{f(x)}{1 - e^{2\pi i (x+ih)}} + \frac{f(x)e^{-2\pi i (x - ih)}}{1 - e^{-2\pi i(x-ih)}} dz
                                                                                \end{align*}

                                                                                We now need to get rid of the denominator, note that
                                                                                \begin{gather*}
                                                                                \frac{1}{1-e^{2\pi i (z + ih)}} = \sum_{k=0}^\infty e^{2\pi i (z+ ih)k}\\
                                                                                \frac{e^{-2\pi i (z - ih)}}{1-e^{-2\pi i (z - ih)}} = \sum_{k=1}^\infty e^{2\pi i (z- ih)k} = \sum_{-\infty}^{-1} e^{2\pi i (z-ih)k}
                                                                                \end{gather*}
                                                                                And using these power series, we get the expression
                                                                                \begin{align*}
                                                                                \sum_{k=-\infty} ^\infty f(k) &= \lim_{h\to 0}\int_{-\infty}^\infty f(x)\left(\sum_{k=0}^{\infty}e^{2\pi i (x+ih)k} + \sum_{k=-\infty}^{-1} e^{2\pi i (x-ih)k}\right) dx\\
                                                                                &= \lim_{h\to 0}\int_{-\infty}^\infty f(x)\left(\sum_{k=0}^{\infty}e^{2\pi i xk}e^{-2\pi hk} + \sum_{k=-\infty}^{-1} e^{2\pi i xk}e^{2\pi hk}\right) dx
                                                                                \end{align*}
                                                                                We would like to get rid of the $e^{\pm 2\pi h k}$ term.
                                                                                Consider the sequence of functions
                                                                                \[
                                                                                f_h(x) = f(x)\left(\sum_{k=0}^{\infty}e^{2\pi i xk}e^{-2\pi kh} + \sum_{k=-\infty}^{-1} e^{2\pi i xk}e^{2\pi kh}\right)
                                                                                \]
                                                                                indexed by $\frac{1}{h}\in \N$ where and $h$ is sufficiently small so that the function always converges. We can choose $f(x)$ as in the following lemma.
                                                                                \begin{lemma}\label{sum_fh_converges}
                                                                                If, for any $\epsilon,C>0$
                                                                                \[\abs{f(x)} <  C\abs{(1-e^{\epsilon\abs{x}})/x^2}\]
                                                                                holds for all $x$,
                                                                                then
                                                                                \[ \lim_{R\to\infty} \int_{-R}^R f_h(x) dx < \infty\] converges for small enough $h$.
                                                                                \end{lemma}
                                                                                \begin{proof}
                                                                                Each term of the sum in $f_h$ is a bounded value times $f(x)e^{c_1kx}$ with $c_1<1$, so using the geometric series formula
                                                                                \[
                                                                                \abs{f_h(x)} \leq f(x)\frac{1}{1-e^{c_1 hx}}
                                                                                \]
                                                                                Then using the hypothesis of the lemma with $\epsilon = c_1h$ (we can make $\epsilon$ arbitrarily small by varying $h$,
                                                                                \[
                                                                                \int_{-\infty}^\infty \abs{f_h(x)}dx \leq \int_{-\infty}^\infty Cx^{-2} dx \leq \infty
                                                                                \]
                                                                                and thus the integral converges.
                                                                                \end{proof}
                                                                                Now we can consider swapping the order of the limits and integration. We need another lemma.
                                                                                \begin{lemma}\label{fh_converges_normally}
                                                                                \[
                                                                                f_h(x) = f(x)\left(\sum_{k=0}^{\infty}e^{2\pi i xk}e^{-2\pi kh} + \sum_{k=-\infty}^{-1} e^{2\pi i xk}e^{2\pi kh}\right)
                                                                                \]
                                                                                converges normally to \[\sum_{k=-\infty}^\infty f(x)e^{2\pi kh}\]
                                                                                \end{lemma}
                                                                                \begin{proof}
                                                                                To see that this convergence is uniform on compact sets, we show that it is uniform on any interval $[a, b]$.
                                                                                Choose $N$ so big that
                                                                                \[
                                                                                \abs{\sum_{k=N}^\infty f(x)e^{2\pi i x k}(1-e^{-2\pi hk}) +
                                                                                \sum_{k=-\infty}^{-N} f(x)e^{2\pi i x k}(1-e^{2\pi hk})} < \epsilon_1
                                                                                \]
                                                                                this is possible for any $\epsilon_1>0$ since the sum converges, since $f(x)$ is bounded on the interval $[a, b]$ and the other terms are bounded in magnitude by 1.

                                                                                Next note that, for a fixed $x$, the terms of the sum $e^{2\pi ix k}e^{2\pi h k}$ will converge to $e^{2\pi h k}$ since $\lim_{h\to 0} e^{2\pi h k}\to 1$. Again using the fact that $f$ is bounded, we can choose $h$ so small that $f(x)e^{2\pi x i k}(1-e^{2\pi h k})\leq \epsilon_2$ for any $\epsilon_2>0$.

                                                                                Thus
                                                                                \begin{align*}
                                                                                \abs{\sum_{k=-\infty}^\infty f(x)e^{2\pi k h} - f_h(x)} &= \bigg|
                                                                                \sum_{k=N}^\infty f(x)e^{2\pi i x k}(1-e^{-2\pi hk}) \\
                                                                                &+ \sum_{k=-\infty}^{-N} f(x)e^{2\pi i x k}(1-e^{2\pi hk}) + \sum_{-N+1}^{N-1} f(x)e^{2\pi ixk}(1-e^{2\pi kh})\bigg| \\
                                                                                &\leq \epsilon_1 + \epsilon_2
                                                                                \end{align*}

                                                                                It must converge pointwise everywhere, since any point is in some compact set, where the function converges uniformly.
                                                                                \end{proof}
                                                                                Now, we want to compute
                                                                                \[
                                                                                \lim_{h\to 0}\lim_{R\to \infty} \int_{-R}^R f_h(x)dx.
                                                                                \]
                                                                                For all sufficiently small $h$ and any $\epsilon>0$, we can find $R_1$ big enough so that
                                                                                \[
                                                                                \abs{\int_{-\infty}^\infty f_h(x)dx - \int_{-R_1}^{R_1} f_h(x)dx} < \epsilon
                                                                                \]
                                                                                since the absolute vale of $\int_{-\infty}^\infty f_h(x)dx$ is bounded by \ref{sum_fh_converges}.

                                                                                Now we can use Theorem 1.4 along with lemma \ref{fh_converges_normally} of Palka (normal convergence + continuous $\implies$ can swap integral order) to bring the limit inside the integral:
                                                                                \[
                                                                                \lim_{h\to 0} \int_{-R_1}^{R_1} f_h(x)dx =
                                                                                \int_{-R_1}^{R_1}\lim_{h\to 0} f_h(x)dx = \int_{-R_1}^{R_1}\sum_{k=-\infty}^\infty e^{2\pi i k x} f(x)dx
                                                                                \]
                                                                                And by increasing $R_1$ to make $\epsilon$ arbitrarily small we conclude that
                                                                                \[
                                                                                \sum_{k=-\infty}^\infty f(k) = \lim_{h\to 0} \lim_{R\to \infty} \int_{-R}^{R} f_h(x)dx = \int_{-\infty}^{\infty}\sum_{k=-\infty}^\infty e^{2\pi i k x} f(x)dx
                                                                                \]

                                                                                If we can only interchange the order of the integral and the sum, we will have the correct formula. To do this, we can use Fubini's theorem and it suffices for $f$ to be such that the value of the sum of the integral to be finite- that is, for $\sum_{k=-\infty}^\infty f(k)$ to be finite. Thus we can finally conclude that
                                                                                \begin{align*}
                                                                                \sum_{-\infty} ^ \infty f(x) &=  \sum_{k=-\infty}^{\infty}\int_{-\infty}^\infty f(x)e^{2\pi i xk} dx\\
                                                                                &=  \sum_{k=-\infty}^{\infty}\int_{-\infty}^\infty f(x)e^{-2\pi i xk} dx = \sum_{k=-\infty}^\infty \hat f(k)dx
                                                                                \end{align*}
                                                                                Provided that for any $\epsilon,C>0$
                                                                                \[\abs{f(x)} <  C\abs{(1-e^{\epsilon\abs{x}})/x^2}\]
                                                                                holds for all $x$, $f$ is holomorphic, and $\sum_{k\in \Z} f(k)$ is finite.
                                                                                \end{solution}

                                                                                \begin{problem}\label{modularity}For $a > 0$ define
                                                                                $\vartheta(a) = \sum_{n=-\infty}^\infty e^{-a \pi n^2}$.  Recalling
                                                                                \ref{fourier-transform-itself} shows that if $f(z) = e^{-a \pi z^2}$
                                                                                we can compute $\hat{f}(z)$.  Use $\hat{f}(z)$ and
                                                                                \ref{poisson-summation} to verify
                                                                                \[
                                                                                \vartheta(a) = \vartheta(1/a) / \sqrt{a}.
                                                                                \]
                                                                                \end{problem}
                                                                                \begin{solution}

                                                                                \begin{lemma}
                                                                                \[
                                                                                \hat{f}(z) = \frac{e^{\frac{-\pi \xi}{a}}}{\sqrt{a}}
                                                                                \]
                                                                                \end{lemma}
                                                                                \begin{proof}
                                                                                Cosider the closed rectangular contour that goes on a straight line between the four points below.
                                                                                \[
                                                                                R \mapsto R - i\xi/a \mapsto - R - i\xi/a \mapsto -R
                                                                                \]
                                                                                As $R\to\infty$, the sides of this rectangle with nonzero imaginary derivative will disappear as
                                                                                \[
                                                                                \abs{\int_{-\xi/a}^{0} e^{-\pi((\pm R+ix) -i\xi/a)^2} dx} \leq \abs{\xi/a} \abs{e^{-\pi R^2}}\to 0.
                                                                                \]
                                                                                Since $f$ is holomorphic on the interior of the rectangal, we conclude that the integral of the top and bottom sides of the rectangle are negatives of each other. Let's compute the imaginary one going in the wrong direction:
                                                                                \begin{align*}
                                                                                {\hat {f}}(\xi ) &=\int_{-\infty}^\infty e^{-a\pi (z- i\xi/a)^2}e^{-2\pi i x\xi}\\
                                                                                &=  e^{-\xi^2\pi/a}\int _{-\infty }^{\infty} e^{-(x\sqrt{\pi a})^2} \,dx\\
                                                                                &=  \frac{e^{-\xi^2\pi/a}}{\sqrt{\pi a}}\int_{-\infty}^\infty e^{-u^2} \,du \quad \color{purple} u = \sqrt{\pi a}x, du = \sqrt{\pi a} dx\\
                                                                                &=  \frac{e^{-\xi^2\pi/a}}{\sqrt{\pi a}} \sqrt{\pi} =  \frac{e^{-\xi^2\pi/a}}{\sqrt{a}}
                                                                                \end{align*}
                                                                                \end{proof}
                                                                                Next, we apply the previous problem's statement. First we must check the conditions, but this is trivial, so we skip that step (Well, I don't really think it's true for my conditions). Anyways, we see that
                                                                                %TODO apply condition
                                                                                \begin{align*}
                                                                                \vartheta(x) &= \sum_{n=-\infty}^{\infty} e^{-a\pi n^2} = \sum_{n=-\infty}^{\infty} f(n) \\
                                                                                &= \sum_{n=-\infty}^\infty \hat f(n) = \sum_{n=-\infty}^\infty \frac{e^{-n^2\pi/a}}{\sqrt{a}}\\
                                                                                &= \frac{\sum_{n=-\infty}^\infty e^{-n^2\pi(1/a)}}{\sqrt{a}} = \vartheta(1/a)/\sqrt{a}
                                                                                \end{align*}
                                                                                \end{solution}
                                                                                \begin{problem}
                                                                                Having just celebrated $\pi$-day, some computer calculations revealed
                                                                                \begin{align*}
                                                                                \vartheta(1/(4\pi)) = \sum_{n=-\infty}^\infty e^{-n^2/4} &=
                                                                                3.544907701811032\textbf{10533931955126186}\ldots \\
                                                                                2\sqrt{\pi} &=
                                                                                3.544907701811032\textbf{05459633496668229}\ldots
                                                                                \end{align*}
                                                                                Is my computer broken?  (For more, see \texttt{https://arxiv.org/abs/1809.10907}.)
                                                                                \end{problem}
                                                                                \begin{solution}
                                                                                \[
                                                                                \vartheta(1/(4\pi)) = \sum_{n=-\infty}^\infty e^{-\frac{\pi n^2}{4\pi}} = \sum_{-\infty}^\infty e^{-n^2/4}
                                                                                \]
                                                                                By the preceding problem, this expression is equal to
                                                                                \[
                                                                                \frac{\vartheta(4\pi)}{\sqrt{4\pi}} = \frac{1}{2\sqrt{\pi}}\sum_{n=-\infty}^\infty e^{-4\pi^2 n^2} = \frac{1}{2\sqrt{\pi}}\left(1 + 2\sum_{n=1}^\infty e^{-4\pi^2 n^2}\right) = \frac{1}{2\sqrt{\pi}} + \text{tiny}
                                                                                \]
                                                                                So it makes sense that they are super close
                                                                                \end{solution}

                                                                                \begin{problem}
                                                                                Define
                                                                                \[
                                                                                \wp(z) = \frac{1}{z^2} + \sum_{0 \neq \lambda \in \Z[i]} \left( \frac{1}{(z - \lambda)^2} - \frac{1}{\lambda^2} \right)
                                                                                \]
                                                                                which is \textbf{Weierstrass' elliptic function} on the square lattice.  Use \ref{sum-one-over-gaussian-integers} to verify that $\wp(z)$ converges.
                                                                                \end{problem}
                                                                                \begin{solution}
                                                                                \begin{align*}
                                                                                \wp(z) &= \frac{1}{z^2} + \sum_{0 \neq \lambda \in \Z[i]} \left( \frac{1}{(z - \lambda)^2} - \frac{1}{\lambda^2} \right)\\
                                                                                &= \frac{1}{z^2} + \sum_{0 \neq \lambda \in \Z[i]} \left( \frac{\lambda^2 - (z-\lambda)^2}{\lambda^2(z-\lambda)^2} \right)\\
                                                                                &= \frac{1}{z^2} + \sum_{0 \neq \lambda \in \Z[i]} \left( \frac{\frac{\lambda}{z-\lambda}^2 - 1}{\lambda^2} \right)\\
                                                                                &= \frac{1}{z^2} + \sum_{0 \neq \lambda \in \Z[i]} \left( \frac{\frac{\lambda^2 - z^2 + 2z\lambda - \lambda^2}{(z-\lambda)^2}}{\lambda^2} \right)\\
                                                                                &= \frac{1}{z^2} + \sum_{0 \neq \lambda \in \Z[i]} \left( \frac{z(\lambda - 2z)}{\lambda^2(z-\lambda)^2} \right)\\
                                                                                \end{align*}
                                                                                The interior of the sum is a degree $-3$ polynomial in $\lambda$ and the constant $z$, so except for finitely many terms where $|\lambda|\approx |z|$, there will be some constant $c$ where the terms are less than $c\lambda^{-3}$. Since $-3 < -2$, the sum converges.
                                                                                \end{solution}

                                                                                \begin{problem}\label{elliptic-derivative-periodic}Compute $\wp'(z)$ by differentiating term-by-term to show that $\wp'(z + \lambda) = \wp'(z)$ for $\lambda \in \Z[i]$.
                                                                                \end{problem}
                                                                                \begin{solution}
                                                                                We can prove the identity by differentiating term by term,
                                                                                \begin{align*}
                                                                                \wp'(z) = z^{-3} + \sum_{0\neq \lambda\in\Z[i]} (-2(z-\lambda)^{-3}  + 2\lambda^{-3})\\
                                                                                = \sum_{\lambda\in\Z[i]}(-2(z-\lambda)^{-3}) + \sum_{0\neq \lambda\in\Z[i]} 2\lambda^{-3}\\
                                                                                \wp'(z-\lambda_1) = (z-\lambda_1)^{-3} + \sum_{0\neq \lambda\in\Z[i]} (-2(z-\lambda-\lambda_1)^{-3}  + 2\lambda^{-3})\\
                                                                                = \sum_{\lambda\in\Z[i]}(-2(z-\lambda)^{-3}) + \sum_{0\neq \lambda\in\Z[i]} 2\lambda^{-3}
                                                                                \end{align*}
                                                                                This also gives us the value of $\wp'(z)$.
                                                                                \end{solution}
                                                                                \begin{problem}
                                                                                Compare $\wp(z)$ and $\wp(-z)$.  Use this to relate $\wp(1/2)$ and $\wp(-1/2)$ and to relate $\wp(i/2)$ and $\wp(-i/2)$ and with \ref{elliptic-derivative-periodic}, conclude that $\wp(z + \lambda) = \wp(z)$ for $\lambda \in \Z[i]$.
                                                                                \end{problem}
                                                                                \begin{solution}
                                                                                It must be that $\wp(z) = \wp(-z)$, since
                                                                                \begin{align*}
                                                                                \wp(-z) &= \frac{1}{(-z)^2} + \sum_{0 \neq \lambda \in \Z[i]} \left( \frac{1}{(-z - \lambda)^2} - \frac{1}{\lambda^2} \right)\\
                                                                                &= \frac{1}{z^2} + \sum_{0 \neq -\lambda \in \Z[i]} \left( \frac{1}{(z - \lambda)^2} - \frac{1}{\lambda^2} \right) = \wp(z)
                                                                                \end{align*}
                                                                                Therefore $\wp(\frac{1}{2})=\wp(-\frac{1}{2})$, $\wp(\frac{i}{2})=\wp(-\frac{i}{2})$. By the fundamental theorem of calculus,
                                                                                \[
                                                                                \wp(\frac{1}{2}) - \wp(-\frac{1}{2}) = \int_{-\frac{1}{2}}^{.\frac{1}{2}}\wp'(x)dx = 0 = \int_{-\frac{1}{2}}^{\frac{1}{2}} i\wp'(ix)dx =\wp(\frac{i}{2}) - \wp(-\frac{i}{2})
                                                                                \]
                                                                                And since $\wp'$ is doubly, periodic, we can even conclude that for any $x$,
                                                                                \[
                                                                                \wp(x+1) - \wp(x) = \int_{x}^{x+1}\wp'(x)dx = 0 = \int_{x}^{x+1} i\wp'(ix)dx  = \wp(x+i) - \wp(x)
                                                                                \]
                                                                                so $\wp$ is also doubly periodic.

                                                                                \end{solution}
                                                                                \section{Prove or Disprove and Salvage if Possible}

                                                                                \begin{problem}\label{differentiating-taylor-series}If
                                                                                $f(z) = \sum_{n=0}^\infty a_n z^n$ has radius of convergence $r$,
                                                                                then the series
                                                                                \[
                                                                                g(z) = \sum_{n=1}^\infty n a_n z^{n-1}
                                                                                \]
                                                                                has radius of convergence $r$ and if $|z| < r$ then $f'(z) = g(z)$.
                                                                                \end{problem}
                                                                                \begin{solution}
                                                                                We get the reciprical of the radius of convergence of $g$ with the root test:
                                                                                \[
                                                                                \limsup \sqrt[n]{n\abs{a_{n+1}}} =
                                                                                \limsup \sqrt[n]{n}\sqrt[n]{\abs{a_{n+1}}} =
                                                                                \limsup \sqrt[n]{\abs{a_{n+1}}}
                                                                                \]
                                                                                And this last term is the reciprical of the radius of convergence of the sequence
                                                                                \[
                                                                                \sum_{n=0}^\infty a_{n+1}z^n = \frac{1}{z}\sum_{n=1}^\infty a_{n+1}z^{n+1} = \frac{1}{z}f(z)
                                                                                \]
                                                                                As this has the same radius of convergence as $f$,
                                                                                $g$ has the same radius of convergence as $f$.

                                                                                Next we need to show that $f'(z)=g(z)$. To start we make a short lemma.
                                                                                \begin{lemma}\label{difference_of_nths}
                                                                                \[(z+h)^n - z^n = h\sum_{k=0}^{n-1}(z+h)^{n-1-k}z^{k}\]
                                                                                \end{lemma}
                                                                                \begin{proof}
                                                                                \[
                                                                                (a-b)\sum_{k=0}^{n-1} a^{n-1-k}b^{k}=\sum_{k=0}^{n-1} a^{n-k}b^{k}-\sum_{k=1}^{n}a^{n-k}b^{k} = a^n-b^n
                                                                                \]
                                                                                Take $a=z+h, b=z$ to prove the lemma.
                                                                                \end{proof}
                                                                                To compute $f'(z)$, let's look at the difference quotient.
                                                                                \begin{align*}
                                                                                \frac{f(z+h)-f(z)}{h}
                                                                                &= \frac{1}{h}\sum_{n=0}^\infty a_n((z+h)^n - z^n) \\
                                                                                &= \sum_{n=0}^\infty a_n\sum_{k=0}^{n-1}(z+h)^{n-1-k}z^{k}\quad \text{ Lemma \eqref{difference_of_nths}}
                                                                                \end{align*}
                                                                                We want $f'(z)-g(z)=0$, so let's subtract $g(z)$ from the difference quotient. The coefficient of $a_n$ is then
                                                                                \begin{align*}
                                                                                \left(\sum_{k=0}^{n-1}(z+h)^{n-1-k}z^{k}\right) - nz^{n-1} &= \sum_{k=0}^{n-1}\left((z+h)^{n-1-k}z^{k} - z^{n-1} \right)\\
                                                                                &= \sum_{k=0}^{n-1}z^k\left((z+h)^{n-1-k} - z^{n-1-k} \right)\\
                                                                                &= \sum_{k=0}^{n-1}z^k\left((z+h)^{n-1-k} - z^{n-1-k} \right)\\
                                                                                &= h\sum_{k=0}^{n-1}z^k\left(\sum_{l=0}^{n-1-k}(z+h)^{n-1-k-l}z^l\right)\quad \text{ Lemma \eqref{difference_of_nths}}
                                                                                \end{align*}
                                                                                Let $m = max(|z+h|, |z|)$, so that we can bound the magnitude of this difference
                                                                                \begin{align*}
                                                                                \left(\sum_{k=0}^{n-1}(z+h)^{n-1-k}z^{k}\right) - nz^{n-1} &\leq  h\sum_{k=0}^{n-1}m^k\left((n-1-k)m^{n-1-k}\right)\\
                                                                                &\leq  h\binom{n-1}{2}m^{n-1}
                                                                                \end{align*}
                                                                                So therefore we can show that the difference between $f'$ and $g$ vanishes.
                                                                                \begin{align*}
                                                                                \abs{f'(z)-g(z)}\leq \lim_{h\to 0}h \sum_{n=0}^\infty a_n\binom{n-1}{2}m^{n-1}
                                                                                \end{align*}
                                                                                As $h\to 0$, $m$ is less than the radius of convergence, so the sum without the $\binom{n-1}{2}$ term converges. Since $\lim_{n\to\infty} \sqrt[n]{\binom{n-1}{2}} = \lim_{n\to\infty} \sqrt[n]{n^2} = 1$,
                                                                                the whole series converges within the same radius of convergence, and thus the two series are equal.

                                                                                \end{solution}
                                                                                \begin{problem}\label{sum-one-over-gaussian-integers}For $n > 2$, the
                                                                                series \( \displaystyle\sum_{0 \neq \lambda \in \Z[i]} \frac{1}{|\lambda|^n} \).
                                                                                converges.
                                                                                \end{problem}
                                                                                \begin{solution}
                                                                                Each $\lambda\in\Z[i]\setminus 0$ is contained on the square with corners \[(n, 0), (0, n), (-n, 0), (0, -n)\] with $n\in \N$. Furthermore, the $nth$ of these squares has $4n$ points in total, and each point is of radius at most $n$ from the origin. We can deduce a formula from these observations:
                                                                                \[
                                                                                \sum_{0 \neq \lambda \in \Z[i]} \frac{1}{|\lambda|^n} < \sum_{k=1}^\infty \frac{\text{zeros on kth square}}{\text{furthest zero from origin on kth square}} = \sum_{k=1}^\infty \frac{4k}{\sqrt{k}^n} = 4\sum_{k=1}^\infty k^{1-\frac{n}{2}}
                                                                                \]
                                                                                If $n > 2$, then the term to the right is a geometric series, so it converges. Thus the original series converges as well.
                                                                                \end{solution}
                                                                                \begin{problem}\label{elliptic-more-than-two-poles}There is no meromorphic function $f : \C \to \hat{\C}$ having simple poles at $a+bi \in \Z[i]$ and satisfying $f(z) = f(z+a+bi)$ for all $z \in \C$ and $a+bi \in \Z[i]$.
                                                                                \end{problem}
                                                                                \begin{solution}
                                                                                TODO this is wrong, we are assuming that there are no extra simple poles

                                                                                False.  Let $\gamma$ be the square of side length 1 centered at the origin. Then
                                                                                \[
                                                                                \int_\gamma f(z)dz = \int_{-\frac{1}{2}}^{\frac{1}{2}}f(z-\frac{i}{2})dz - \int_{-\frac{1}{2}}^{\frac{1}{2}}f(z+\frac{i}{2})dz + \int_{-\frac{1}{2}}^{\frac{1}{2}}f(iz+\frac{1}{2})dz - \int_{-\frac{1}{2}}^{\frac{1}{2}}f(iz-\frac{i}{2})dz
                                                                                \]
                                                                                But since $f$ is doubly-periodic, $f(z-\frac{i}{2}) = f(z+\frac{i}{2})$ and $f(z-\frac{1}{2}) = f(z+\frac{1}{2})$, so this integral is zero. However, there is a simple pole at zero, so
                                                                                \[
                                                                                \int_\gamma f(z) dz = 2\pi i\Res(f, 0)\neq 0.
                                                                                \]
                                                                                This is a contradiction, so no such $f$ can exist.
                                                                                \end{solution}

                                                                                \begin{problem}\label{infinite-product-sine}For all $z \in \C$, we have
                                                                                \(
                                                                                \sin \left( \pi z \right) = \pi \displaystyle\prod_{n=1}^\infty \left( 1 - \frac{z^2}{n^2} \right)
                                                                                \). % missing factor of z
                                                                                \end{problem}
                                                                                \begin{solution}
                                                                                False. At $z=0$, the function on the RHS is 1, while $sin(0)=0$. We prove the following statement:

                                                                                \begin{lemma}

                                                                                Define
                                                                                \[
                                                                                S(z) = \pi z \displaystyle\prod_{n=1}^\infty \left( 1 - \frac{z^2}{n^2} \right)
                                                                                \]
                                                                                Then
                                                                                \[
                                                                                S(z) = \sin \left( \pi z \right)
                                                                                \]
                                                                                \end{lemma}
                                                                                This function converges everywhere since $\sum_{n=1}^\infty\abs{\frac{z^2}{n^2}}\leq\infty$, so it is well defined.
                                                                                Note that
                                                                                \[
                                                                                \frac{\pfrac{}{z}\sin(\pi z)}{\sin(\pi z)} = \frac{\pi\cos(\pi z)}{\sin(\pi z)} = \pi \cot(\pi z)
                                                                                \]
                                                                                and
                                                                                \[
                                                                                \frac{S'(z)}{S(z)} = \frac{1}{z}  + \sum_{n=1}^\infty \left(\frac{\frac{2z}{n^2}}{1-\frac{z^2}{n^2}}\right) = \frac{1}{z}  + \sum_{n=1}^\infty \left(\frac{2z}{n^2-z^2}\right)
                                                                                \]
                                                                                By \ref{p4h10},
                                                                                \[
                                                                                \pi \cot(\pi z) -\frac{1}{z} = \left( \sum_{0\neq n\in \Z} \frac{1}{z+n} - \frac{1}{n}\right)
                                                                                \]
                                                                                Pairing the terms from $n$ and $-n$,
                                                                                \begin{align*}
                                                                                \frac{S'(z)}{S(z)} = \frac{1}{z} + \left( \sum_{n\in \N} \frac{2z}{z^2-n^2}\right) = \pi \cot(\pi z) = \frac{\pfrac{}{z}\sin(\pi z)}{\sin(\pi z)}
                                                                                \end{align*}
                                                                                Noting that
                                                                                \[
                                                                                \pfrac{}{z}\frac{S(z)}{\sin(\pi z)} = \frac{\sin(\pi z)S'(z) - S(z)\pi\cos(\pi z)}{\sin^2(\pi z)} = 0
                                                                                \]
                                                                                so the two functions are a constant multiple of each other. Since $\lim_{z\to 0 }zS(z) = \lim_{z\to 0} z\sin(\pi z)= \pi$, they are the same.

                                                                                \end{solution}
                                                                                \begin{problem}\label{normal-family-example}Define
                                                                                $f_w : B_1(0) \to \C$ by $f_w(z) = z/(z-w)$.  The family of
                                                                                functions $\mathcal{F} := \{ f_w \mid w \in \C \}$ is a normal
                                                                                family.
                                                                                \end{problem}
                                                                                \begin{solution}
                                                                                No way, not all of these functions are even defined on the ball of radius 1. We will assume additionally that $\abs{w}\geq 1$.

                                                                                By the Arzel\`a Ascoli Theorem, this family is normal iff it is both equicontinuous and pointwise bounded on $B_1(0)$. First let's show that this family is equicontinuous: choose a point $z_0\in B_1(0)$, and consider $z$ very close to $z_0$. We see that
                                                                                \[
                                                                                f(z)-f(z_0) = \frac{z}{z-w} - \frac{z_0}{z_0-w} = \frac{(z-z_0)w}{(z-w)(z_0-w)}
                                                                                \]
                                                                                We can choose $\delta$ small enough so that when $z-z_0<\delta$, $z < 1$. Then
                                                                                \[
                                                                                \abs{\frac{(z-z_0)w}{(z-w)(z_0-w)}}\leq \frac{\delta \abs{w}}{\abs{z-w}\abs{z_0-w}} \leq \frac{\delta \abs{w}}{\abs{w-\max(z, z_0)}^2}  \leq \frac{\delta \abs{w}}{\abs{w-z_0-\delta}^2}
                                                                                \]
                                                                                Decreasing $\delta$ will only make the denominator bigger and hence the value smaller, and since we are also multiplying by $\delta$, we can make the value arbitrarily small provided that
                                                                                \[
                                                                                \frac{\abs{w}}{\abs{w-z_0-\delta}^2}
                                                                                \]
                                                                                is bounded. Let $x= \abs{z_0-\delta} < 1$ and consider this as a real function in $w\geq 1$.
                                                                                \[
                                                                                g(w) = \frac{w}{\abs{w-x}^2}
                                                                                \]
                                                                                Since this is a degree $-1$ polynomial, it approaches 0 in the limit, and since it is everywhere continuous with $w\geq 1$, it must be bounded. Hence by choosing $\delta$ small enough, we can get the distance of $f(z)-f(z_0)$ arbitrarily small for any function in the family, so the family must be equicontinuous.

                                                                                Next we show that $\mathcal{F}$ is pointwise bounded. For any point $z_0$,
                                                                                \[
                                                                                \abs{\frac{z}{z-w}} \leq \frac{\abs{z}}{\abs{w}- \abs{z}} \leq \frac{\abs{z}}{1-\abs{z}}
                                                                                \]
                                                                                so it's bounded. Now we can apply Arzela to see that the family is normal.
                                                                                \end{solution}
                                                                                \begin{problem}\label{derivatives-normal-then-not-normal}Suppose $\mathcal{F}$ is a family of functions defined on the domain $B_1(0)$.  If $\mathcal{F}' := \{ f' \mid f \in \mathcal{F} \}$, the
                                                                                family consisting of derivatives of functions in the family
                                                                                $\mathcal{F}$, is normal, then the original family $\mathcal{F}$ is
                                                                                normal. % assume that \{ f(0) \mid f \in \mathcal{F} \} is bounded
                                                                                \end{problem}
                                                                                \begin{solution}
                                                                                False, define $f_k:\C\to\C, f_k(z)=k$ and let $\mathcal{F}=\{f_k: k\in \Z\}$ be a family of all constant functions. The sequence $\{f_k\}_{k\in \N}$ has no convergence subsequence, so the family is not normal. But the derivative of this family is just the constant function, and being a finite family, it is certainly normal.

                                                                                Instead, suppose that $\mathcal{F}$ is normal, and we will show that $\mathcal{F'}$ is normal too. We shold also assume that each of the functions have derivatives (and are hence analytic). For $f\in \mathcal{F}$, what can we say about $f'$?

                                                                                Since $\mathcal{F}$ is equicontinuous by Arzel\`a Ascoli, for any point $z_0$, for any function $f\in\mathcal{F}$, any $\epsilon > 0$, $\exists \delta$ so that $|z_0 - z|<\delta\implies |f(z_0) - f(z)| < \epsilon$. Thus
                                                                                \[
                                                                                f'(z) = \lim_{h\to 0}\frac{f(z+h) - f(z)}{h} \leq \lim_{\epsilon\to 0}\frac{\epsilon}{\delta}
                                                                                \]
                                                                                And since $f'$ exists, we can find a way of choosing $\delta$ so that
                                                                                \[
                                                                                \lim_{\epsilon\to 0}\frac{\epsilon}{\delta}\leq \infty
                                                                                \]
                                                                                this bound holds for all functions $f$ at the point $z$, so the derivatives are locally bounded. Since $f$ is analytic, $f'$ is too, and by Montel's thorem, $\mathbb{F'}$ is a normal family.
                                                                                \end{solution}
                                                                                \end{document}


% Estimate: 2 pages
\chapter{Tensor Networks}
In mathematics, tensors are abstract objects that generalize multilinear relationships between sets of objects in relation to some vector space, i.e., functions of multiple parameters that are linear with respect to each parameter. Tensors can be represented as multidimensional arrays, where the dimensionality is called the order of the tensor. An element (also called component) in the tensor is then denoted by sub- and superscripts, which represent the indices giving their position in the array, where superscripts usually indicate contra-variant components and subscripts indicate co-variant components.

An order 0 tensor has a single scalar component $a$, which doesn't have any sub- or superscripts, an order 1 tensor is a vector whose components can be described as either $a^i$ or $a_i$, and an order 2 tensor is a matrix whose components can be described as $a^{ij}$, $a_{ij}$, $a^{i\;}_{\;j}$, or $a_{i\;}^{\;j}$. Notice that while order 2 tensors can be represented by a matrix, they are not the same as the tensor components are not necessarily both co-variant (or contra-variant). To generalize it further to an order $n$ tensor $T$ of type $(p,q)$, where $p + q = n$, an element can be indexed as $T_{j_1,\dots,j_q}^{i_1,\dots,i_p}$.

A tensor network is simply a countable collection of tensors that are connected through contractions (\ccite{biamonte-2017-tensornetworks}). Tensor networks are often used in physics as they can be considered "stateful" representations of a full tensor. E.g., Projected Entangled Pair States (PEPS) is a tensor network that has seen use in quantum physics and condensed matter physics as an ansatz for quantum wavefunctions (\citeauthor*{verstraete_2004-quantum-computation} \parencite*{verstraete_2004-quantum-computation, verstraete-2004-renormalization-quantum-many-body-systems}), or Matrix Product State (MPS) for pure multipartite quantum states (\ccite{verstraete-2006-mps}). A more in-depth overview of some tensor networks will be given after a properly introducing the problem.

The differentiation between contra- and co-variance is mostly important when working with change of basis vectors and is often conveniently (but incorrectly) ignored to only use subscripts for the sake of simplicity. As no transformations or change of basis will be performed in this thesis, the convenient notation with keeping everything in subscript will be utilized from this point on.

\section*{Tensor Contraction}
The most important tensor operator in relation to tensor networks is tensor contraction. Generally, the contraction of a tensor is obtained when setting different indices equal (assuming that they have matching size) and summing over them. This operation lowers the tensor order by 2 as both indices are removed. In the case of an order 2 tensor, we have that

\begin{equation}
    \text{contr}(T_{ij}) \equiv \sum_i T_{ii}
\end{equation}

If $T_{ij}$ is interpreted as a matrix, then the contraction is the same as the trace. In the same way we can define the matrix product using tensor contraction. The individual elements from the matrix product $\bm A \bm B = \bm C$, where $A: I\times K$, $B: K\times J$ and $C: I\times J$ can be computed as
\begin{align}
    \sum_{k} A_{ik} B_{kj} &= C_{ij}
    \label{eq:matrixmult}
\end{align}
which is equivalent to contracting a higher order tensor. If we let $T = A \otimes B$, where $\otimes$ is a tensor product, then $T$ has the size $I\times K\times K\times J$. By contracting over the middle 2 dimensions, we then get $\bm C$. The form in \cref{eq:matrixmult} is also considered contraction as the context (shared dummy index $k$) implies that the contraction happens after tensor multiplication.

\section*{Tensor Notation}
\subsection*{Einstein Notation}
Working with tensors involves a lot of contracting, which means using a lot of summations. Einstein notation make these summation signs implicit if an index appears more than once (in our case where everything is subscript. Actual Einstein summation convention requires the repeated index to appear in both the upper index of one tensor and the lower index of the other tensor, e.g., $A^i_jB_i^k$).

Assume we have a function $f : \mathbb{R}^N\to \mathbb{R}$ and a function $g: \mathbb{R}^M\to\mathbb{R}^N$ and $\theta\in\mathbb{R}^M$, then calculating the partial derivatives $\frac{\partial f(g(\theta_i))}{\partial \theta_i}$ require calculating

\begin{align*}
    \frac{\partial f}{\partial \theta_1} &= \frac{\partial f}{\partial g_1}\frac{\partial g_1}{\partial \theta_1} + \frac{\partial f}{\partial g_2}\frac{\partial g_2}{\partial \theta_1} + \cdots + \frac{\partial f}{\partial g_N}\frac{\partial g_N}{\partial \theta_1} \\
    \frac{\partial f}{\partial \theta_2} &= \frac{\partial f}{\partial g_1}\frac{\partial g_1}{\partial \theta_2} + \frac{\partial f}{\partial g_2}\frac{\partial g_2}{\partial \theta_2} + \cdots + \frac{\partial f}{\partial g_N}\frac{\partial g_N}{\partial \theta_2} \\
    &\ \vdots
    \\
    \frac{\partial f}{\partial \theta_M} &= \frac{\partial f}{\partial g_1}\frac{\partial g_1}{\partial \theta_M} + \frac{\partial f}{\partial g_2}\frac{\partial g_2}{\partial \theta_M} + \cdots + \frac{\partial f}{\partial g_N}\frac{\partial g_N}{\partial \theta_M} \\
\end{align*}
This can then be written as
\begin{align*}
    \frac{\partial f}{\partial \theta_i} = \sum_j \frac{\partial f}{\partial g_j}\frac{\partial g_j}{\partial \theta_i} = \frac{\partial f}{\partial g_j}\frac{\partial g_j}{\partial \theta_i}
\end{align*}
The multilinearity of the problem is hidden away and all that remains is a single term.

% In this case it is a single summation sign that is saved, however if $\theta$ was to depend $\phi$ and $\phi$ depends on $\varphi$, then the equation for calculating $\frac{\partial f}{\partial \varphi}$ would quickly become full of summation signs, when it can be elegantly written as

% \begin{equation}
%     \frac{\partial f}{\partial \varphi_l} = \frac{\partial f}{\partial g_i}\frac{\partial g_i}{\partial \theta_j}\frac{\partial \theta_j}{\partial \phi_k}\frac{\partial \phi_k}{\partial \varphi_l}
% \end{equation}

One issue that Einstein notation doesn't solve is when an equation consists of a bunch of contractions with non-trivial indexing, which often is the case with tensor networks, that it quickly becomes unreadable and hard to identify how the different tensors are interacting with each-other and where the contractions are happening, which is why \ccite{penrose-1971-applications} introduces graphical notation.

\subsection*{Graphical Notation}
In Penrose graphical notation a tensor $\tau^{a,b,c,\cdots}_{x,y,z,\cdots}$ can be represented by a node with "arms" for $a,b,c,\cdots$ and "legs" for $x,y,z,\cdots$ as seen in \cref{fig:penrosetensor}. In the same way we can represent scalars, vectors, and matrices using graphical notation as seen in \cref{fig:scalar_vector_matrix}. The strength of Penrose graphical notation comes from how easy it is to represent rather complex tensor operations.

A tensor product is done by "concatenating" the tensors involved in the product, and a contraction is done by connecting the indices being contracted, as can be seen in \cref{fig:tensorprod_contraction}. If we disregard differentiating between contra- and covariance, which is usually the case, then tensor networks can be compactly represented using graphical notation. Using graph notation helps convey the structure of the network, which a formula alone might have trouble with.

\begin{figure}[!ht]
    \centering
    \begin{subfigure}[b]{.45\textwidth}
      \centering
      \includegraphics[trim=0.5cm 0.1cm 0cm 0.2cm]{reports/figures/penrose_graphical.pdf}
      \caption{Generic tensor.}
      \label{fig:penrosetensor}
    \end{subfigure}%
    \hfill
    \begin{subfigure}[b]{.45\textwidth}
      \centering
      {\includegraphics[trim=1.5cm 0.2cm 0cm 0.2cm, scale=0.5]{reports/figures/graphical_scalar_vector_matrix.pdf}}
      \vspace*{5mm}
      \caption{Scalar value, vector, and a matrix.}
      \label{fig:scalar_vector_matrix}
    \end{subfigure}%
    \caption{Examples of single tensors in Penrose graphical notation.}
\end{figure}

\begin{figure}[!ht]
    \centering
    \begin{subfigure}{1\textwidth}
      \centering
      {\includegraphics[trim=1cm 0cm 0cm 0cm, scale=0.75]{reports/figures/example_tensor_A_B.pdf}}
      \caption{Example tensors of order 4.}
    \end{subfigure}
    \begin{subfigure}{1\textwidth}
      \centering
      {\includegraphics[trim=2cm 0cm 0cm 0cm, scale=0.75]{reports/figures/example_tensor_product.pdf}}
      \caption{Tensor product between $A$ and $B$.}
    \end{subfigure}
    \begin{subfigure}{1\textwidth}
      \centering
      {\includegraphics[trim=2cm 0cm 0cm 0cm, scale=0.75]{reports/figures/example_contraction.pdf}}
      \caption{Contraction of 2 shared indices.}
      \label{fig:tensorcontractionexample}
    \end{subfigure}
    \caption{Example of key tensor operations using graphical notation. Notice that \cref{fig:tensorcontractionexample} disregards direction of indices.}
    \label{fig:tensorprod_contraction}
\end{figure}

\section{Canonical Polyadic Decomposition}
What will be referred to in this thesis as Canonical Polyadic decomposition goes by many different names. The decomposition method was first introduced by \ccite{hitchcock-1927-expression} as the polyadic form of a tensor, i.e., expressing a tensor as a combination of finite amount of vectors (or order 1 tensors). The concept got popularized way later in 1970 in the psychometrics community in the form of Parallel Factors (PARAFAC) by \ccite{harshman-1970-foundations} and Canonical Decomposition (CANDECOMP) by \ccite{carroll-1970-analysis}, which later got renamed to CANDECOMP/PARAFAC (or CP for short) by \ccite{kiers2000towards}. As the acronym remains the same, the that will be used from this point on will be Canonical Polyadic, as that best describes the use of the decomposition method for density estimation.

An order $M$ tensor $\mathcal{T}$ with elements $\mathcal{T}_{i_1,i_2,\cdots,i_M}$ can be decomposed as a sum of tensor products between order 1 tensors (vectors),
\begin{equation}
    \mathcal{T} = \sum_{r=1}^R \bm u_{r,1} \otimes \bm u_{r,2} \otimes \cdots \otimes \bm u_{r,M}
\end{equation}
where $\otimes$ is tensor product, $R$ is the rank of $\mathcal{T}$, and $\bm u_{i,j}$ are vectors. If the number of terms summed together is the minimal amount the decomposition is considered minimal or canonical and $R$ is the canonical rank.

Utilizing Einstein notation and considering order 2 tensors $U^{(m)}$ for $m\in[1\cdots M]$ as canonical factors, the decomposition can be written as
\begin{align}
    \mathcal{T}_{i_1,i_2,\cdots,i_M} &= \sum_{r=1}^R U^{(1)}_{r,i_1}\ U^{(2)}_{r,i_2}\ \cdots\ U^{(M)}_{r,i_M} \\
    &= \delta_{j_1,j_2,\cdots,j_M}\ U^{(1)}_{j_1,i_1}\ U^{(2)}_{j_2,i_2}\ \cdots\ U^{(M)}_{j_M,i_M}
\end{align}
where $\delta_{j_1,j_2,\cdots,j_M}$ is 1 for $j_1 = j_2 = \cdots = j_M$ and 0 otherwise. Using this result creating a graphical representation is trivial, as it just consists of tensor products and contraction with a core tensor, $\delta$, which can be seen in \cref{fig:canonical_polyadic_graph}. $\delta$ has no body in the graph as it acts like an identity matrix and just connects indices for contraction.
\begin{figure}[!ht]
    \centering
    {\includegraphics[trim=4cm 0cm 0cm 0cm, scale=0.75]{reports/figures/canonical_polyadic_graph.pdf}}
    \caption{Graphical notation of Canonical Polyadic Decomposition}
    \label{fig:canonical_polyadic_graph}
\end{figure}
\section{Tucker Decomposition}
The Tucker decomposition is a generalization of the Canonical Polyadic decomposition. Instead of limiting the core tensor to being $\delta$, \ccite{tucker-1966-some} proposes instead to use a generic core tensor, $\mathcal{G}$. If $\mathcal{T}\in \mathbb{R}^{I_1\times I_2\times \cdots\times I_M}$, then the core tensor has to have the same order, but not necessarily the same size: $\mathcal{G} \in \mathbb{R}^{J_1\times J_2\times\cdots\times J_M}$, where $J_i\leq I_i, i\in[1..M]$. $\mathcal{G}$ can then be combined with $M$ different components $U^{(i)} \in \mathbb{R}^{J_i\times I_i}, i\in[1..M]$.
\begin{align}
    \mathcal{T}_{i_1,i_2,\cdots,i_M} &= \mathcal{G}_{j_1,j_2,\cdots,j_M}\ U^{(1)}_{j_1,i_1}\ U^{(2)}_{j_2,i_2}\ \cdots\ U^{(M)}_{j_M,i_M}
\end{align}

The graphical representation of the Tucker decomposition is nearly identical \cref{fig:canonical_polyadic_graph} except the "connector" has a body, as $\mathcal{G}$ is non-trivial.
\begin{figure}[!ht]
    \centering
    {\includegraphics[trim=4cm 0cm 0cm 0cm, scale=0.75]{reports/figures/tucker_graphical.pdf}}
    \caption{Graphical notation of Tucker Decomposition}
    \label{fig:tucker_graph}
\end{figure}
\section{Tensor Train Decomposition}
As briefly mentioned before, tensor networks are often used in condensed matter physics and quantum physics. \ccite{oseledets-2011-tensor-train} popularizes Matrix Product States, which was proposed as early as \cite*{fannes1992finitely} by \ccite{fannes1992finitely}, for tensor decomposition under the name Tensor-Train Decomposition.

\citeauthor{oseledets-2011-tensor-train} points out that Canonical Polyadic decomposition suffers from several drawbacks, such as finding the canonical rank being an NP-hard problem, and that even the best algorithms for finding an approximate representation often get stuck in local minima. Meanwhile, the downside to the Tucker decomposition is that it relies on a core tensor, which has same order as the tensor getting approximated. As such it still suffers from the curse of dimensionality as the core tensor scales exponentially in size.

The proposed composition is on the form
\begin{equation}
    \mathcal{T}_{i_1,i_2,\cdots,i_M} = G^{(1)}_{:,i_1,:}\ G^{(2)}_{:,i_2,:}\ \cdots\ G^{(M)}_{:,i_M,:}
\end{equation}
where the factor $G^{(k)}$ is an order 3 tensor with elements $G^{(k)}_{\alpha_{k-1},i_k,\alpha_{k}}$, which means $G^{(k)}_{:,i_k,:}$ is an $r_{k-1}\times r_{k}$ matrix. The product of these index-dependent matrices is a matrix with size $r_0\times r_M$, which gives the requirement $r_0=r_M=0$. The binding indices $\alpha_k$ are called the bond dimensions. In index form, using Einstein notation, the decomposition is then written as
\begin{equation}
    \mathcal{T}_{i_1,i_2,\cdots,i_M} = G^{(1)}_{i_1,\alpha_1}\ G^{(2)}_{\alpha_1,i_2,\alpha_2}\ \cdots\ G^{(M)}_{\alpha_{M-1},i_M}
\end{equation}
where $\alpha_0$ and $\alpha_M$ are left out as those indices have size 1. The name Tensor Train originates from the linear structure, as seen in \cref{fig:tensor_train_graph}, created by connecting the components with the help of bond dimensions instead of using vectors as factors.
\begin{figure}[!ht]
    \centering
    {\includegraphics[trim=4cm 0cm 0cm 0cm, scale=0.75]{reports/figures/tensor_train_graph.pdf}}
    \caption{Graphical notation of Tensor Train Decomposition}
    \label{fig:tensor_train_graph}
\end{figure}
\section{Tensor Ring Decomposition}

\section{Tensor Grid Decomposition}


\subsection{Chapter 6}

\begin{p}%80
{Show that $\omega = (x dy-ydx)/(x^2+y^2)$ is closed. Show that $\int_{\gamma_0}\omega=-\pi$ while $\int_{\gamma_1}\omega=\pi$. }
\end{p}

{Let $r=x^2+y^2$. Then $\partial_i r=2x_i$. Now $d\omega=\partial_x(x/r) dy\wedge dx-\partial_y(y/r)dx\wedge dy=(1/r-2x^2/r^2)dy\wedge dx+(1/r-2y^2/r^2)dy\wedge dx
=(y^2-x^2)/r^2dy\wedge dx+(x^2-y^2)/r^2 dy\wedge dx=0.$ Turning to the integrals,
$\gamma_0$ is the upper half of the unit circle, traversed from (-1,0) to (1,0). We can
parameterize this path as $\gamma_0(t)=(\cos \pi(1{-}t),\sin \pi(1{-}t))$, and thus
$\gamma'_0(t)=\pi(\sin\pi(1{-}t),-\cos\pi(1{-}t))$. In these coordinates and on this path $\omega=(-y/r,x/r)=(-\sin \pi(1{-}t),\cos \pi(1{-}t))$, so $\int_{\gamma_0}\omega=\int_0^1 \omega_{\gamma_0(t)}(\gamma'_0(t)) {\rm d}t=-\pi$.
The other curve is $\gamma_1(t)=(\cos \pi(1{-}t),-\sin \pi(1{-}t))$, so $\gamma'_1(t)=\pi(\sin\pi(1{-}t),\cos\pi(1{-}t))$ and $\omega_{\gamma_1(t)}=(\sin \pi(1{-}t),\cos \pi(1{-}t))$, leading to $\int_{\gamma_1}\omega=\pi$.}

\begin{p}%81
{Show that $\R^n$  is simply connected by exhibiting an explicit formula
for a homotopy between any two paths between arbitrary points $p,q\in\R^n$.}
\end{p}
{Let
$f(t)$ and $g(t)$ be paths from $p$ to $q$. Then define $h(s,t)=sf(t)+(1{-}s)g(t)$. Clearly $h(0,t)=f(t)$ and $h(1,t)=g(t)$ and since all the intervening points are elements of $\R^n$
for all $t$, $h$ is a homotopy between $f$ and $g$.}

\begin{p}%82
{Show that a 1-form $E$ is exact iff $\int_\gamma E=0$ for all loops
$\gamma$. (Hint: if $E$ is not exact, show that there are two smooth paths $\gamma,\gamma'$ from some point $x\in M$ to some point $y\in M$ such that $\int_\gamma \om\neq \int_{\gamma'} E$. Use these paths to form a loop, perhaps only piecewise smooth.}
\end{p}

{Start with the `if' statement and let $E=d\phi$ be an exact form and $\gamma$ a loop starting and ending at $p$. Then
$\oint_\gamma E=\int_0^1 d\phi(\gamma'(t)){\rm d}t=\int_0^1\gamma'(t)[\phi]{\rm d}t=\int_0^1\frac{\rm d}{{\rm d}s}\phi(\gamma(s))_{s=t}{\rm d}t=\int_0^1[\phi(\gamma(t))]'{\rm d}t=\phi(\gamma(1))-\phi(\gamma(0))=\phi(p)-\phi(p)=0.$
Now the `only if' part, which we will show by proving the contrapositive.
If $E$ is closed but not exact, then the manifold must not be simply connected. Then choose two points $x$ and $y$ such that the paths $\gamma,\gamma'$ have no homotopy between them, i.e.~$\gamma$ and $\gamma'$ go on either side of the ``hole'' from $x$ to $y$; together they encircle the hole. Additionally, we must be able to
find some points $x,y$ and paths $\gamma,\gamma'$ such that $\int_\gamma E\neq \int_{\gamma'}E$ or else we could use this integral to define $\phi$ for which $E=d\phi$.
Then defining $\tilde{\gamma}$ to be the path taken by following $\gamma$ forwards and then $\gamma'$ backwards, we have found a path $\tilde{\gamma}$ such that  $\oint_{\tilde{\gamma}} E\neq 0$.}

\begin{p}%{83}
{For any manifold $M$, show the manifold $S^1\times M$ is not simply connected by finding a 1-form on it that is closed by not exact.}{Picking coordinates $(t,x^j)$ consider the 1-form $\om=$(1,0,\dots,0). Clearly $d\om=0$ so the form is
closed, but it is not exact. There is no continuous function $\phi$ defined on the whole manifold such that $\om=d\phi$, since if we try to define it using $\int_\gamma \om$ where
$\gamma$ is a path around $S^1$ and fixed on $M$, we obtain $\phi(t,x^j)=t$, which is multiple-valued.}
\end{p}

\begin{p}%{84}
{Let the $n$-disk $D^n$ be defined as $D^n=\{(x_1,\dots,x_n):x_1^2+\dots+x_n^2\leq 1\}$. Show that $D^n$ is an $n$-manifold with
boundary in an obvious sort of way.}
\end{p}
{Locally the neighborhood of each point on the unit circle $S^n$ already looks a lot like $H^{n}$ where the half space is defined by the tangent hyperplane. In particular, we can make
suitable charts by first using spherical coordinates to describe the points in the disk and then for each point,
assuming that it lies at the north pole and expanding the coordinates in a Taylor series in $\theta$ to first order. In two dimensions we then obtain $r(\cos \theta,\sin\theta)\rightarrow r(1,\theta)$ and in three dimensions
$r(\cos\theta,\sin\theta\cos\varphi,\sin\theta\sin\varphi)\rightarrow r(1,\theta\cos\varphi,\theta\sin\varphi)$. We then obtain a cylindrical coordinatization of the neighborhood of the selected point.}

\begin{p}%{85}
{Check that the definition of tangent vectors in Chapter 3 really does imply that the tangent space at any point on the boudary of an $n$-dimensional manifold with boundary is an $n$-dimensional vector space.}
\end{p}
{Tangent vectors are simply maps from $C^\infty$ to $\R$ obeying linearity and the Leibniz rule. If we first map the point on the boundary to the boundary of $H^n$, where $x^n\geq 0$ is the special coordinate,
then obviously
we still have all the derivatives in the directions $x_1,\dots,x_{n{-}1}$. The derivative in the $x_n$ direction still works as well, since the functions must be smooth to a small region outside the boundary, for which $-\varepsilon<x_n<0$. }

\begin{p}%{86}
{For the mathematically-inclined reader: prove that $\int_M\om$ is independent of the
choice of charts and partition of unity.}
\end{p}
...

\begin{p}%{87}
{Show that $\partial D^n=S^{n{-}1}$.}
\end{p}
{In exercise 84 we showed a collection of charts in which
at every point on the surface of the sphere nearby surface points are mapped to points on $\partial H^n$, thought of as the tangent hyperplane. Thus, surface points are on the boundary. No other points can be on the boundary since they are ``surrounded'' by other points in the manifold. Consider mapping a point in the interior to a point on $\partial H^n$. Not all open sets containing the point are mapped to open sets of $H^n$, and thus the chart transition function isn't smooth (isn't even continuous).}

\begin{p}%{88}
{Let $M=[0,1]$. Show that Stokes' theorem in this case is equivalent to the fundamental theorem
of calculus $\int_0^1 {\rm d}x\, f'(x)=f(1)-f(0)$.}
\end{p}
{Consider the 1-form $\om=df$. By Stokes' theorem $\int_M \om=\int_0^1 df=\int_{\partial M}f$. The boundary $\partial M$ is manifestly equal to $\{0,1\}$; only the orientation remains to be determined.  $dx$ defines the orientation by defining increasing $x$ to be outward-facing at 1 and inward-facing at 0. Thus $\int_{\partial M}f=f(1)-f(0)$.}

\begin{p}%{89}
{Let $M=[0,\infty)$, which is not compact. Show that without the assumption that $f$ vanishes outside a compact set, Stokes' theorem may not apply. (Hint: in this case Stokes' theorem says $\int_0^\infty {\rm d}x\, f'(x)=-f(0)$.)}
\end{p}
{Choose the function $f'(x)=1$. Then $f(x)=x$. The integral clearly diverges, whereas
by Stokes' theorem it would be zero. The function $f'(x)=e^{-x}$ works, though.}

\begin{p}%{90}
{Show that any submanifold is a manifold in its own right in a natural way.}
\end{p}
{A manifold is defined by having charts $\varphi_\alpha$ which smoothly map the open sets $U_\alpha$ to $\R^k$, where smooth means that the transition function $\varphi_\alpha\circ\varphi_\beta^{-1}$ is smooth
(infinitely differentiable) where defined. For a submanifold $S\subset M$ we can define the open sets to
be of the form $V_\alpha=S\cap U_\alpha$; this is the induced topology. Charts $\varphi_\alpha$ of $M$ are
guaranteed to satisfy $S\cap U_\alpha=\varphi_\alpha^{-1}\R^k$, which means that every open set in $S_\alpha$ is the preimage of some hyperplane $\simeq\R^k$ under the chart $\varphi_\alpha$. So we can
just define $\vartheta_\alpha$ to be this map from $S_\alpha$ to $\R^k$. The transition functions
$\vartheta_\alpha\circ\vartheta_\beta^{-1}$ are smooth because they are equivalent to the transition
functions $\varphi_\alpha\circ\varphi_\beta^{-1}$, restricted to the corresponding input and output
hyperplanes.}

\begin{p}%{91}
{Show that $S^{n{-}1}$ is a compact submanifold of $\R^n$.}
\end{p}
{Use the maps in exercise 84, fixing $r=1$.}

\begin{p}%{92}
{Show that any open subset of a manifold is a submanifold.}
\end{p}
{Isn't this just exercise 4?}

\begin{p}%{93}
{Show that if $S$ is a $k$-dimensional submanifold
with boundary of $M$, then $S$ is a manifold with boundary in a natural way.
Moreover, show that $\partial S$ is a $(k{-}1)$-dimensional
submanifold of $M$.}
\end{p}
{Same as exercise 90 except that the hyperplanes have boundaries.
That doesn't change the fact that the transition functions will be smooth. $\partial S$
is also a manifold using the charts from $S$ with the modification that the image of
the chart is now just the boundary of the hyperplane used before. Again, the transition
functions will be smooth, since they are just restrictions of smooth maps. }

\begin{p}%{94}
{Show that $D^n$ is a submanifold of $\R^n$ in this sense.}
\end{p}
{Isn't this just
exercise 84?}

\begin{p}%{95}
{Suppose that $S\subset \R^2$ is a 2-dimensional compact orientable submanifold with boundary. Work out what Stokes' theorem says when aplied to a 1-form on $S$. This is sometimes called
Green's theorem.}
\end{p}
{Let $\om=\alpha dx+\beta dy$. Then $d\om=(\partial_x \alpha-\partial_y\beta)dx\wedge dy$. Thus $\int_{\partial M}\alpha dx+\beta dy=\int_M (\partial_x \alpha-\partial_y\beta)dx\wedge dy$. To evaluate the lefthand side one should
make a coordinate transformation by regarding $\partial M$ as a curve $\gamma(t)$, the
inverse of which we can regard as a map from $\partial M$ to $\R$. This allows us
to express $dx$ and $dy$ in terms of the coordinate 1-form $dt$: $dx=\frac{d\gamma^1}{dt}dt$ and likewise for $dy$.}

\begin{p}%{96}
{Suppose that $S\subset \R^3$ is a 2-dimensional compact orientable submanifold with boundary. Show that Stokes' theorem aplied to $S$ boils down to the classic Stokes's theorem.}
\end{p}
{Suppose we work in a patch of $S$ with coordinates $x,y,z$ such that $z$ is fixed, so that $z=c$ defines $S$. On this patch let $\om=v_i dx^i$, where $i=1,2$. Then $d\om=\partial_j v_i dx^j\wedge dx^i$ for $i,j=1,2$. This can
be written $d\om=(\partial_2 v_1-\partial_1 v_2)dx^1\wedge dx^2$; the corresponding integral $\int_S d\om=\int_S (\nabla\times \vec{v})\cdot \hat{z}dA$, where $A$ is the area
(volume) element of $S$. The boundary of $S$ must be specified by a curve $\gamma(t)=(x^1(t),x^2(t))$. It then follows that $\om=v_i\frac{\partial x^i}{\partial t}dt$ so that the integral can be written $\int_{\partial S}\om=\int \vec{v}\cdot d\vec{\ell}$ with $\vec{\ell}=\frac{\partial x^i}{\partial t}\hat{x}_i$. Thus we have
 $\int_S (\nabla\times \vec{v})\cdot d\vec{A}=\int \vec{v}\cdot d\vec{\ell}$, the usual Stokes' theorem.}

\begin{p}%{97}
{Suppose that $S\subset \R^3$ is a 3-dimensional compact orientable submanifold with boundary. Show that Stokes's theorem aplied to $S$ is equivalent to Gauss's theorem, also known as the divergence theorem.}
\end{p}
{Let $\om=\alpha dx\wedge dy+\beta dz\wedge dx+\gamma dy\wedge dz$. Then $d\om=\partial_z \alpha dz\wedge dx\wedge dy+\partial_y \beta dy\wedge dz\wedge dx+\partial_x \gamma dx\wedge dy\wedge dz=(\partial_z\alpha+\partial_y\beta+\partial_x \gamma)dx\wedge dy\wedge dz$. Now $\int_{\partial M}\om=\int_M d\om$, the righthand side of which is simply $\int_S(\partial_z\alpha+\partial_y\beta+\partial_x \gamma) dxdydz$. If we define
$v\equiv\star\om=\alpha dz+\beta dy+\gamma dx$, then this integral is just $\int \partial_iv^i dxdydz$, i.e.~the integral of the gradient of the vector $\vec{v}$. Meanwhile,
consider a patch of $\partial S$ covered by coordinates $(s,t)$; that is, a specification of the points on $\partial S$: $x(s,t), y(s,t),$ and $z(s,t)$. Letting $dA=ds\wedge dt$ be the volume element on $\partial S$, then $dx\wedge dy=(\frac{\partial x}{\partial s}\frac{\partial y}{\partial t}-\frac{\partial x}{\partial t}\frac{\partial y}{\partial s})dA$, and similarly for the other 2-forms. Then the lefthand integrand can be written as $\vec{v}\cdot d\vec{A}$ where the vector $\vec{A}=
\epsilon_{ijk}\hat{x}_i(\frac{\partial x_j}{\partial s}\frac{\partial x_k}{\partial t})$.}

\begin{p}%{98}
{Show that the pullback of a closed form is closed and the pullback of an exact form is exact.}
\end{p}
{The pullback and exterior derivative commute, so if $\om$ is closed, $d\om=0$ and $\phi^*\om$ is also closed, since $d\phi^*\om=\phi^* (d\om)=0$.
Similarly, if $\om$ is exact, then so is $\phi^*\om$: $\phi^*\om=\phi^*(d\alpha)=d(\phi^*\alpha)$.}

\begin{p}%{99}
{Show that given any map $\phi:M\rightarrow M'$ there is a linear map
from $H^p(M')$ to $H^p(M)$ given by $[\om]\mapsto[\phi^*\om]$, where
$\om$ is any closed $p$-form on $M'$. Call this linear map $\phi^*:H^p(M')\rightarrow H^p(M)$. Show that if $\psi:M'\rightarrow M''$ is another map, then $(\psi\phi)^*=\phi^*\psi^*$.}
\end{p}
{The linear map is just the pullback:
since it preserves closed and exact forms, it preserves equivalence classes of closed forms. If
$\om,\om'$ are closed, so are $\phi^*\om$ and $\phi^*\om'$ and if $\om-\om'=d\mu$, then $\phi^*\om-\phi^*\om'=\phi^*d\mu=d\phi^*\mu$. And the pullback of the composition of maps is the reverse-ordered composition of pullbacks.}

\begin{p}%{100}
{Show that $\star j=f(r)r\,dr\wedge d\theta$ for $j=f(r)dz$ and $d\theta=\om$ as in exercise 80.}
\end{p}
{$\star j=f(r)\star dz=f(r)dx\wedge dy$. Now note that $r dr\wedge d\theta=(xdx+ydy)(xdy-ydx)/r^2=dx\wedge dy$ since $r dr=xdx+ydy$.}

\begin{p}%{101}
{Show that $\star d\theta=\frac{1}{r}dz\wedge dr$.}{$\star d\theta=(x\star dy-y\star dx)/r^2=(xdz\wedge dx-ydy\wedge dz)/r^2=(dz\wedge(xdx+ydy))/r^2=dz\wedge dr/r$.}
\end{p}

\begin{p}%{102}
{Check that $d\star B=\star j$ holds iff $g'(r)=rf(r)$ for $B=\frac{g(r)}{r} dz\wedge dr$.}
\end{p}
{$d\star B=d(g(r)d\theta)=g'(r)dr\wedge d\theta=\star j=rf(r)dr\wedge d\theta.$ Thus $g'(r)=rf(r)$ is necessary and sufficient.}

\begin{p}%{103}
Using the fact that the $n$-dimensional torus $T^n$ is the product of $n$ copies of $S^1$, construct $n$ closed but not exact $1$-forms $d\theta_1$, $d\theta_2$, \dots, $d\theta_n$. Hint: define maps $p_i:T^n\to S^1$ corresponding to projection down to the $i$th coordinate, where $1\leq i\leq n$, and let $d\theta_i=p_i^*d\theta$.
\end{p}
{Following the hint, what remains to show is that the $d\theta_1$ (for example) is a closed, non-exact 1-form on $T^n$. Recall from Exercise 80, the 1-form $d\theta$ on $S^1$ defined in cartesian coordiantes by $d\theta = \dfrac{xdy-ydx}{x^2+y^2}$. Integral over this 1-form  was shown to have different values on two different pathes on $S^1$; for a positive half circle $\gamma_0$, $\,\int_{\gamma_0}d\theta = \pi$, and for the negative half-circle, $\int_{\gamma_1}d\theta = -\pi$.
Now, consider a path $\gamma_0^T$ on the $n-$torus $T^n$ given by travelling the path $\gamma_0$ on the first $S_1$-component and keeping the others at zero:
$$
\gamma_0^T = \{\gamma_0, 0, ..., 0\}.
$$
From the definition of $d\theta_i=p_i^*d\theta$, $d\theta_1$ is a one-form defined on the projection of the torus on the 1-st $S^1$ component, so
$$
\int_{\gamma_i^T}d\theta_i = \int_{\gamma_i}d\theta, \qquad i=0,1.
$$
}
This transfers the fact $d\theta$ is not exact (different integral values) to the 1-forms on the torus.

\begin{p}%{104}
	In the space $\R\times S^2$ with the metric $g = dr^2+f(r)^2(d\phi^2+sin^2\phi d\theta^2)$ (see page 144 in the book for explanation), let $E$ be the 1-form $E = e(r)dr$. \\
Show that $dE=0$ holds no matter what the function $e(r)$ is, and show that $d\star E=0$ holds when
$$
e(r) = \dfrac{q}{4\pi f(r)^2}.
$$
\end{p}
First of all, we establish $dE=0$. This is true as long is $e$ is independent of $\phi$ or $\theta$:
$$ dE =  \partial_{\phi}e(r)d\phi+\partial_{\theta}e(r)d\theta = 0$$
Now, to compute $\star E$, notice that the volume form $vol$ in this metric is given by
$$ vol = \sqrt{det(g)}dr\wedge d\phi \wedge d\theta = f^2(r)sin\phi\, dr\wedge d\phi \wedge d\theta $$
(see p. 85 in the book). Another way to compute it is to find the normalized basis elements. For example, $g^{22} = g_{22}^{-1} = \dfrac{1}{f(r^2)}$. Then if we write $e_\phi = h\,d\phi$, with $h=h(r,\phi,\theta)$, we get
$$ 1 = <e_\phi,e_\phi> = \dfrac{h^2}{f^2(r)},$$
which implies
$$e_{\phi} = f(r)d\phi$$
Similarly,
$$ e_r = dr,\quad e_\theta = f(r)sin\phi \,d\theta,$$
and the volume element is
$$ vol = e_r\wedge e_\phi \wedge e_\theta,$$
which amounts to the expression above.\\
Now, denote $\star dr = u\,d\phi\wedge d\theta$. By definition of the Hodge star,
\begin{eqnarray}
\begin{aligned}
dr \wedge \star dr & =<dr ,dr >vol\\
u\, dr\wedge d\phi\wedge d\theta &= 1\cdot f^2(r)sin\phi\, dr\wedge d\phi \wedge d\theta\\
u &= f^2(r)sin\phi.
\end{aligned}
\end{eqnarray}
Thus
$$\star E = \dfrac{q}{4\pi f^2(r)}\,f^2(r)sin\phi\,d\phi\wedge d\theta = \dfrac{q\sin\phi}{4\pi}\,d\phi\wedge d\theta,
$$ and
\begin{eqnarray}
\begin{aligned}
d\star E &= \partial_r\left( \dfrac{q\sin\phi}{2\pi}\right) dr \wedge d\phi\wedge d\theta = 0.
\end{aligned}
\end{eqnarray}
Q.E.D.

\begin{p}%{105}
	Find a function $\phi$ with $E=-d\phi$
\end{p}
\begin{eqnarray}
\begin{aligned}
-d\phi &= \partial_r\phi\,dr+ \partial_\phi\phi\,d\phi+\partial_\theta\phi\,d\theta= \dfrac{q}{4\pi f^2(r)} dr,\\
\partial_r\phi &= -\dfrac{q}{4\pi f^2(r)}.
\end{aligned}
\end{eqnarray}
So, set $ \phi(r) = \dfrac{q}{4\pi f(r)}$ to satisfy this expression.

\begin{p}%{106}

	Let $S^2$ denote any of the 2-spheres of the form $\{r\}\times S^2\subset \R\times S^2$, equipped with the volume form $vol = r^2 sin\phi\, d\phi\wedge d\theta$ on $S^2$. Show that
	$$
	\int_{S^2}\star E =q
	$$
\end{p}
In exercise (104) we have computed
$$\star E = \dfrac{q\sin\phi}{4\pi}\,d\phi\wedge d\theta.$$
Therefore
\begin{eqnarray}
\begin{aligned}
\int_{S^2}\star E = \int_{S^2}\dfrac{q}{4\pi r^2}\,r^2 \sin\phi\,d\phi\wedge d\theta =\\
\dfrac{q}{4\pi r^2}\int_{S^2}vol = \dfrac{q}{4\pi r^2}4\pi r^2 = q.
\end{aligned}
\end{eqnarray}

\begin{p}
\end{p}

\begin{p}
\end{p}

\begin{p}
\end{p}

\begin{p}
\end{p}

\begin{p}%111
\end{p}