# Creation of Genus One Models

## `GenusOneModel(seq): [ RngElt ] -> ModelG1`

## `GenusOneModel(n, seq): RngIntElt, [ RngElt ] -> ModelG1`

## `GenusOneModel(R, n, seq): RngIntElt, [ RngElt ] -> ModelG1`

## `GenusOneModel(n, str): RngIntElt, MonStgElt -> ModelG1`

The genus one model of degree $n$ (where $n$ is 2, 3, 4, or 5) determined by the coefficients in the given sequence or string. The coefficients may belong to any ring.

A sequence $[a,b,c,d,e]$ of length 5 is interpreted as the degree 2 model $ax^4+bx^3z+cx^2z^2+dxz^3+ez^4$. A sequence $[f,g,h,a,b,c,d,e]$ of length 8 is interpreted as the degree 2 model $y^2+y(fx^2+gxz+hz^2)-(ax^4+bx^3z+cx^2z^2+dxz^3+ez^4)$.

A sequence $[a,b,c,d,e,f,g,h,i,j]$ of length 10 is interpreted as the degree 3 model $ax^3+by^3+cz^3+dx^2y+ex^2z+fy^2x+gy^2z+hz^2x+iz^2y+jxyz$.

Sequences of lengths 20 or 50 are interpreted as models of degree 4 or 5 respectively; however, it is easier to create these by specifying matrices instead (see below).

The sequence of coefficients can be recovered by calling `Eltseq`.

## `GenusOneModel(C): Crv -> ModelG1`

A genus one model that represents the given curve $C$.

For degree 2, $C$ should either be a subscheme of a weighted projective space ${\mathbb{P}}(1,1,2)$, or a hyperelliptic curve. For degrees $n=3$, 4, or 5, $C$ should be a genus one normal curve of degree $n$; in other words, a plane cubic for $n=3$, an intersection of two quadrics in ${\mathbb{P}}^3$ for $n=4$, or an intersection of five quadrics in ${\mathbb{P}}^4$ for $n=5$.

## `GenusOneModel(f): RngMPolElt -> ModelG1`

## `GenusOneModel(f): RngUPolElt -> ModelG1`

## `GenusOneModel(seq): [ RngMPolElt ] -> ModelG1`

The genus one model given by the polynomial $f$ or the sequence of equations `seq`.

## `GenusOneModel(n, E): RngIntElt, CrvEll -> ModelG1, Crv, MapSch, MapSch`

A genus one model of degree $n$ (where $n$ is 2, 3, 4, or 5) representing the elliptic curve $E$ embedded in ${\mathbb{P}}^{n-1}$ via the linear system $|n.O|$. Also returned are the image of the embedding as a curve $C$ together with the maps of schemes $E \to C$ and $C \to E$.

## `GenusOneModel(mat): Mtrx -> ModelG1`

The genus one model of degree 5 associated to the given $5 \times 5$ matrix.

## `GenusOneModel(mats): [ AlgMatElt ] -> ModelG1`

The genus one model of degree 4 determined by the given pair of $4 \times 4$ symmetric matrices in the sequence *mats*. (The matrices can be recovered by calling `ModelToMatrices`).

## `IsGenusOneModel(f): RngUPolElt -> BoolElt, ModelG1`

## `IsGenusOneModel(f): RngMPolElt -> BoolElt, ModelG1`

## `IsGenusOneModel(seq): [ RngMPolElt ] -> BoolElt, ModelG1`

## `IsGenusOneModel(mat): Mtrx -> BoolElt, ModelG1`

Returns `true` if and only if the given polynomial, sequence of polynomials, or matrix determines a “genus one model” in the sense described in the introduction to this chapter. When true, the model is also returned.

*Important note:* This does *not* imply that the associated scheme is a curve of genus $1$. Degenerate models are allowed.

## `GenericModel(n): RngIntElt -> ModelG1`

The generic genus one model of degree $n$, where $n$ is 2, 3, 4 or 5. The coefficients are indeterminates in a suitable polynomial ring.

## `RandomGenusOneModel(n): RngIntElt -> ModelG1`

## `RandomModel(n): RngIntElt -> ModelG1`

```magma
Size: RngIntElt                    Default: 
```

A random genus one model of degree $n$, where $n$ is 2, 3, 4, or 5. The optional parameter `Size` is passed to `RandomSL` or `RandomGL`.

## `ChangeRing(model, R): ModelG1, Rng -> ModelG1`

The genus one model defined over the ring $R$ obtained by coercing the coefficients of the given genus one model into $R$.

## `CompleteTheSquare(model): ModelG1 -> ModelG1`

Given a genus one model of degree 2, returns a simplified genus one model of degree 2 without cross terms; this is computed by completing the square on the multivariate polynomial defining the original model.

## `CubicFromPoint(E, P): CrvEll, PtEll -> RngMPolElt, MapSch, Pt`

The $3$-covering corresponding to the rational point $P$ on an elliptic curve $E$. The $3$-covering is returned as the equation of a projective plane cubic curve. Also returned are the covering map and a point that maps to $P$ under the covering map.

## `HesseModel(n, seq): RngIntElt, [ RngElt ] -> ModelG1`

A genus one model of degree $n$ invariant under the standard representation of the Heisenberg group. The second argument should be a sequence of two ring elements.

## `DiagonalModel(n, seq): RngIntElt, [ RngElt ] -> ModelG1`

A genus one model of degree $n$ invariant under the diagonal action of $\mu_n$. The second argument should be a sequence of $n$ ring elements.

## `Example: Generic Model (ex-bc04b8)`

We construct the genus one model of degree 5 obtained from the generic elliptic curve $E_{a,b} : y^2 = x^3+ax+b$ over ${\mathbb{Q}}(a,b)$. The model is the image of $E_{a,b}$ under the embedding in ${\mathbb{P}}^4$ given by the linear system $|5.O|$.

```magma
> K<a,b> := FunctionField(Rationals(), 2);
> Eab := EllipticCurve([a, b]);
> model := GenusOneModel(5, Eab);
> model;
[           0 -b*x1 - a*x2           x5           x4           x3]
[ b*x1 + a*x2            0           x4           x3           x2]
[         -x5          -x4            0          -x2            0]
[         -x4          -x3           x2            0           x1]
[         -x3          -x2            0          -x1            0]

```

From this matrix, which is the data storing the model, the equations of the curve in ${\mathbb{P}}^4$ can be computed; they are quadratic forms given by the $4 \times 4$ Pfaffians of the matrix.

```magma
> Equations(model);
[
    -x1*x4 + x2^2,
    x1*x5 - x2*x3,
    b*x1^2 + a*x1*x2 + x2*x4 - x3^2,
    -x2*x5 + x3*x4,
    -b*x1*x2 - a*x2^2 + x3*x5 - x4^2
]

```

Note that the degree $5$ model has the same invariants $c4, c6, \Delta$ as $E_{a,b}$:

```magma
> Invariants(model);
-48*a
-864*b
-64*a^3 - 432*b^2
> cInvariants(Eab), Discriminant(Eab);
[
    -48*a,
    -864*b
]
-64*a^3 - 432*b^2

```
