CoCalc’s goal is to provide the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual use to large groups and classes.

CoCalc’s goal is to provide the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual use to large groups and classes.

A tutorial for the software package admcycles for SageMath.

**Views:**

^{895}

**Visibility:**Unlisted (only visible to those who know the link)

**Kernel:**SageMath 9.2

# admcycles Tutorial

Below we show how to use `admcycles`

for computations in the tautological ring of the moduli space $\overline{\mathcal{M}}_{g,n}$ of stable curves. More detailed explanations are available in the preprint [Delecroix-Schmitt-vanZelm].

If you opened this document on share.cocalc.com, you can open an interactive copy by clicking the button `Open in CoCalc with one click`

above. Then you can execute commands and do calculations below by clicking on a box containing code (such as `from admcycles import *`

below) and pressing `Shift + Enter`

. Note that many commands rely on earlier lines having been executed before, in particular the first line `from admcycles import *`

should be executed once at the start.

To insert a new box for writing own commands, you can choose `Insert -> Insert cell below`

in the menu above or click left of the text of a box and press `b`

.

To use `admcycles`

, the first thing you need to do is import it:

Then many functions become available. For example you can enter tautological classes as combinations of divisors (here on $\overline{\mathcal{M}}_{3,4}$):

Above, the function `sepbdiv(g1,A1,g,n)`

returns the class of a boundary divisor, the pushforward of the fundamental class under the gluing map $\overline{\mathcal{M}}_{g_1, A_1 \cup \{\bullet\}} \times
\overline{\mathcal{M}}_{g-g_1, A_1^c \cup \{\bullet\}} \to
\overline{\mathcal{M}}_{g, n}$, and `psiclass(i,g,n)`

returns $\psi_i$ on $\overline{\mathcal{M}}_{g,n}$. To avoid having to type g,n in long formulas, we can use `reset_g_n(g,n)`

to set them once:

To get explanations about a function, you can type the name of the function followed by a question mark. E.g. type `irrbdiv?`

below and press `Shift+Enter`

to see the documentation of this function:

## Tautological classes

### Creating tautological classes

One way to enter a tautological class is to first use the function `list_tautgens(g,n,r)`

to print a list of generators of $\mathrm{RH}^{2r}(\overline{\mathcal{M}}_{g,n})$ :

Generators are given by a stable graph, decorated with a monomial in $\kappa$ and $\psi$-classes (see below for an explanation of the representation of stable graphs). One can create a list `L`

of the generators we printed above using `tautgens(g,n,r)`

and compute linear combinations of the elements `L[i]`

of this list:

Stable graphs are represented by three lists:

a list

`genera`

of the genera $g_i$ of the vertices,a list

`legs`

of lists of legs and half-edges at these vertices,a list

`edges`

of pairs`(h1,h2)`

of half-edges forming an edge.

A stable graph can be created manually using `StableGraph(genera,legs,edges)`

by specifying these three lists. Below we create a stable graph with two vertices of genus 1, carrying half-edges 2,3 which form an edge:

### Basic operations

Tautological classes can be manipulated using standard arithmetic operations:

They can also be pushed forward under forgetful morphisms, by specifying the list of markings that are forgotten. As an example, we push forward `s_1`

, the class $\psi_3^2$ on $\overline{\mathcal{M}}_{1,3}$, under the map forgetting marking $3$, obtaining the class $\kappa_1$ on $\overline{\mathcal{M}}_{1,2}$ as expected:

Similarly, we can pull back the class $\psi_2$ on $\overline{\mathcal{M}}_{1,2}$ :

Given a tautological class `t`

, the function `t.evaluate()`

computes the integral of `t`

against the fundamental class of $\overline{\mathcal{M}}_{g,n}$, i.e. the degree of the zero-cycle part of `t`

. Below we compute the intersection number $\int_{\overline{\mathcal{M}}_{1,3}} \psi_2 \psi_3^2$ We check the equality

predicted by the String equation:

Using `simplify()`

to reduce number of terms in tautclass:

### A basis of the tautological ring and tautological relations

The package can compute the generalized Faber-Zagier relations between the generators above. The function `generating_indices(g,n,r)`

computes a list of indices of `tautgens(g,n,r)`

forming a basis of $\mathrm{RH}^{2r}(\overline{\mathcal{M}}_{g,n})$ :

Then, the function `toTautbasis(g,n,r)`

can be used to express a tautological class in this basis:

This means that the class `t3`

we defined above as the linear combination `t3=2*L[3]+L[4]`

can be expressed as `t3=-48*L[0]+22*L[1]`

in terms of the basis `L[0],L[1]`

of $\mathrm{RH}^{4}(\overline{\mathcal{M}}_{2,0})$.

We can also use the function `is_zero`

to check a tautological relation. Below, we verify the divisor relation $\kappa - \psi + \delta_0 = 0$ on $\overline{\mathcal{M}}_{1,4}$ :

Comparing classes on open subsets of $\overline{\mathcal{M}}_{1,4}$ using parameter `moduli`

to be one of `'st'`

, `'tl'`

, `'ct'`

, `'rt'`

or `'sm'`

:

### Pulling back tautological classes to a boundary divisor

Below we create a stable graph `bdry`

and compute a pullback of a tautological class under the corresponding boundary gluing map. The result is expressed in terms of a basis of the tautological ring on $\overline{\mathcal{M}}_{2,1} \times \overline{\mathcal{M}}_{2,1}$ :

We can see that in the Kunneth decomposition of $\mathrm{H}^4(\overline{\mathcal{M}}_{2,1} \times \overline{\mathcal{M}}_{2,1})$ the pullback has no component along $\mathrm{H}^2(\overline{\mathcal{M}}_{2,1}) \otimes \mathrm{H}^2(\overline{\mathcal{M}}_{2,1})$ and the contributions to $\mathrm{H}^0(\overline{\mathcal{M}}_{2,1}) \otimes \mathrm{H}^4(\overline{\mathcal{M}}_{2,1})$ and $\mathrm{H}^4(\overline{\mathcal{M}}_{2,1}) \otimes \mathrm{H}^0(\overline{\mathcal{M}}_{2,1})$ are symmetric, as expected.

### Pushing forward classes from the boundary

We can also compute the pushforward of the product of classes under a boundary gluing map:

si1 is obtained by pushing forward the fundamental class on the genus 2 vertex times $-\psi_h$ on the second vertex (where $h$ is the half-edge). We can then check the self-intersection formula for the boundary divisor above:

## Special cycle classes

### Double ramification cycles

Double ramification cycles are computed by the function `DR_cycle(g,A)`

. Below we verify a multiplicativity relation between DR-cycles from the paper [Holmes-Pixton-Schmitt]:

Calculating DR-cycles as classes with polynomial coefficients in the input:

Checking intersection numbers of DR-cycles with lambdaclass from [Buryak-Rossi]:

### Strata of k-differentials

Strata of k-differentials using `Strataclass(g,k,mu)`

with `mu`

vector of zero and pole multiplicities:

### Generalized lambda classes

Computing Chern classes of $R \pi_* \mathcal{O}(D)$ for the universal curve $\mathcal{C}_{g,n} \to \overline{\mathcal{M}}_{g,n}$ using `generalized_lambda`

:

### Admissible cover cycles

#### Hyperelliptic and bielliptic cycles

Computing the cycle of the hyperelliptic locus in genus 3:

The cycle of hyperelliptic curves of genus 3 with 0 marked fixed points of the involution and 0 marked pairs of conjugate points:

We compare with the known expression $H=9 \cdot \lambda_1-\delta_0-3\cdot \delta_1$ :

#### Creating and identifying general admissible cover cycles

Below we define the group $G=\mathbb{Z}/2\mathbb{Z}$ and ramification data `H`

, specifying that we look at double covers with two points of stabilizer `G[1]`

, which is the generator of the group $G$ :

An example with this ramification behaviour is the locus of bielliptic curves $(C,p,q)$ in $\overline{\mathcal{M}}_{2,2}$ of genus 2 curves $C$ admitting a double cover of an elliptic curve with marked ramification points $p,q$ . The following identifies the class of this locus in terms of the generating set `tautgens(2,2,3)`

of $\mathrm{RH}^6(\overline{\mathcal{M}}_{2,2})$ :

If instead we wanted to specify a locus with two points of generator `G[1]`

and one pair of points with generator `G[0]`

, we would consider:

We can also identify the pushforward of the locus of bielliptic curves $(C,p,q)$ under the map forgetting both markings, obtaining (a multiple of) the locus of bielliptic curves $C$ inside $\overline{\mathcal{M}}_{2,0}$. For this we use the optional parameter `markings`

to specify that no marking should be remembered:

We can compare this to a known formula $[\overline{B}_2] = 3/2
\delta_{\text{irr}} + 3 \delta_1$. When entering this, note that `irrbdiv`

returns two times the class $\delta_{\text{irr}}$ since in general the convention is not to divide by automorphisms of stable graphs:

### Example: Hurwitz-Hodge integrals

Computing the Hurwitz-Hodge integral $\int_{\overline{B}_{2,2,0}} \lambda_2$ :

Computing Hurwitz-Hodge integral of cyclic triple covers of genus 0 curves against $\lambda_1$, see [Owens-Somerstep]:

## Citing `admcycles`

If you use `admcycles`

in your research, consider citing the preprint [Delecroix-Schmitt-vanZelm].