---
title: "Geometrical Properties of Cones and Polyhedra"
canonical: "https://docs.magma-maths.org/v2.30-1/AlgebraicGeometry/ToricVarieties/toric-cones-and-polyhedra.html"
source: "https://docs.magma-maths.org/v2.30-1/AlgebraicGeometry/ToricVarieties/toric-cones-and-polyhedra.md"
part: "Algebraic Geometry"
chapter: "Toric Varieties"
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": "Toric Varieties", "source": "https://docs.magma-maths.org/v2.30-1/AlgebraicGeometry/ToricVarieties/index-toric-varieties.md"}
prev: {"title": "Fans in Toric Lattices", "source": "https://docs.magma-maths.org/v2.30-1/AlgebraicGeometry/ToricVarieties/toric-fans.md"}
next: {"title": "Toric Varieties", "source": "https://docs.magma-maths.org/v2.30-1/AlgebraicGeometry/ToricVarieties/toric-varieties.md"}
intrinsics:
  - {"name": "IsSingular", "signature": "IsSingular(C): TorCon -> BoolElt"}
  - {"name": "IsNonsingular", "signature": "IsNonsingular(C): TorCon -> BoolElt"}
  - {"name": "IsSmooth", "signature": "IsSmooth(P): TorPol -> BoolElt"}
  - {"name": "IsGorenstein", "signature": "IsGorenstein(C): TorCon -> BoolElt"}
  - {"name": "IsReflexive", "signature": "IsReflexive(P): TorPol -> BoolElt"}
  - {"name": "IsQGorenstein", "signature": "IsQGorenstein(C): TorCon -> BoolElt"}
  - {"name": "GorensteinIndex", "signature": "GorensteinIndex(C): TorCon -> RngIntElt, TorLatElt"}
  - {"name": "GorensteinIndex", "signature": "GorensteinIndex(P): TorPol -> RngIntElt"}
  - {"name": "IsIsolated", "signature": "IsIsolated(C): TorCon -> BoolElt"}
  - {"name": "IsQFactorial", "signature": "IsQFactorial(C): TorCon -> BoolElt"}
  - {"name": "IsSimplicial", "signature": "IsSimplicial(P): TorPol -> BoolElt"}
  - {"name": "IsTerminal", "signature": "IsTerminal(C): TorCon -> BoolElt"}
  - {"name": "IsCanonical", "signature": "IsCanonical(C): TorCon -> BoolElt"}
  - {"name": "IsFano", "signature": "IsFano(P): TorPol -> BoolElt"}
examples:
  - "ex-ee8303"
---

# Geometrical Properties of Cones and Polyhedra

<a id="function-issingular-torcon"></a>
## `IsSingular(C): TorCon -> BoolElt`

Return `true` if and only if the affine variety associated with the cone $C$ is singular.

<a id="function-isnonsingular-torcon"></a>
## `IsNonsingular(C): TorCon -> BoolElt`

Return `true` if and only if the affine variety associated with the cone $C$ is nonsingular.

<a id="function-issmooth-torpol"></a>
## `IsSmooth(P): TorPol -> BoolElt`

Return `true` if and only if the polyhedron $P$ is a smooth polytope.

<a id="function-isgorenstein-torcon"></a>
## `IsGorenstein(C): TorCon -> BoolElt`

Return `true` if and only if the cone $C$ has (the primitive points on its) rays contained in an affine hyperplane that is defined by an integral equation.

<a id="function-isreflexive-torpol"></a>
## `IsReflexive(P): TorPol -> BoolElt`

Return `true` if and only if the polyhedron $P$ is reflexive; i.e. $P$ and its dual $P^\vee$ are both integral polytopes.

<a id="function-isqgorenstein-torcon"></a>
## `IsQGorenstein(C): TorCon -> BoolElt`

Return `true` if and only if the cone $C$ has (the primitive points on its) rays contained in an affine hyperplane.

<a id="function-gorensteinindex-torcon"></a>
## `GorensteinIndex(C): TorCon -> RngIntElt, TorLatElt`

The Gorenstein index of the affine variety corresponding to the cone $C$ together with the dual vector determining the equation of the hyperplane. (It is an error if $C$ is not ${\mathbb{Q}}$-Gorenstein.)

<a id="function-gorensteinindex-torpol"></a>
## `GorensteinIndex(P): TorPol -> RngIntElt`

The Gorenstein index of the lattice polytope $P$; i.e. the smallest positive integer $k$ such that $kP^\vee$ is an integral polytope.

<a id="function-isisolated-torcon"></a>
## `IsIsolated(C): TorCon -> BoolElt`

Return `true` if and only if the singularity of the affine variety associated to the cone $C$ is isolated.

<a id="function-isqfactorial-torcon"></a>
## `IsQFactorial(C): TorCon -> BoolElt`

<a id="function-issimplicial-torpol"></a>
## `IsSimplicial(P): TorPol -> BoolElt`

Return `true` if and only if the cone $C$ or polytope $P$ is simplicial.

<a id="function-isterminal-torcon"></a>
## `IsTerminal(C): TorCon -> BoolElt`

Return `true` if and only if the singularity of the affine variety associated to the cone $C$ is (at worst) terminal.

<a id="function-iscanonical-torcon"></a>
## `IsCanonical(C): TorCon -> BoolElt`

Return `true` if and only if the singularity of the affine variety associated to the cone $C$ is (at worst) canonical.

<a id="function-isfano-torpol"></a>
## `IsFano(P): TorPol -> BoolElt`

Return `true` if and only if the polyhedron $P$ is a Fano polytope (i.e. of maximum dimension in the ambient lattice, containing the origin strictly in its interior, with primitive lattice vertices).

<a id="example-ex-ee8303"></a>
## `Example: Cone of a Terminal Quotient Singularity (ex-ee8303)`

We make the cone corresponding to the (affine) terminal quotient singularity ${\mathbb{C}}^3/({\mathbb{Z}}/5)$ where ${\mathbb{Z}}/5$ acts as the $5$th roots of unity in the diagonal representation ${\rm diag}(1,2,3)$.

```magma
> L := ToricLattice(3);
> v := L ! [1/5,2/5,3/5];
> LL,emb := AddVectorToLattice(v);
> C := PositiveQuadrant(L);
> CC := Image(emb,C);
> CC;
Cone CC with 3 generators:
    (1, 0, 0),
    (0, 1, 0),
    (3, 1, 5)
```

We can check that this really is terminal and compute its Gorenstein index, the least positive multiple of the canonical class that is Cartier.

```magma
> IsTerminal(CC);
true
> GorensteinIndex(CC);
5 (1, 1, -3/5)
```

We can compute a resolution of singularities of this cone, the analogue of a simplicial subdivision for cones, although we must treat it as a fan to do so.

```magma
> F := Fan(CC);
> F;
Fan F with 3 rays:
    (0, 1, 0),
    (1, 0, 0),
    (3, 1, 5)
and one cone with indices:
    [ 1, 2, 3 ]
> Resolution(F);
Fan with 8 rays:
    (0, 1, 0),
    (1, 0, 0),
    (3, 1, 5),
    (2, 1, 2),
    (1, 1, 1),
    (3, 1, 3),
    (3, 1, 4),
    (2, 1, 3)
and 11 cones
```

Note that this is not a minimal resolution: such a resolution would only need to subdivide at the four additional rays at the (original) lattice points $1/5(1,2,3)$, $1/5(2,4,1)$, $1/5(3,1,4)$, and $1/5(4,3,2)$.
