# Fano 3-folds

This section describes intrinsics that construct Fano $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 Suzuki’s Riemann–Roch formula [[Suzuki, n.d.](../../references.md#cite-suz)] for polarised Fano $3$-folds with terminal singularities.

## `Example: Gr Fano (ex-109f4a)`

We make two Fano 3-folds having the same basket but different genus.

```magma
> X := Fano(2,MakeBasket([[3,1,2,2]]),2);
> X;
Fano 3-fold X,A of Fano index 2, Fano genus 2, in codimension 1 with data
  Weights: [ 1, 1, 2, 3, 5 ]
  Basket: 1/3(1,2,2)
  Degrees: A^3 = 1/3,   (1/12)Ac_2(X) = 8/9
  Numerator: -t^10 + 1
> FanoGenus(X);
2
> FanoBaseGenus(X);
2
> Fano(2,MakeBasket([[3,1,2,2]]),3);
Fano 3-fold X,A of Fano index 2, Fano genus 3, in codimension 2 with data
  Weights: [ 1, 1, 1, 2, 2, 3 ]
  Basket: 1/3(1,2,2)
  Degrees: A^3 = 4/3,   (1/12)Ac_2(X) = 8/9
  Numerator: t^8 - 2*t^4 + 1

```

In this example, the smallest possible genus—the Fano base genus—is 2, and an error will be reported if a smaller value is requested.

Note that the singularities used must be polarised by $fA$, where $f$ is the Fano index: in practice, this means their index $r$ must be coprime to $f$ and their weights must be of the form $f,a,r-a$.

## Creation: $f=1,2$ or $\ge 3$

### `Fano(f, B, g): RngIntElt, GRBskt, RngIntElt -> GRFano`

A Fano 3-fold with Fano index $f\ge 1$, Fano genus $g\ge 0$ and basket of singularities $B$. The singularities must be terminal singularities. The basket can also be presented in raw sequence format: in this case, $B$ is a sequence containing terms such as $[r,a,b,c]$ which denotes the singularity ${{1}\over{r}}(a,b,c)$.

### `Fano(f, B): RngIntElt, GRBskt -> GRFano`

A Fano $3$-fold with Fano index $f\ge 3$ and basket of singularities $B$. The singularities must be terminal singularities. The basket can also be presented in raw sequence format: in this case, $B$ is a sequence containing terms such as $[r,a,b,c]$ which denotes the singularity ${{1}\over{r}}(a,b,c)$.

### `FanoIndex(X): GRFano -> RngIntElt`

The Fano index $f$ of the Fano $3$-fold $X$.

### `FanoGenus(X): GRFano -> RngIntElt`

The Fano genus of the Fano $3$-fold $X$, an integer $\ge 0$ equal to the dimension of the space of sections of the polarising divisor. (The term *genus* often refers to two less that this number).

### `FanoBaseGenus(X): GRFano -> RngIntElt`

The smallest possible value for the Fano genus of the Fano $3$-fold $X$.

### `BogomolovNumber(X): GRFano -> FldRatElt`

The intersection number $A(c_1(X)^2 - 3c_2(X))$ for the polarised Fano $3$-fold $X,A$.

### `IsBogomolovUnstable(X): GRFano -> BoolElt`

Return `true` if and only if the Bogomolov number $A(c_1(X)^2 - 3c_2(X))$ for the polarised Fano $3$-fold $X,A$ is strictly positive.

## A Preliminary Fano Database

### `FanoDatabase() -> DB`

The database of Fano $3$-folds.

### `Fano(D, i): DB, RngIntElt -> GRFano`

The $i$th Fano $3$-fold in the Fano database $D$.

### `Fano(D, f, i): DB, RngIntElt, RngIntElt -> GRFano`

The $i$th Fano $3$-fold in the Fano database $D$ that has Fano index $f$.

### `Fano(D, f, Q, i): DB, SeqEnum, RngIntElt -> GRFano`

The $i$th Fano $3$-fold in the Fano database $D$ that has Fano index $f$ and initial plurigenera as specified by the sequence $Q$ (up to the first four plurigenera).
