# Doubly periodic functions

This is somewhat a continuation of How (not) to get into isogenies. The reason for the word "not" in the title is that when working with isogeny-based cryptographic protocols, you typically don’t encounter the following theorems. However, they are of great importance and form the basis for complex multiplication. They are also necessary for understanding the background of the theta model in higher-dimensional elliptic curves.

## Excursion into topology

As with complex analysis last time, I will now try to refresh my knowledge of topology and intuitively understand some basic results.

**Definition:**A topological space is compact if every open covering has a finite sub-covering.

**Theorem:**

A compact subset of $\mathbb{C}^n$ with its usual metric is closed and bounded.

The topology of $\mathbb{C}$ is the same as that of $\mathbb{R}^2,$ so the above theorem holds for $\mathbb{C}$ as well.

**Definition:**

A function $f: X \rightarrow Y$ is continuous if the inverse image of every open subset of $Y$ is open in $X.$

It might not seem so at first glance, but the above definition is a generalization of the notion that continuous functions are those without abrupt changes in value.

**Theorem:**

If function $f: X \rightarrow Y$ is continuous it maps compact sets to compact sets.

## Doubly periodic functions and some of their properties

Let $w_1, w_2$ be complex numbers that are linearly independent over R. Then

$L = \mathbb{Z}w_1 + \mathbb{Z}w_2 = \{n_1w_1 + n_2w_2 | n_1, n_2 \in \mathbb{Z}\}$

is called a lattice.

The set

$F = \{aw_1 + aw_2 | 0 \leq a_i < 1, i = 1, 2\}$

is called a fundamental parallelogram for $L.$

Note that $\mathbb{C}/Z$ is a torus—we can visualize it by taking a fundamental parallelogram and "gluing" the bottom to the top and the left to the right.

**Definition:**

A doubly periodic function is meromorphic function $f: C \rightarrow C \cup \infty$ such that

$f(z + w) = f(z)$

for all $z \in \mathbb{C}$ and all $w \in L.$

If $f$ is a meromorphic functions and $w \in \mathbb{C}$, we can write $f$ using a Laurent series:

$f(z) = a_r (z - w)^r + a_{r+1} (z-w)^{r+1} + ...$

The order and the residue of $f$ at $w$ are defined as follows:

$r = ord_w(f)$

$a_{-1} = Res_w(f)$

In what follows, $f$ is a doubly periodic function for the lattice $L$, and $F$ is a fundamental parallelogram for $L.$

I haven’t closely examined what a meromorphic function is, but I decided I can work with the following notion:

A meromorphic function is a function $f(z)$ of the form $f(z) = g(z) / h(z)$, where $g(z)$ and $h(z)$ are entire functions (holomorphic on the whole complex plane) and $h(z)$ is not identically zero.

I will be lazy once more and simply believe that meromorphic functions can only have a finite number of zeros and poles in a compact set.

Note that the closure of $F$ is a compact set. Thus, $f$ has only a finite number of zeros and poles in $F.$

### If f has no poles, then f is constant

If $f$ has no poles, then it’s bounded in the closure of $F.$ Because $f$ is doubly periodic, it maps to the same values inside and outside of $F,$ so it’s bounded everywhere.

It follows from Liouville’s theorem that $f$ is constant.

### Sum of residues

It holds:

$\sum_{w\in F} Res_w(f) = 0$

First, it should be noted that the sum has only finitely many nonzero terms. This is because a nonzero term occurs only when there is a zero or a pole.

Let’s recall Cauchy’s theorem:

$\sum_{z_0 \in F} Res_{z_0}(f) = \frac{1}{2\pi i} \int\limits_{\partial F}f(z)dz$

where $\partial F$ is the boundary of $F.$

$\int\limits_{\partial F}f(z)dz = \int_0^{w_2} f(z)dz + \int_{w_2}^{w_1+w_2} f(z)dz + \int_{w_1+w_2}^{w_1} f(z)dz + \int_{w_1}^0 f(z)dz$

Note that $f(z + w) = f(z).$ Thus:

$\int_0^{w_2} f(z)dz = \int_0^{w_2} f(z+w_1)dz = \int_{w_1}^{w_1+w_2} f(z)dz = -\int_{w_1+w_2}^{w_1} f(z)dz$

We can see that the four integrals cancel each other out.

### Sum of orders

$\sum_{w\in F} ord_w(f) = 0$

I can’t help but be surprised again. It seems strange that you can sum orders and get 0. Summing coefficients (residues) and obtaining 0 feels slightly more intuitive to me, though I'm not sure why. The order probably seems too related to how the poles and zeros behave individually; I have difficulty grasping why you could sum orders and arrive at such a significant formula. I suppose my intuition is just lacking, as I haven’t done much of this kind of math.

But it feels like it might have something to do with derivatives (I say this after having seen the proof).

We can write $f(z)$ as

$f(z) = (z-w)^r g(z)$

where $w$ is neither a zero or pole of $g(z).$

Now:

$f'(z) = r(z-w)^{r-1} g(z) + (z-w)^r g'(z)$

And:

$f'(z)/f(z) = \frac{r}{z-w} + g'(z)/g(z)$

We can see:

$Res_w(f'(z)/f(z)) = r$

This is true because $g'(z)/g(z)$ doesn’t have a pole at $w.$

Now, $\frac{f'}{f}$ is also doubly periodic, and we know from the previous section that:

$\sum_{w\in F} Res_w(\frac{f'}{f}) = 0$

It holds $Res_w\frac{f'}{f} = ord_w(f)$, so we have proved the result.

### Weighted sum of orders

If $f$ is not identically zero:

$\sum_{w\in F} w \cdot ord_w(f) \in L$

I am not going to fully dive into this one, but I can see:

$\sum_{w\in F} w \cdot ord_w(f) = \sum_{w\in F} w \cdot Res_w(\frac{f'}{f})$

$= \sum_{w\in F} \cdot Res_w(z\frac{f'}{f})$

The last step follows from observing:

$Res_w(zf'(z)/f(z)) = Res_w(z(\frac{r}{z-w} + g'(z)/g(z)))$

$= Res_w((z-w + w)(\frac{r}{z-w} + g'(z)/g(z)))$

$= Res_w(r + (z-w) g'(z)/g(z) + w(\frac{r}{z-w} + g'(z)/g(z)))$

$= Res_w(w(\frac{r}{z-w} + g'(z)/g(z)))$

$= w\cdot Res_w(\frac{r}{z-w} + g'(z)/g(z))$

$= w\cdot ord_w(f)$

So:

$\sum_{w\in F} w \cdot ord_w(f) = \sum_{w\in F} \cdot Res_w(z\frac{f'}{f})$

$= \frac{1}{2\pi i} \int\limits_{\partial F}z\frac{f'}{f}dz$

It appears that the proof can be finished quite easily if you know what a winding number is. Intuitively, it’s easy to understand the winding number—it’s the number of times that the curve $\gamma$ passes (counterclockwise) around a point. However, I wanted to understand why it’s given by the following formula:

$n(\gamma, z_0) = \frac{1}{2\pi i} \int\limits_{\gamma}\frac{dz}{z-z_0}$

But I have decided to leave this for another time. I will try to continue toward isogenies now.

### Surjectivity

If $f$ is not constant, then $f: \mathbb{C} \rightarrow \mathbb{C} \cup \infty$ is surjective.

Let’s observe if there is a solution for $f(z) = z_0.$

Remember from above that a non-constant function has poles. Now, $h(z) = f(z) - z_0$ is doubly periodic and has the same poles as $f.$

From

$\sum_{w\in F} ord_w(h) = 0$

we know if there are poles, there are zeros too.