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. Given the target, the source, and the matrix representing lattice map, this basic constructor creates the corresponding toric map.
We illustrate how to construct 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 : assert (isWellDefined f and source f === X and target f === Y and matrix f === matrix {{1, 0}}) |
Our second example makes the projection from the blow-up of the origin in the affine plane to the affine plane is proper.
i5 : A = affineSpace 2; |
i6 : max A o6 = {{0, 1}} o6 : List |
i7 : B = toricBlowup({0, 1}, A); |
i8 : g = B^[] o8 = | 1 0 | | 0 1 | o8 : ToricMap A <--- B |
i9 : isProper g o9 = true |
i10 : assert (isWellDefined g and g == map(A,B,1) and matrix g === id_(ZZ^2) and isProper g) |
This method does not check that the given matrix determines a map of toric varieties. In particular, it assumes that the image of each cone in the source is contained in a cone in the target. One can verify this by using isWellDefined(ToricMap).