-- -*- M2-comint -*- hash: 9324756748383455234

i1 : A = affineSpace 2;

i2 : P = toricProjectiveSpace 2;

i3 : f = map(P, A, 1)

o3 = | 1 0 |
     | 0 1 |

o3 : ToricMap P <--- A

i4 : isDominant f

o4 = true

i5 : isSurjective f

o5 = false

i6 : assert (isWellDefined f and isDominant f and not isSurjective f)

i7 : X = toricProjectiveSpace 1;

i8 : g = map(P, X, matrix{{2}, {1}})

o8 = | 2 |
     | 1 |

o8 : ToricMap P <--- X

i9 : isDominant g

o9 = false

i10 : I = ideal g

                    2
o10 = ideal(x x  - x )
             0 1    2

o10 : Ideal of QQ[x ..x ]
                   0   2

i11 : assert (isWellDefined g and not isDominant g and codim I === 1)

i12 : 
