Two toric maps are equal if their three defining attributes (namely source, target, and underlying matrix) are the same.
We illustrate this test with the projection from a blow-up at a point in the projective plane to the projective plane and various identity maps.
i1 : Y = toricProjectiveSpace 2; |
i2 : X = toricBlowup({0, 2}, Y); |
i3 : f = X^[] o3 = | 1 0 | | 0 1 | o3 : ToricMap Y <--- X |
i4 : assert (isWellDefined f and f == map(Y, X, 1)) |
i5 : g = id_X o5 = | 1 0 | | 0 1 | o5 : ToricMap X <--- X |
i6 : assert (g == map(X, X, 1)) |
i7 : assert (f != g) |
i8 : assert (isWellDefined g and source g === X and target g === X) |
i9 : assert (matrix f == matrix g and source f === source g and target f =!= target g) |
The second example shows that we can have more than one well-defined toric map with the same source and target.
i10 : Z = toricProjectiveSpace 1; |
i11 : pi1 = map(Z, X, matrix{{0, 1}}) o11 = | 0 1 | o11 : ToricMap Z <--- X |
i12 : assert (isWellDefined pi1 and source pi1 === X and target pi1 === Z) |
i13 : pi2 = map(Z, X, matrix{{0, 2}}) o13 = | 0 2 | o13 : ToricMap Z <--- X |
i14 : assert (isWellDefined pi2 and source pi2 === X and target pi2 === Z) |
i15 : assert (pi1 != pi2) |