# Different Types of Scheme

As discussed briefly in Section [Aside: Types of Schemes](introduction.md#aside), there are a number of different increasingly specialised data types for schemes. It is often useful to check whether a given scheme can be thought of as belonging to one of these more specialised classes, and if so and appropriate then actually making the type change. In this section we document a number of such type-checking and type-change intrinsics, most of which are of the form `IsSpecialisedType`. These intrinsics always return a boolean value. If that value is `true` then they may also return a new scheme of the given specialised type, although in some trivial cases this does not happen. Of course, each of the different types of scheme has its own methods of construction independently of these intrinsics.

## `IsAffine(X): Sch -> BoolElt`

Returns `true` if and only if the scheme $X$ is an affine space.

## `IsProjective(X): Sch -> BoolElt`

Returns `true` if and only if the scheme $X$ is a projective space. Projective space here includes the case of scrolls.

## `IsOrdinaryProjectiveSpace(X): Sch -> BoolElt`

Returns `true` if and only if the scheme $X$ is a projective space in the usual sense: its coordinate ring has a single grading in which all the variables have weight one.

## `IsAmbient(X): Sch -> BoolElt`

Return `true` if the scheme $X$ is an ambient space.

## `IsCluster(X): Sch -> BoolElt, Clstr`

Returns `true` if and only if the scheme $X$ is a zero-dimensional scheme (but not the empty scheme). See Section [Zero-dimensional Schemes](schemes-clusters.md#sch-clusters) for intrinsics which apply to clusters.

## `IsCurve(X): Sch -> BoolElt, Crv`

Returns `true` if and only if $X$ is a one-dimensional scheme. See Chapter [Algebraic Curves](../AlgebraicCurves/index-algebraic-curves.md#crv) for intrinsics which apply to curves.

## `IsPlaneCurve(X): Sch -> BoolElt, CrvPln`

Returns `true` if and only if $X$ is a one-dimensional scheme defined by a single equation in a two-dimensional ambient space.

## `IsConic(X): Sch -> BoolElt, CrvCon`

Returns `true` if and only if the scheme $X$ is a curve (in the sense of `IsCurve(X)`) which is nonsingular and defined by an equation of degree $2$. See Chapter [Rational Curves and Conics](../../ArithmeticGeometry/RationalCurvesAndConics/index-rational-curves-and-conics.md#chapcrvcon) for intrinsics which apply to such conics.

## `IsRationalCurve(X): Sch -> BoolElt, CrvRat`

Returns `true` if and only if the scheme $X$ is a curve (in the sense of `IsCurve(X)`) which has genus $0$. See Chapter [Rational Curves and Conics](../../ArithmeticGeometry/RationalCurvesAndConics/index-rational-curves-and-conics.md#chapcrvcon) for intrinsics which apply to rational curves.

## `IsHyperellipticCurve(X): Sch -> BoolElt, CrvHyp`

Return `true` and a hyperelliptic curve if the scheme $X$ is *trivially* a hyperelliptic curve. This occurs if and only if $X$ is already of `CrvHyp` type or is defined by a non-singular Weierstrass equation in correctly weighted two-dimensional projective space. For a general scheme of type `Crv`, the intrinsic [`IsHyperelliptic`](../AlgebraicCurves/global-curvepl.md#function-crv-ishyp) in Chapter [Algebraic Curves](../AlgebraicCurves/index-algebraic-curves.md#crv) will determine whether $X$ is isomorphic to a hyperelliptic curve and return an isomorphism to a `CrvHyp` if so. This takes a lot more work in general. See Chapter [Hyperelliptic Curves](../../ArithmeticGeometry/HyperellipticCurves/index-hyperelliptic-curves.md#chapcrvhyp) for more information on hyperelliptic curves.

## `IsModularCurve(X): Sch -> BoolElt`

Return `true` if and only if the scheme $X$ is a curve of type `CrvMod`. See Chapter [Modular Curves](../../ModularArithmeticGeometry/ModularCurves/index-modular-curves.md#crvmod) for more information on modular curves.
