---
title: "Zero-dimensional Schemes"
canonical: "https://docs.magma-maths.org/v2.30-1/AlgebraicGeometry/Schemes/schemes-clusters.html"
source: "https://docs.magma-maths.org/v2.30-1/AlgebraicGeometry/Schemes/schemes-clusters.md"
part: "Algebraic Geometry"
chapter: "Schemes"
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": "Schemes", "source": "https://docs.magma-maths.org/v2.30-1/AlgebraicGeometry/Schemes/index-schemes.md"}
prev: {"title": "Rational Points and Point Sets", "source": "https://docs.magma-maths.org/v2.30-1/AlgebraicGeometry/Schemes/schemes-points.md"}
next: {"title": "Local Geometry of Schemes", "source": "https://docs.magma-maths.org/v2.30-1/AlgebraicGeometry/Schemes/schemes-local.md"}
intrinsics:
  - {"name": "Cluster", "signature": "Cluster(p): Pt -> Clstr"}
  - {"name": "Cluster", "signature": "Cluster(X, p): Sch, Pt -> Clstr;"}
  - {"name": "Cluster", "signature": "Cluster(S): SetEnum -> Clstr"}
  - {"name": "Cluster", "signature": "Cluster(S): SetIndx -> Clstr"}
  - {"name": "Cluster", "signature": "Cluster(X, S): Sch, SetEnum -> Clstr"}
  - {"name": "Cluster", "signature": "Cluster(X, S): Sch, SetIndx -> Clstr"}
  - {"name": "RationalPoints", "signature": "RationalPoints(Z): Sch -> SetEnum"}
  - {"name": "RationalPoints", "signature": "RationalPoints(Z, L): Sch, Rng -> SetEnum"}
  - {"name": "PointsOverAlgebraicClosure", "signature": "PointsOverAlgebraicClosure(Z): Clstr -> SetIndx, Fld"}
  - {"name": "PointsOverSplittingField", "signature": "PointsOverSplittingField(Z): Clstr -> SetIndx, Fld"}
  - {"name": "HasPointsOverExtension", "signature": "HasPointsOverExtension(X): Sch -> BoolElt"}
  - {"name": "HasPointsOverExtension", "signature": "HasPointsOverExtension(X, L): Sch, Rng -> BoolElt"}
  - {"name": "Degree", "signature": "Degree(Z): Clstr -> RngIntElt"}
examples:
  - "ex-e7b0a1"
  - "ex-821adf"
---

<a id="schemes-clusters"></a>
<a id="sch-clusters"></a>
# Zero-dimensional Schemes

This section describes intrinsics for creating zero dimensional schemes or *clusters*. It also discusses those functions which converts a finite set of points into the reduced zero dimensional having this support. Throughout this subsection, a lowercase $p$ denotes a point of a scheme.

The word cluster refers to schemes that are known to be zero dimensional. In general, the intrinsic `Cluster` converts points to clusters while the function `RationalPoints` finds the points on a cluster which are rational over its base field.

Note that there are four constructors of the form `Cluster(X,data)` analogous to the four `Scheme(X,data)` constructors but which make an additional dimension test and type change before returning a cluster determined as a subscheme of $X$ by the data of the second argument.

<a id="function-cluster-pt"></a>
## `Cluster(p): Pt -> Clstr`

<a id="function-cluster-sch-pt"></a>
## `Cluster(X, p): Sch, Pt -> Clstr;`

<a id="function-cluster-setenum"></a>
## `Cluster(S): SetEnum -> Clstr`

<a id="function-cluster-setindx"></a>
## `Cluster(S): SetIndx -> Clstr`

<a id="function-cluster-sch-setenum"></a>
## `Cluster(X, S): Sch, SetEnum -> Clstr`

<a id="function-cluster-sch-setindx"></a>
## `Cluster(X, S): Sch, SetIndx -> Clstr`

The reduced scheme supported at the point $p$, or supported at the set of points $S$, as a subscheme of the scheme $X$ if given.

<a id="function-rationalpoints-sch-2"></a>
## `RationalPoints(Z): Sch -> SetEnum`

<a id="function-rationalpoints-sch-rng-2"></a>
## `RationalPoints(Z, L): Sch, Rng -> SetEnum`

The set of rational points of the cluster $Z$. If an extension of the base field $L$ is given as a second argument, the set of points of $Z(L)$, those points whose coordinates lie in $L$, is returned.

<a id="function-pointsoveralgebraicclosure-clstr"></a>
## `PointsOverAlgebraicClosure(Z): Clstr -> SetIndx, Fld`

The points of the cluster $Z$ over an algebraic closure $L$ of its base field, together with $L$. The base field must be the rational field, a finite field, or an algebraically closed field. If the base field is algebraically closed or $Z$ is empty, $L$ is the base field itself. `PointsOverSplittingField` returns the same points over a number field when the base field is the rational field, and over an explicit finite extension when it is a finite field.

<a id="function-pointsoversplittingfield-clstr"></a>
## `PointsOverSplittingField(Z): Clstr -> SetIndx, Fld`

```magma
Absolute: BoolElt                    Default: false
```

The points of the cluster $Z$ over a splitting field $L$, a finite extension of the base field, together with $L$. The base field must be the rational field, a finite field, or an algebraically closed field. Over an algebraically closed field this intrinsic behaves as `PointsOverAlgebraicClosure`. If $Z$ is empty, $L$ is the base field.

Over the rational field, $L$ is a number field, or the rational field itself when no extension is needed. The points are found in an algebraic closure, as by `PointsOverAlgebraicClosure`, and their coordinates are then mapped into $L$. By default the number field is a tower with one extension for each variable of that algebraic closure. If the parameter `Absolute` is set to `true`, it is an absolute number field instead, which is usually more expensive both to construct and to compute with.

Over a finite field, $L$ is a finite extension of the base field, possibly of degree $1$. Over either field, $L$ need not have minimal degree, and constructing it and computing with it may be expensive.

<a id="example-ex-e7b0a1"></a>
## `Example: Points of a Cluster over a Number Field (ex-e7b0a1)`

We compute the points of a zero-dimensional scheme over the rationals. The splitting field is returned as a number field.

```magma
> P5<x, y, z, w, u, t> := ProjectiveSpace(Rationals(), 5);
> eqns := [
> w^2 - 37852414/35772413*u^2 - 22528936/35772413*w*t
>   + 5679939/35772413*u*t - 7111409/35772413*t^2,
> w*u + 52686636/35772413*u^2 + 62311891/71544826*w*t
>   - 17906287/35772413*u*t + 30283007/71544826*t^2,
> x + 163/1691*w - 668/1691*u + 210/1691*t,
> y + 696/1691*w + 1287/1691*u + 46/1691*t,
> z - 372/1691*w + 41/1691*u - 666/1691*t];
> Z := Scheme(P5, eqns);
> pts, L := PointsOverSplittingField(Z);
> Type(L);
FldNum
> #pts;
4
```

<a id="function-haspointsoverextension-sch"></a>
## `HasPointsOverExtension(X): Sch -> BoolElt`

<a id="function-haspointsoverextension-sch-rng"></a>
## `HasPointsOverExtension(X, L): Sch, Rng -> BoolElt`

Returns `false` if and only if all points in the support of the scheme $X$ over an algebraic closure of its base field are already defined over its current base field, or all lie in the point set $X(L)$ if the second argument $L$ is given. This intrinsic is most useful when trying to decide whether or not to make an extension of the base field of $X$ to reveal non-rational points. The base field of $X$ does not need to be a finite field.

<a id="function-degree-clstr"></a>
## `Degree(Z): Clstr -> RngIntElt`

The degree of the cluster $Z$. If $Z$ is reduced, this is equal to the maximum number of points in the support over $Z$ over some extension of its base ring.

<a id="example-ex-821adf"></a>
## `Example: Intersection of Two Plane Curves (ex-821adf)`

In this example we intersect a pair of plane curves. (Note that much more specialised machinery for working with curves is available in Chapter [Algebraic Curves](https://docs.magma-maths.org/v2.30-1/AlgebraicGeometry/AlgebraicCurves/index-algebraic-curves.md#crv).) First we define two curves and find their points of intersection over the base field. The degree of the cluster $Z$ is the usual numerical *intersection number* of the curves $C$ and $D$. Here we are more interested in finding exactly those points that lie in the intersection.

```magma
> k := FiniteField(5);
> P<x,y,z> := ProjectiveSpace(k,2);
> C := Scheme(P,x^3 + y^3 - z^3);
> D := Scheme(P,x^2 + y^2 - z^2);
> Z := Intersection(C,D);
> IsCluster(Z);
true
> Degree(Z);
6
> RationalPoints(Z);
{ (1 : 0 : 1), (0 : 1 : 1) }
> HasPointsOverExtension(Z);
true
```

If $C$ and $D$ were rather general, that is, if $Z$ was reduced, then we would expect $6$ points in their intersection. We cannot expect that here, but the final line above does confirm that we have not yet seen all the points of intersection. We allow Magma to compute directly over a splitting field.

```magma
> PointsOverSplittingField(Z);
{ (0 : 1 : 1), ($.1^14 : $.1^22 : 1), ($.1^22 : $.1^14 : 1), (1 : 0 : 1) }
> L<w> := Ring(Universe($1));
> L;
Finite field of size 5^2
> PointsOverSplittingField(Z);
{ (0 : 1 : 1), (w^14 : w^22 : 1), (w^22 : w^14 : 1), (1 : 0 : 1) }
```

In this case we see that the support is not six points but only four.
