---
title: "Calabi–Yau 3-folds"
canonical: "https://docs.magma-maths.org/v2.30-1/AlgebraicGeometry/HilbertSeriesOfPolarisedVarieties/cy.html"
source: "https://docs.magma-maths.org/v2.30-1/AlgebraicGeometry/HilbertSeriesOfPolarisedVarieties/cy.md"
part: "Algebraic Geometry"
chapter: "Hilbert Series of Polarised Varieties"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Algebraic Geometry", "source": "https://docs.magma-maths.org/v2.30-1/AlgebraicGeometry/index-algebraic-geometry.md"}
  - {"title": "Hilbert Series of Polarised Varieties", "source": "https://docs.magma-maths.org/v2.30-1/AlgebraicGeometry/HilbertSeriesOfPolarisedVarieties/index-hilbert-series-of-polarised-varieties.md"}
prev: {"title": "Fano 3-folds", "source": "https://docs.magma-maths.org/v2.30-1/AlgebraicGeometry/HilbertSeriesOfPolarisedVarieties/fano.md"}
next: {"title": "Building Databases", "source": "https://docs.magma-maths.org/v2.30-1/AlgebraicGeometry/HilbertSeriesOfPolarisedVarieties/gr-makedb.md"}
intrinsics:
  - {"name": "CalabiYau", "signature": "CalabiYau(p1, p2, B): RngIntElt, RngIntElt, GRBskt -> GRCY"}
  - {"name": "FindN", "signature": "FindN(X): GRCY -> RngIntElt, RngIntElt"}
  - {"name": "FindN", "signature": "FindN(p1, p2, B): RngIntElt, RngIntElt, GRBskt -> RngIntElt, RngIntElt"}
---

<a id="calabi-yau-3-folds"></a>
<a id="cy"></a>
<a id="sec-cy"></a>
# 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](https://docs.magma-maths.org/v2.30-1/AlgebraicGeometry/HilbertSeriesOfPolarisedVarieties/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 [[Buc03](https://docs.magma-maths.org/v2.30-1/references.md#cite-buc)] for polarised Calabi–Yau $3$-folds with canonical singularities.

<a id="function-calabiyau-rngintelt-rngintelt-grbskt"></a>
## `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$.

<a id="function-findn-grcy"></a>
## `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).

<a id="function-findn-rngintelt-rngintelt-grbskt"></a>
## `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).
