# Points

We provide an abstract interface for working with points on Mori dream spaces in terms of their Cox coordinates and orbit cone. An implementation for fixed points on $\mathbb{C}^*$-surfaces (elliptic, hyperbolic and parabolic) as well as toric fixed points on surfaces is provided.

## Types

CStarSurfaces.EllipticFixedPointPlusType
EllipticFixedPointPlus{T <: Union{EE,EP}} <: EllipticFixedPoint{T}

An elliptic fixed point $x^+$ on a $\mathbb{C}^*$-surface of type (e-e) or (e-p). There should only ever be one instance of this type for any given CStarSurface, which is accessible via x_plus.

CStarSurfaces.EllipticFixedPointMinusType
EllipticFixedPointMinus{T <: Union{EE,PE}} <: EllipticFixedMinus{T}

An elliptic fixed point $x^-$ on a $\mathbb{C}^*$-surface of type (e-e) or (p-e). There should only ever be one instance of this type for any given CStarSurface, which is accessible via x_minus.

## Constructors

CStarSurfaces.x_plusFunction
x_plus(X :: CStarSurface{<:Union{EE,EP}})

Return the elliptic fixed point $x^+$ of a $\mathbb{C}^*$-surface of type (e-e) or (e-p).

Example

julia> X = cstar_surface([[3, 1], [3], [2]], [[-2, -1], [1], [1]], :ee)
C-star surface of type (e-e)

julia> x_plus(X)
elliptic fixed point x^+
CStarSurfaces.x_minusFunction
x_minus(X :: CStarSurface{<:Union{EE,PE}})

Return the elliptic fixed point $x^-$ of a $\mathbb{C}^*$-surface of type (e-e) or (p-e).

Example

julia> X = cstar_surface([[3, 1], [3], [2]], [[-2, -1], [1], [1]], :ee)
C-star surface of type (e-e)

julia> x_minus(X)
elliptic fixed point x^-
CStarSurfaces.hyperbolic_fixed_pointFunction
hyperbolic_fixed_point(X :: CStarSurface, i :: Int, j :: Int)

Return the hyperbolic fixed point $x_{ij}$ of a $\mathbb{C}^*$-surface, where $0 ≤ i ≤ r$ and $1 ≤ j ≤ n_i - 1$.

Example

julia> X = cstar_surface([[3, 1], [3], [2]], [[-2, -1], [1], [1]], :ee)
C-star surface of type (e-e)

julia> hyperbolic_fixed_point(X, 0, 1)
hyperbolic fixed point x(0, 1)
CStarSurfaces.parabolic_fixed_point_plusFunction
parabolic_fixed_point_plus(X :: CStarSurface{<:Union{PE,PP}}, i :: Int)

Return the parabolic fixed point $x_i^+$ of a $\mathbb{C}^*$-surface, where $0 ≤ i ≤ r$.

Example

julia> X = cstar_surface([[3, 1], [3], [2]], [[-2, -1], [1], [1]], :pe)
C-star surface of type (p-e)

julia> parabolic_fixed_point_plus(X, 0)
parabolic fixed point x^+(0)
CStarSurfaces.parabolic_fixed_point_minusFunction
parabolic_fixed_point_minus(X :: CStarSurface{<:Union{EP,PP}}, i :: Int)

Return the parabolic fixed point $x_i^-$ of a $\mathbb{C}^*$-surface, where $0 ≤ i ≤ r$.

Example

julia> X = cstar_surface([[3, 1], [3], [2]], [[-2, -1], [1], [1]], :ep)
C-star surface of type (e-p)

julia> parabolic_fixed_point_minus(X, 0)
parabolic fixed point x^-(0)

## Sets of fixed points

CStarSurfaces.elliptic_fixed_pointsFunction
elliptic_fixed_points(X :: CStarSurface)

Return the elliptic fixed points of a $\mathbb{C}^*$-surface.

Example

julia> X = cstar_surface([[3, 1], [3], [2]], [[-2, -1], [1], [1]], :ee)
C-star surface of type (e-e)

julia> elliptic_fixed_points(X)
2-element Vector{EllipticFixedPoint{EE}}:
elliptic fixed point x^+
elliptic fixed point x^-
CStarSurfaces.hyperbolic_fixed_pointsFunction
hyperbolic_fixed_points(X :: CStarSurface)

Return the hyperbolic fixed points of a $\mathbb{C}^*$-surface as a DoubleVector.

Example

julia> X = cstar_surface([[1,2,1], [1,1], [1,1]], [[3,3,0], [0,-1], [0,-2]], :ee)
C-star surface of type (e-e)

julia> hyperbolic_fixed_points(X)
3-element OffsetArray(::Vector{Vector{HyperbolicFixedPoint{EE}}}, 0:2) with eltype Vector{HyperbolicFixedPoint{EE}} with indices 0:2:
[hyperbolic fixed point x(0, 1), hyperbolic fixed point x(0, 2)]
[hyperbolic fixed point x(1, 1)]
[hyperbolic fixed point x(2, 1)]
CStarSurfaces.parabolic_fixed_points_plusFunction
parabolic_fixed_points_plus(X :: CStarSurface{T}) where {T <: Union{PE,PP}}

Return the parabolic fixed points $x_i^+$ of a $\mathbb{C}^*$-surface.

Example

julia> X = cstar_surface([[3, 1], [3], [2]], [[-2, -1], [1], [1]], :pe)
C-star surface of type (p-e)

julia> parabolic_fixed_points_plus(X)
3-element OffsetArray(::Vector{ParabolicFixedPointPlus{PE}}, 0:2) with eltype ParabolicFixedPointPlus{PE} with indices 0:2:
parabolic fixed point x^+(0)
parabolic fixed point x^+(1)
parabolic fixed point x^+(2)
CStarSurfaces.parabolic_fixed_points_minusFunction
parabolic_fixed_points_minus(X :: CStarSurface{T}) where {T <: Union{EP,PP}}

Return the parabolic fixed points $x_i^-$ of a $\mathbb{C}^*$-surface.

Example

julia> X = cstar_surface([[3, 1], [3], [2]], [[-2, -1], [1], [1]], :ep)
C-star surface of type (e-p)

julia> parabolic_fixed_points_minus(X)
3-element OffsetArray(::Vector{ParabolicFixedPointMinus{EP}}, 0:2) with eltype ParabolicFixedPointMinus{EP} with indices 0:2:
parabolic fixed point x^-(0)
parabolic fixed point x^-(1)
parabolic fixed point x^-(2)
CStarSurfaces.parabolic_fixed_pointsFunction
parabolic_fixed_points(X :: CStarSurface)

Return the parabolic fixed points of a $\mathbb{C}^*$-surface.

Example

julia> X = cstar_surface([[3, 1], [3], [2]], [[-2, -1], [1], [1]], :pp)
C-star surface of type (p-p)

julia> parabolic_fixed_points(X)
6-element Vector{ParabolicFixedPoint{PP}}:
parabolic fixed point x^+(0)
parabolic fixed point x^+(1)
parabolic fixed point x^+(2)
parabolic fixed point x^-(0)
parabolic fixed point x^-(1)
parabolic fixed point x^-(2)
CStarSurfaces.fixed_pointsFunction
fixed_points(X :: CStarSurface)

Return all fixed points of a $\mathbb{C}^*$-action. This is the union of elliptic_fixed_points, hyperbolic_fixed_points and parabolic_fixed_points.

Example

julia> X = cstar_surface([[3, 1], [3], [2]], [[-2, -1], [1], [1]], :ep)
C-star surface of type (e-p)

julia> fixed_points(X)
5-element Vector{CStarSurfaceFixedPoint{EP}}:
elliptic fixed point x^+
hyperbolic fixed point x(0, 1)
parabolic fixed point x^-(0)
parabolic fixed point x^-(1)
parabolic fixed point x^-(2)

## Attributes

Base.parentMethod
parent(x :: MoriDreamSpacePoint)

Return the Mori dream space where x lives in.

Example

julia> X = cstar_surface([[3, 1], [3], [2]], [[-2, -1], [1], [1]], :ee)
C-star surface of type (e-e)

julia> x = x_plus(X)
elliptic fixed point x^+

julia> parent(x) === X
true
CStarSurfaces.orbit_coneFunction
orbit_cone(x :: MoriDreamSpacePoint)

Given a point $x \in X$ on a Mori dream space, return the index vector of the cone $\sigma$ of the canonical toric ambient variety such that $x$ is contained in the toric orbit associated to $\sigma$.

Example

julia> X = cstar_surface([[3, 1], [3], [2]], [[-2, -1], [1], [1]], :ee)
C-star surface of type (e-e)

julia> orbit_cone(x_plus(X))
3-element Vector{Int64}:
1
3
4
CStarSurfaces.cox_coordinatesFunction
cox_coordinates(x :: MoriDreamSpacePoint)

Return the Cox coordinates of a point on a Mori dream space.

Example

julia> X = cstar_surface([[3, 1], [3], [2]], [[-2, -1], [1], [1]], :ee)
C-star surface of type (e-e)

julia> cox_coordinates(x_plus(X))
4-element Vector{Int64}:
0
1
0
0
Hecke.class_groupMethod
class_group(x :: MoriDreamSpacePoint)

Return the local class group at a given point on a Mori dream space.

Example

julia> X = cstar_surface([[2, 2], [2], [4]], [[3, -3], [1], [1]], :ee)
C-star surface of type (e-e)

julia> class_group(x_plus(X))
GrpAb: Z/2 x Z/18
CStarSurfaces.class_group_torsionMethod
class_group_torsion(X :: MoriDreamSpacePoint)

Return the list of elementary divisors that make up the torsion part of the local class group of a point on a Mori Dream Space.

Example

julia> X = cstar_surface([[2, 2], [2], [4]], [[3, -3], [1], [1]], :ee)
C-star surface of type (e-e)

julia> class_group_torsion(x_plus(X))
2-element Vector{ZZRingElem}:
2
18
CStarSurfaces.class_group_torsion_orderMethod
class_group_torsion_order(X :: MoriDreamSpacePoint)

Return the order of the torsion part of the class group of a Mori Dream Space.

Example

julia> X = cstar_surface([[2, 2], [2], [4]], [[3, -3], [1], [1]], :ee)
C-star surface of type (e-e)

julia> class_group_torsion_order(x_plus(X))
36
CStarSurfaces.map_from_class_group_to_local_class_groupMethod
map_from_class_group_to_local_class_group(X :: MoriDreamSpacePoint)

Compute the canonical map from the class group of a Mori dream space to the local class group at a given point.

Example

julia> X = cstar_surface([[2, 2], [2], [4]], [[3, -3], [1], [1]], :ee)
C-star surface of type (e-e)

julia> map_from_class_group_to_local_class_group(x_plus(X))
Map with following data
Domain:
=======
Abelian group with structure: Z/2 x Z/6 x Z
Codomain:
=========
Abelian group with structure: Z/2 x Z/18
Oscar.gorenstein_indexMethod
gorenstein_index(X :: MoriDreamSpacePoint)

Return the local gorenstein index of a point on a Mori Dream Space.

Example

julia> X = cstar_surface([[2, 2], [2], [4]], [[3, -3], [1], [1]], :ee)
C-star surface of type (e-e)

julia> gorenstein_index(x_plus(X))
9
CStarSurfaces.is_quasismoothFunction
is_quasismooth(x :: MoriDreamSpacePoint)

Checks whether a point on a Mori dream space is quasismooth.

Example

julia> X = cstar_surface([[3, 1], [3], [2]], [[-2, -1], [1], [1]], :ee)
C-star surface of type (e-e)

julia> is_quasismooth(x_plus(X))
false
CStarSurfaces.is_factorialMethod
is_factorial(x :: MoriDreamSpacePoint)

Check whether a point on a Mori dream space is factorial, i.e. its local class group is trivial.

Example

julia> X = cstar_surface([[2, 2], [2], [4]], [[3, -3], [1], [1]], :ee)
C-star surface of type (e-e)

julia> is_factorial(x_plus(X))
false
Hecke.is_smoothMethod
is_smooth(x :: MoriDreamSpacePoint)

Check whether a point on a Mori dream space is smooth, i.e. factorial and quasismooth.

Example

julia> X = cstar_surface([[3, 1], [3], [2]], [[-2, -1], [1], [1]], :ee)
C-star surface of type (e-e)

julia> is_smooth(x_plus(X))
false
CStarSurfaces.is_log_terminalFunction
is_log_terminal(x :: SurfaceWithTorusActionFixedPoint)

Check whether a point on a surface with torus action is at most a log terminal singularity.

Example

The $E_6$ singular cubic.

julia> X = cstar_surface([[3, 1], [3], [2]], [[-2, -1], [1], [1]], :ee)
C-star surface of type (e-e)

julia> is_log_terminal(x_plus(X))
true

A non-log terminal singularity.

julia> X = cstar_surface([[5, 7],[3],[2]], [[-1, 2], [1], [-1]], :ee)
C-star surface of type (e-e)

julia> is_log_terminal(x_plus(X))
false

## Resolution of singularities

CStarSurfaces.canonical_resolutionFunction
canonical_resolution(x :: SurfaceWithTorusActionFixedPoint)

Return the canonical resolution of singularities of a given fixed point on a surface with torus action. The result is a triple (Y, ex_div, discr) where Y is the resulting surface after the resolution step, ex_div contains the exceptional divisors over x and discrepancies contains their discrepancies.

Example

Resolving the elliptic fixed point $x^+$ of the $E_6$ singular cubic.

julia> X = cstar_surface([[3, 1], [3], [2]], [[-2, -1], [1], [1]], :ee)
C-star surface of type (e-e)

julia> (Y, ex_div, discr) = canonical_resolution(x_plus(X));

julia> gen_matrix(Y)
[-3   -1   -2   -1   3   2   1   0   0   0]
[-3   -1   -2   -1   0   0   0   2   1   0]
[-2   -1   -1    0   1   1   1   1   1   1]

julia> map(E -> E*E, ex_div)
6-element Vector{QQFieldElem}:
-2
-2
-2
-2
-2
-2

julia> discr
6-element Vector{Rational{Int64}}:
0//1
0//1
0//1
0//1
0//1
0//1

CStarSurfaces.minimal_resolutionFunction
minimal_resolution(x :: CStarSurfaceFixedPoint)

Return the minimal resolution of singularities of a $\mathbb{C}^*$-surface surface X. The minimal resolution is obtained by contracting all (-1)-curves of the canonical resolution. The result is a triple (Y, ex_div, discr) where Y is the resulting $\mathbb{C}^*$-surface after the resolution step, ex_div contains the exceptional divisors in the resolution and discrepancies contains their discrepancies.

Example

julia> X = cstar_surface([[3, 1], [3], [2]], [[-2, -1], [1], [1]], :ee)
C-star surface of type (e-e)

julia> (Y, ex_div, discr) = minimal_resolution(x_plus(X));

julia> gen_matrix(Y)
[-3   -1   -2   -1   3   2   1   0   0   0]
[-3   -1   -2   -1   0   0   0   2   1   0]
[-2   -1   -1    0   1   1   1   1   1   1]

CStarSurfaces.log_canonicityMethod
log_canonicity(X :: SurfaceWithTorusActionFixedPoint)

Return the maximal rational number $\varepsilon$ such that a given point on a surface with torus action is $\varepsilon$-log canonical. By definition, this is the minimal discrepancy in the resolution of singularities plus one.

Example

julia> X = cstar_surface([[3, 1], [3], [2]], [[-2, -1], [1], [1]], :ee)
C-star surface of type (e-e)

julia> log_canonicity(x_plus(X))
1//1
CStarSurfaces.resolution_graphMethod
resolution_graph(x :: SurfaceWithTorusActionFixedPoint)

Return the resolution graph of the minimal resolution at a given fixed point of a surface with torus action. The result is a pair with first entry a Graphs.SimpleGraph and second entry the list of self intersection numbers of the exceptional divisors, which serve as node labels of the graph.

Example

The $E_6$ singular cubic surface.

julia> X = cstar_surface([[3, 1], [3], [2]], [[-2, -1], [1], [1]], :ee)
C-star surface of type (e-e)

julia> (graph, nodelabel) = resolution_graph(x_plus(X))
(Graphs.SimpleGraphs.SimpleGraph{Int64}(11, [[1, 2], [1, 2, 6], [3, 4], [3, 4, 6], [5, 6], [2, 4, 5, 6]]), Nemo.QQFieldElem[-2, -2, -2, -2, -2, -2])

The resolution graph can be visualized with GraphPlot.jl:

julia> using GraphPlot

julia> gplothtml(graph, nodelabel = nodelabel)

CStarSurfaces.number_of_exceptional_prime_divisorsMethod
number_of_exceptional_prime_divisors(x :: SurfaceWithTorusActionFixedPoint)

Return the number of exceptional prime divisors over a given point in the minimal resolution of singularities.

Example

julia> X = cstar_surface([[3, 1], [3], [2]], [[-2, -1], [1], [1]], :ee)
C-star surface of type (e-e)

julia> number_of_exceptional_prime_divisors(x_plus(X))
6

## Singularity types

CStarSurfaces.singularity_typeFunction
singularity_type(x :: SurfaceWithTorusActionFixedPoint)

Return the singularity type of a fixed point on a surface with torus action.

Examples

The $E_6$ singular cubic.

julia> X = cstar_surface([[3, 1], [3], [2]], [[-2, -1], [1], [1]], :ee)
C-star surface of type (e-e)

julia> singularity_type(x_plus(X))
E6

A non-log terminal singularity.

julia> X = cstar_surface([[5, 7],[3],[2]], [[-1, 2], [1], [-1]], :ee)
C-star surface of type (e-e)

julia> singularity_type(x_plus(X))
Non log terminal singularity
CStarSurfaces.SingularityTypeAType
SingularityTypeA <: SingularityTypeADE

The singularity type $A_n$. It has a single field n that holds the number of nodes in the resolution graph.

CStarSurfaces.SingularityTypeDType
SingularityTypeD <: SingularityTypeADE

The singularity type $D_n$. It has a single field n that holds the number of nodes in the resolution graph.