# isWellDefined(ToricMap) -- whether a toric map is well defined

## Synopsis

• Function: isWellDefined
• Usage:
isWellDefined f
• Inputs:
• f, ,
• Outputs:
• , that is true if the underlying linear map determines a toric map

## Description

Let $X$ and $Y$ be normal toric varieties whose underlying lattices are $N_X$ and $N_Y$ respectively. Every toric map $f : X \to Y$ corresponds to a unique map $g : N_X \to N_Y$ of lattices such that, for any cone $\sigma$ in the fan of $X$, there is a cone in the fan of $Y$ that contains the image $g(\sigma)$. For more information on this correspondence, see Theorem 3.3.4 in Cox-Little-Schenck's Toric Varieties. This method determines whether the underlying map of lattices defines a toric map.

We illustrate this test with the projection from the second Hirzebruch surface to the projective line.

 i1 : X = hirzebruchSurface 2; i2 : Y = toricProjectiveSpace 1; i3 : f = map (Y, X, matrix {{1, 0}}) o3 = | 1 0 | o3 : ToricMap Y <--- X i4 : source f o4 = X o4 : NormalToricVariety i5 : target f o5 = Y o5 : NormalToricVariety i6 : matrix f o6 = | 1 0 | 1 2 o6 : Matrix ZZ <--- ZZ i7 : assert (isWellDefined f and source f === X and target f === Y and matrix f === matrix {{1, 0}})

The second example illustrates two attempts to define a toric map from the projective plane to a weighted projective space. The first, corresponding to the identity on the lattices, is not well-defined. The second, corresponding to a stretch in the lattices, is well-defined. By making the current debugging level greater than one, one gets some addition information about the nature of the failure.

 i8 : debugLevel = 1; i9 : Z = toricProjectiveSpace 2; i10 : W = weightedProjectiveSpace {1, 1, 2}; i11 : g = map (W, Z, 1) o11 = | 1 0 | | 0 1 | o11 : ToricMap W <--- Z i12 : assert not isWellDefined g -- expected image of each maximal cone to be contained in some maximal cone i13 : h = map (W, Z, matrix {{1, 0}, {0, 2}}) o13 = | 1 0 | | 0 2 | o13 : ToricMap W <--- Z i14 : assert isWellDefined h

This method also checks the following aspects of the data structure:

• the underlying HashTable has the expected keys, namely source, target, matrix, and cache,
• the value of the source key is a NormalToricVariety,
• the value of the target key is a NormalToricVariety,
• the value of the matrix key is a Matrix,
• the underling ring of the matrix is ZZ,
• the rank of the source of the matrix equal dimension of the source variety,
• the rank of the target of the matrix equal dimension of the target variety,
• the value of the cache key is a CacheTable.