This document is one of More SageMath Tutorials. You may edit it on github. $$\def\NN{\mathbb{N}}$$ $$\def\ZZ{\mathbb{Z}}$$ $$\def\QQ{\mathbb{Q}}$$ $$\def\RR{\mathbb{R}}$$ $$\def\CC{\mathbb{C}}$$

# Demonstration: Origamis, torus coverings and combinatorics of permutations¶

TODO: move this demo to sage.dynamics.demo?

## Introduction¶

Studying geometric coverings from the viewpoint of permutations is a long story. Hurwitz [Hur1891] proved that the space of coverings of the sphere with prescribed simple ramifications is connected.

In Teichmüller theory, torus coverings play a central role. They were used to compute the volume of moduli space, provide explicit examples of Teichmüller curves, …

### References¶

 [EskMasSch03] A. Eskin and H. Masur and M. Schmoll, Billards in rectangles with barriers, Duke Math. J., (2003)
 [HubLel06] (1, 2) Hubert P. and Lelièvre S., Prime Arithmetic Teichmüller discs in $$\mathcal{H}(2)$$, Isr. J. Math., (2006)
 [Hur1891] Hurwitz A., Ueber Riemann’sche Flachen mit gegebenzen Verzweigungspunkten, Math. Ann, 39 (1891), 1-61.
 [LelRoy06] (1, 2) S. Lelièvre and E. Royer, Orbitwise countings in H(2) and quasimodular forms, IMRN (2006)
 [McMul05] (1, 2) C. T. McMullen, Teichmüller curves in genus two: Discriminant and spin, Math. Ann., 333, p. 87-130, (2005)
 [Sch05] G. Schmithuesen, Veech Groups of Origamis, PhD Thesis Karlsruhe (2005) http://www.math.kit.edu/iag3/~schmithuesen/en
 [Vee89] W. A. Veech, Teichmüller curves in moduli space, Eisenstein series and an application to triangular billiards , Inventiones Mathematicae, (1989)

## Three definitions¶

definition 1: An origami is a couple $$(r,u)$$ of permutations such that the group generated by $$r$$ and $$u$$ acts transitively.:

sage: o = Origami('(1,2)','(1,3)')
sage: o
(1,2)(3)
(1,3)(2)


Two origamis $$(r,u) \in S_n \times S_n$$ and $$(r',u') \in S_n \times S_n$$ are isomorphic if there exists a permutation $$\sigma \in S_n$$ such that

$r' = \sigma\ r\ \sigma^{-1} \quad \text{and} \quad u' = \sigma\ u\ \sigma^{-1}$

definition 2: An origami is a connected cover of the torus ramified over one point.

Two origamis $$\pi: X \rightarrow \mathbb{T}^2$$ and $$\pi': X' \rightarrow \mathbb{T}^2$$ are isomorphics if there exists an homeomorphism $$f: X \rightarrow X'$$ such that $$f \circ \pi' = \pi$$.:

sage: o = Origami('(1,2)','(1,3)')
sage: o.show()


Starting from the topological definition 2, we get two permutations by looking at the monodromy action. We have a third definition

definition 3: An origami is a subgroup of finite index of the free group $$F_2$$ generated by two elements. Two origamis $$H \subset F_2$$ and $$H' \subset F_2$$ are isomorphic if they are conjugate in $$F_2$$.

Exercise: the three definitions and isomorphisms are equivalent.

## Primitive and reduced origamis¶

An origami is primitive, if either of the following equivalent statements holds:
• the group generated by the permutations $$r$$ and $$u$$ is primitive (there is no non trivial block),
• there is no intermediate cover $$\pi: X \rightarrow \mathbb{T}^2$$,
• the subgroup $$H \subset F_2$$ is maximal.

An origami $$\pi: X \rightarrow \mathbb{T}^2$$ is reduced if there is no intermediate cover over a bigger torus which is also ramified over one point.

A primitive origami is reduced.

The escalators are always cover of a torus with two squares:

sage: esc3 = origamis.escalator(3)
sage: esc3.show()

sage: esc3.is_primitive()
False


but are ramified over two points above this $$2$$-torus, assuming they have at least $$3$$ steps:

sage: esc3 = origamis.escalator(3)

sage: esc3.is_reduced()
True


Here is an example of an origami called a L-shaped origami:

sage: o = Origami('(1,2,3)','(1,4)')
sage: o.show()

sage: o.is_primitive()
True


Any non-reduced origami is, in a unique way, the composition of a reduced origami and an isogeny (Not yet implemented). The maximal torus above which the reduced origami is defined as a ramified cover over one point is obtained from the lattice of periods:

sage: o=Origami('(1,2,3)(4,5,6)','(1,4,7,8)(2,5)(3,6)')
sage: o.is_reduced()
False
sage: o.lattice_of_periods()
(1, 0, 2)


## $$SL(2,\ZZ)$$ action and Veech group of an origami¶

The group $$SL(2,\ZZ)$$ acts on isomorphism classes of origamis. The standard form $$dz$$ on the torus gives a canonical flat structures to any origami. The group $$SL(2,\RR)$$ acts on flat surfaces.

$\begin{split}S = \left(\begin{array}{cc}0&-1\\1&0\end{array}\right) \qquad L = \left(\begin{array}{cc}1&1\\0&1\end{array}\right) \qquad R = \left(\begin{array}{cc}1&0\\1&1\end{array}\right) \qquad V = \left(\begin{array}{cc}-1&0\\0&1\end{array}\right)\end{split}$

The matrices act as follows on permutations (beware that you must consider origamis up to conjugacy):

• $$S \cdot (r,u) = (r^{-1}, u)$$ (rotation by $$\pi/2$$)
• $$L \cdot (r,u) = (r, u\ r^{-1}))$$ (horizontal twist)
• $$R \cdot (r,u) = (r\ u^{-1}, u)$$ (vertical twist)
• $$V \cdot (r,u) = (r^{-1}, u)$$ (reflection wrt vertical axis)
• $$H \cdot (r,u) = (r, u^{-1})$$ (reflection wrt horizontal axis)

The subgroup of $$SL(2,\ZZ)$$ that fixes an origami is called the Veech of this origami. As an example, all escalators have Veech group the Theta group:

sage: origamis.escalator(3).veech_group()
Arithmetic subgroup corresponding to permutations
S=(2,3)
T=(1,2,3)
L=(1,2)
R=(1,3)
sage: origamis.escalator(4).veech_group()
Arithmetic subgroup corresponding to permutations
S=(2,3)
T=(1,2,3)
L=(1,2)
R=(1,3)
sage: origamis.escalator(5).veech_group()
Arithmetic subgroup corresponding to permutations
S=(2,3)
T=(1,2,3)
L=(1,2)
R=(1,3)


The Teichmüller curve of an origami is isometric to the quotient $$SL(2,\ZZ) / \Gamma$$ where $$\Gamma$$ is the Veech group.

The eierlegende Wollmilchsau has Veech group the full modular group $$SL(2,\ZZ)$$:

sage: e = origamis.eierlegende_wollmilchsau()
sage: e
(1,2,3,4)(5,6,7,8)
(1,5,3,7)(2,8,4,6)
sage: e.veech_group()
Arithmetic subgroup corresponding to permutations
S=()
T=()
L=()
R=()


Schmithüesen in her thesis [Sch05] wrote an algorithm to compute the Veech group of an origami based on Rademacher-Schreier algorithm. Her algorithm is implemented in Sage.

## Hubert, Lelièvre, McMullen classification in $$\mathcal{H}(2)$$¶

Hubert, Lelièvre [HubLel06] and McMullen [McMul05] gives a classification of orbits of origamis in $$\mathcal{H}(2)$$ under the action of $$SL(2,\ZZ)$$. A stratum $$\mathcal{H}(\kappa_1,\ldots,\kappa_l)$$ of moduli space is the set of flat surfaces with given singularity degrees $$\kappa_1, \ldots, \kappa_l$$. In the context of origamis, it corresponds to the conjugacy class, as an integer partition, of the commutator $$r\,u\,r^{-1}\,u^{-1}$$ of the permutations $$r$$ and $$u$$ that define the origami. The stratum $$\mathcal{H}(2)$$ corresponds to the integer partitions $$(3,1^k)$$ where $$k$$ is an integer.

Any origami can be decomposed into horizontal cylinders. These cylinders are bounded by horizontal saddle connections (horizontal geodesics connecting singularities). The combinatorics of gluings of these cylinders along saddle connections is known as a cylinder diagram. Algebraically, it corresponds to a pair $$(bot,top)$$ of permutations with the same number of cycles in their cycle decompositions and a pairing of cycles of $$bot$$ with cycles of $$top$$.

There are only two cylinder diagrams in $$\mathcal{H}(2)$$ which can be built as follows:

sage: a = AbelianStratum(2)
sage: cyls = a.cylinder_diagrams()
sage: c0, c1 = cyls
sage: c0
Cylinder diagram (0,1)-(1,2) (2)-(0)
sage: c1
Cylinder diagram (0,1,2)-(0,1,2)


The origamis in $$\mathcal{H}(2)$$ can then be generated using those two cylinder diagrams by specifying the lengths of each separatrix, the height of each cylinder and an (optionnal) twist paramater:

sage: c0,c1 = AbelianStratum(2).cylinder_diagrams()

sage: o = c0.cylcoord_to_origami([1,1,1],[1,1])
sage: o
(1,2)(3)
(1,3)(2)
sage: o.stratum()
H(2)
sage: o = c1.cylcoord_to_origami([2,3,1],[1])
sage: o
(1,2,3,4,5,6)
(1,6,2,3,4,5)
sage: o.stratum()
H(2)


theorem ([HubLel06], [McMul05]): Let $$E_n$$ be the set of primitive origamis in $$\mathcal{H}(2)$$ with $$n$$ squares. If $$n = 3$$ or $$n$$ even, then $$E_n$$ is an $$SL(2,\ZZ)$$ orbit. If $$n \geq 5$$ and odd, then $$E_n$$ is a union of two $$SL(2,\ZZ)$$ orbits $$A_n$$ and $$B_n$$ which can be distinguished by the number of integer Weierstrass points.

The method .orientation_cover_list returns the stratum of Quadratic differential which corresponds to the cover together with the Weierstrass points partition which consist in the number of integer Weierstrass points of the cover and the triple of half-integers points.

sage: c0,c1 = AbelianStratum(2).cylinder_diagrams()

sage: o5a = c0.cylcoord_to_origami([1,2,1],[1,2])
sage: o5a.orientation_cover_list()
[(Q(1, -1^5), (3, (1, 1, 1)))]
sage: o5a.veech_group().index()
9

sage: o5b = c0.cylcoord_to_origami([1,3,1],[1,1])
sage: o5b.orientation_cover_list()
[(Q(1, -1^5), (1, (3, 1, 1)))]
sage: o5b.veech_group().index()
18


We now prove that we have everything:

sage: c0,c1 = AbelianStratum(2).cylinder_diagrams()

sage: l0 = set(map(lambda x: x.standard_form(),c0.origami_iterator(5)))
sage: len(l0)
17
sage: l1 = set(map(lambda x: x.standard_form(),c1.origami_iterator(5)))
sage: len(l1)
10

sage: 18 + 9 == 17 + 10
True


theorem ([EskMasSch03], [LelRoy06]): Let $$e_n$$, $$a_n$$ and $$b_n$$ denote the cardinalities of $$E_n$$, $$A_n$$ and $$B_n$$. Then

$e_n = \frac{3 n (n-2)}{8} \prod_{p|n} \left(1 - \frac{1}{p^2} \right) \quad a_n = \frac{3 n (n-1)}{16} \prod_{p|n} \left(1 - \frac{1}{p^2} \right) \quad b_n = \frac{3 n (n-3)}{16} \prod_{p|n} \left(1 - \frac{1}{p^2} \right)$

These numbers are related to coefficients of quasimodular forms (see [LelRoy06]).:

sage: e_n = lambda n: 3*n**2*(n-2)/8*prod(1-1/p**2 for p in prime_factors(n))
sage: a_n = lambda n: 3*n**2*(n-1)/16*prod(1-1/p**2 for p in prime_factors(n))
sage: b_n = lambda n: 3*n**2*(n-3)/16*prod(1-1/p**2 for p in prime_factors(n))

sage: a_n(5)
18
sage: b_n(5)
9
sage: e_n(5)
27

sage: c0,c1 = AbelianStratum(2).cylinder_diagrams()

sage: l0 = set(map(lambda x: x.standard_form(), c0.origami_iterator(7)))
sage: l1 = set(map(lambda x: x.standard_form(), c1.origami_iterator(7)))
sage: len(l0) + len(l1)
90

sage: c0,c1 = AbelianStratum(2).cylinder_diagrams()

sage: o7a = c0.cylcoord_to_origami([1,4,1],[1,2])
sage: o7a.orientation_cover_list()
[(Q(1, -1^5), (3, (1, 1, 1)))]
sage: o7a.veech_group().index()
36

sage: o7b = c0.cylcoord_to_origami([1,5,1],[1,1])
sage: o7b.orientation_cover_list()
[(Q(1, -1^5), (1, (3, 1, 1)))]
sage: o7b.veech_group().index()
54