# Calabi–Yau 3-folds

This section describes intrinsics that construct Calabi–Yau $3$-folds. It also describes a few intrinsics that can be used to study them, but see Section [Generic Polarised Varieties](pol-var.md#sec-generic) for the general intrinsics that apply to all polarised varieties.

The calculations are based on Buckley’s Riemann–Roch formula [[Buckley, 2003](../../references.md#cite-buc)] for polarised Calabi–Yau $3$-folds with canonical singularities.

## `CalabiYau(p1, p2, B): RngIntElt, RngIntElt, GRBskt -> GRCY`

The Calabi–Yau $3$-fold $X,A$ with $h^0(X,A)=p_1$, $h^0(X,2A)=p_2$ and basket of singularities $B$.

## `FindN(X): GRCY -> RngIntElt, RngIntElt`

```magma
MaximumN: RngIntElt                    Default: 100
```

The first nonnegative value, for the Calabi–Yau $3$-fold $X$, of $N_{C_i}$ (where $C_i$ is the $i$th curve of the basket of $X$) together with the distance between successive values of $N_{C_i}$. (The pair $0,0$ is returned if no solutions below the parameter `MaximumN` are found).

## `FindN(p1, p2, B): RngIntElt, RngIntElt, GRBskt -> RngIntElt, RngIntElt`

```magma
MaximumN: RngIntElt                    Default: 100
```

The first nonnegative value of $N_{C_i}$ (where $C_i$ is the $i$th curve of the basket $B$ of $3$-fold points and curves and $p_1$, $p_2$ are the first two genera) together with the distance between successive values of $N_{C_i}$. (The pair $0,0$ is returned if no solutions below the parameter `MaximumN` are found).
