Let X and Y be normal toric varieties whose underlying lattices are NX and NY respectively. Every toric map f : X →Y corresponds to a unique map g : NX →NY of lattices such that, for any cone σ in the fan of X, there is a cone in the fan of Y that contains the image g(σ). 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: