# ToricMorphisms

A class of morphisms among toric varieties are described by certain lattice morphisms. Let $N_1$ and $N_2$ be lattices and $\Sigma_1$, $\Sigma_2$ fans in $N_1$ and $N_2$ respectively. A $\mathbb{Z}$-linear map

\[\overline{\phi} \colon N_1 \to N_2\]

is said to be compatible with the fans $\Sigma_1$ and $\Sigma_2$ if for every cone $\sigma_1 \in \Sigma_1$, there exists a cone $\sigma_2 \in \Sigma_2$ such that $\overline{\phi}_{\mathbb{R}}(\sigma_1) \subseteq \sigma_2$.

By theorem 3.3.4 David A. Cox, John B. Little, Henry K. Schenck (2011), such a map $\overline{\phi}$ induces a morphism $\phi \colon X_{\Sigma_1} \to X_{\Sigma_2}$ of the toric varieties, and those morphisms are exactly the toric morphisms.

## Constructors

### Generic constructors with specified codomain

`toric_morphism`

— Method`toric_morphism(domain::NormalToricVarietyType, mapping_matrix::ZZMatrix, codomain::NormalToricVarietyType; check=true)`

Construct the toric morphism with given domain and associated to the lattice morphism given by the `mapping_matrix`

.

If the codomain is left out, it will be determined whether the image of the domain fan is itself a polyhedral fan. In that case the codomain is assumed to be the associated toric variety.

All checks can be disabled with `check=false`

.

**Examples**

```
julia> domain = projective_space(NormalToricVariety, 1)
Normal, non-affine, smooth, projective, gorenstein, fano, 1-dimensional toric variety without torusfactor
julia> codomain = hirzebruch_surface(NormalToricVariety, 2)
Normal, non-affine, smooth, projective, gorenstein, non-fano, 2-dimensional toric variety without torusfactor
julia> mapping_matrix = matrix(ZZ, [0 1])
[0 1]
julia> toric_morphism(domain, mapping_matrix, codomain)
A toric morphism
```

`toric_morphism`

— Method`toric_morphism(domain::NormalToricVarietyType, grid_morphism::GrpAbFinGenMap, codomain::NormalToricVarietyType; check=true)`

Construct the toric morphism from the `domain`

to the `codomain`

with map given by the `grid_morphism`

.

If the codomain is left out, it will be determined whether the image of the domain fan is itself a polyhedral fan. In that case the codomain is assumed to be the associated toric variety.

All checks can be disabled with `check=false`

.

**Examples**

```
julia> domain = projective_space(NormalToricVariety, 1)
Normal, non-affine, smooth, projective, gorenstein, fano, 1-dimensional toric variety without torusfactor
julia> codomain = hirzebruch_surface(NormalToricVariety, 2)
Normal, non-affine, smooth, projective, gorenstein, non-fano, 2-dimensional toric variety without torusfactor
julia> mapping_matrix = matrix(ZZ, [[0, 1]])
[0 1]
julia> grid_morphism = hom(character_lattice(domain), character_lattice(codomain), mapping_matrix)
Map with following data
Domain:
=======
Abelian group with structure: Z
Codomain:
=========
Abelian group with structure: Z^2
julia> toric_morphism(domain, grid_morphism, codomain)
A toric morphism
```

### Special constructors

`toric_identity_morphism`

— Method`toric_identity_morphism(variety::NormalToricVarietyType)`

Construct the toric identity morphism from `variety`

to `variety`

.

**Examples**

```
julia> toric_identity_morphism(hirzebruch_surface(NormalToricVariety, 2))
A toric morphism
```

## Attributes of Toric Morhpisms

### General attributes

`domain`

— Method`domain(tm::ToricMorphism)`

Return the domain of the toric morphism `tm`

.

**Examples**

```
julia> F4 = hirzebruch_surface(NormalToricVariety, 4)
Normal, non-affine, smooth, projective, gorenstein, non-fano, 2-dimensional toric variety without torusfactor
julia> domain(toric_identity_morphism(F4))
Normal, non-affine, smooth, projective, gorenstein, non-fano, 2-dimensional toric variety without torusfactor
```

`image`

— Method`image(F::FreeMod{R}, A::MatElem{R}) where R`

Return the image of `A`

as an object of type `SubquoModule`

with ambient free module `F`

.

**Examples**

```
julia> R, (x,y,z) = polynomial_ring(QQ, ["x", "y", "z"]);
julia> F = free_module(R, 2)
Free module of rank 2 over Multivariate polynomial ring in 3 variables over QQ
julia> A = R[x y; 2*x^2 3*y^2]
[ x y]
[2*x^2 3*y^2]
julia> M = image(F, A)
Submodule with 2 generators
1 -> x*e[1] + y*e[2]
2 -> 2*x^2*e[1] + 3*y^2*e[2]
represented as subquotient with no relations.
julia> ambient_free_module(M) === F
true
```

```
julia> R, _ = polynomial_ring(QQ, ["x", "y", "z"]);
julia> Z = abelian_group(0);
julia> Rg, (x, y, z) = grade(R, [Z[1], Z[1], Z[1]]);
julia> F = graded_free_module(Rg, [8,8])
Graded free module Rg^2([-8]) of rank 2 over Rg
julia> A = Rg[x y; 2*x^2 3*y^2]
[ x y]
[2*x^2 3*y^2]
julia> M = image(F, A)
Graded submodule of F
1 -> x*e[1] + y*e[2]
2 -> 2*x^2*e[1] + 3*y^2*e[2]
represented as subquotient with no relations
julia> ambient_free_module(M) === F
true
julia> degrees_of_generators(M)
2-element Vector{GrpAbFinGenElem}:
Element of Z with components [9]
Element of Z with components [10]
```

`codomain`

— Method`codomain(tm::ToricMorphism)`

Return the codomain of the toric morphism `tm`

.

**Examples**

```
julia> F4 = hirzebruch_surface(NormalToricVariety, 4)
Normal, non-affine, smooth, projective, gorenstein, non-fano, 2-dimensional toric variety without torusfactor
julia> codomain(toric_identity_morphism(F4))
Normal, non-affine, smooth, projective, gorenstein, non-fano, 2-dimensional toric variety without torusfactor
```

`grid_morphism`

— Method`grid_morphism(tm::ToricMorphism)`

Return the underlying grid morphism of the toric morphism `tm`

.

**Examples**

```
julia> F4 = hirzebruch_surface(NormalToricVariety, 4)
Normal, non-affine, smooth, projective, gorenstein, non-fano, 2-dimensional toric variety without torusfactor
julia> grid_morphism(toric_identity_morphism(F4))
Map with following data
Domain:
=======
Abelian group with structure: Z^2
Codomain:
=========
Abelian group with structure: Z^2
```

`morphism_on_torusinvariant_weil_divisor_group`

— Method`morphism_on_torusinvariant_weil_divisor_group(tm::ToricMorphism)`

For a given toric morphism `tm`

, this method computes the corresponding map of the torusinvariant Weil divisors.

**Examples**

```
julia> F4 = hirzebruch_surface(NormalToricVariety, 4)
Normal, non-affine, smooth, projective, gorenstein, non-fano, 2-dimensional toric variety without torusfactor
julia> morphism_on_torusinvariant_weil_divisor_group(toric_identity_morphism(F4))
Map with following data
Domain:
=======
Abelian group with structure: Z^4
Codomain:
=========
Abelian group with structure: Z^4
```

`morphism_on_torusinvariant_cartier_divisor_group`

— Method`morphism_on_torusinvariant_cartier_divisor_group(tm::ToricMorphism)`

For a given toric morphism `tm`

, this method computes the corresponding map of the Cartier divisors.

**Examples**

```
julia> F4 = hirzebruch_surface(NormalToricVariety, 4)
Normal, non-affine, smooth, projective, gorenstein, non-fano, 2-dimensional toric variety without torusfactor
julia> morphism_on_torusinvariant_cartier_divisor_group(toric_identity_morphism(F4))
Map with following data
Domain:
=======
Abelian group with structure: Z^4
Codomain:
=========
Abelian group with structure: Z^4
```

`morphism_on_class_group`

— Method`morphism_on_class_group(tm::ToricMorphism)`

For a given toric morphism `tm`

, this method computes the corresponding map of the Class groups.

**Examples**

```
julia> F4 = hirzebruch_surface(NormalToricVariety, 4)
Normal, non-affine, smooth, projective, gorenstein, non-fano, 2-dimensional toric variety without torusfactor
julia> morphism_on_class_group(toric_identity_morphism(F4))
Map with following data
Domain:
=======
Abelian group with structure: Z^2
Codomain:
=========
Abelian group with structure: Z^2
```

`morphism_on_picard_group`

— Method`morphism_on_picard_group(tm::ToricMorphism)`

For a given toric morphism `tm`

, this method computes the corresponding map of the Picard groups.

**Examples**

```
julia> F4 = hirzebruch_surface(NormalToricVariety, 4)
Normal, non-affine, smooth, projective, gorenstein, non-fano, 2-dimensional toric variety without torusfactor
julia> morphism_on_picard_group(toric_identity_morphism(F4))
Map with following data
Domain:
=======
Abelian group with structure: Z^2
Codomain:
=========
Abelian group with structure: Z^2
```

### Special attributes of toric varieties

To every toric variety $v$ we can associate a special toric variety, the Cox variety. By definition, the Cox variety is such that the mapping matrix of the toric morphism from the Cox variety to the variety $v$ is simply given by the ray generators of the variety $v$. Put differently, if there are exactly $N$ ray generators for the fan of $v$, then the Cox variety of $v$ has a fan for which the ray generators are the standard basis of $\mathbb{R}^N$ and the maximal cones are one to one to the maximal cones of the fan of $v$.

`morphism_from_cox_variety`

— Method`morphism_from_cox_variety(variety::NormalToricVarietyType)`

Return the quotient morphism from the Cox variety to the toric variety in question.

**Examples**

```
julia> F4 = hirzebruch_surface(NormalToricVariety, 4)
Normal, non-affine, smooth, projective, gorenstein, non-fano, 2-dimensional toric variety without torusfactor
julia> morphism_from_cox_variety(F4)
A toric morphism
```

`cox_variety`

— Method`cox_variety(variety::NormalToricVarietyType)`

Return the Cox variety of the toric variety in question.

**Examples**

```
julia> F4 = hirzebruch_surface(NormalToricVariety, 4)
Normal, non-affine, smooth, projective, gorenstein, non-fano, 2-dimensional toric variety without torusfactor
julia> cox_variety(F4)
Normal toric variety
```