# Subgroup Schemes

A subgroup scheme $G$ of an elliptic curve $E$ is a subscheme of $E$ defined by a univariate polynomial $\psi$ and closed under the group law on $E$. The points of $G$ are those points of $E$ whose $x$-coordinate is a root of $\psi$. All elliptic curves are considered to be subgroup schemes with defining polynomial $\psi = 0$.

## Creation of Subgroup Schemes

### `SubgroupScheme(G, f): SchGrpEll, RngUPolElt -> SchGrpEll`

Creates the subgroup scheme of the subgroup scheme $G$ defined by the univariate polynomial $f$. No checking is done to ensure that the rational points of the result actually do form a group under the addition law. Note that $G$ can be an elliptic curve.

### `TorsionSubgroupScheme(G, n): SchGrpEll, RngIntElt -> SchGrpEll`

Returns the subgroup scheme of $n$-torsion points of the subgroup scheme $G$. Note that $G$ can be an elliptic curve.

## Associated Structures

### `Category(G): SchGrpEll -> Cat`

### `Type(G): SchGrpEll -> Cat`

Returns the category of elliptic curve subgroup schemes, `SchGrpEll`.

### `Curve(G): SchGrpEll -> CrvEll`

### `Generic(G): SchGrpEll -> CrvEll`

Returns the elliptic curve $E$ of which $G$ is a subgroup scheme.

### `BaseRing(G): SchGrpEll -> Rng`

### `CoefficientRing(G): SchGrpEll -> Rng`

Returns the base ring of the subgroup scheme $G$; this is the same as the base ring of its curve.

### `DefiningSubschemePolynomial(G): SchGrpEll -> RngUPolElt`

Returns the univariate polynomial that defines $G$ as a subscheme of its curve.

## Predicates on Subgroup Schemes

### `G1 eq G2: SchGrpEll, SchGrpEll -> BoolElt`

Returns `true` if and only if $G1$ and $G2$ are subgroup schemes of the same elliptic curve and are defined by equal polynomials.

### `G1 ne G2: SchGrpEll, SchGrpEll -> BoolElt`

The logical negation of `eq`.

## Points of Subgroup Schemes

### `# G: SchGrpEll -> RngIntElt`

### `Order(G): SchGrpEll -> RngIntElt`

The order of the group of rational points on the subgroup scheme $G$.

### `FactoredOrder(G): SchGrpEll -> RngIntElt`

The factorisation of the order of the group of rational points on the subgroup scheme $G$.

### `Points(G): SchGrpEll -> SetIndx`

### `RationalPoints(G): SchGrpEll -> SetIndx`

The indexed set of rational points of the subgroup scheme $G$ over its base ring.

### `Example: Subgroup Schemes (ex-125594)`

We construct a curve over ${\mathbb{F}}_{49}$ and form several subgroup schemes from it.

```magma
> K<w> := GF(7, 2);
> P<t> := PolynomialRing(K);
> E := EllipticCurve([K | 1, 3]);
> G := SubgroupScheme(E, (t-4)*(t-5)*(t-6));
> G;
Subgroup scheme of E defined by x^3 + 6*x^2 + 4*x + 6
> Points(G);
{@ (0 : 1 : 0), (6 : 1 : 1), (6 : 6 : 1), (4 : 1 : 1), (4 : 6 : 1),
(5 : 0 : 1) @}

```

The points of order 3 form a further subgroup.

```magma
> [ Order(P) : P in $1 ];
[ 1, 3, 3, 6, 6, 2 ]
> G2 := SubgroupScheme(G, t - 6);
> G2;
Subgroup scheme of E defined by x + 1
> Points(G2);
{@ (0 : 1 : 0), (6 : 1 : 1), (6 : 6 : 1) @}

```

We can find this subgroup another way, as the intersection of the $15$-torsion points of $E$ and $G$.

```magma
> G3 := TorsionSubgroupScheme(E, 15);
> #G3;
15
> G4 := SubgroupScheme(G3, DefiningSubschemePolynomial(G));
> G4;
Subgroup scheme of E defined by x + 1
> G2 eq G4;
true

```
