-- -*- M2-comint -*- hash: 4157960086568975135

i1 : A = affineSpace 4;

i2 : P = toricProjectiveSpace 4;

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

o3 = | 1 0 0 0 |
     | 0 1 0 0 |
     | 0 0 1 0 |
     | 0 0 0 1 |

o3 : ToricMap P <--- A

i4 : ideal iota

o4 = ideal 0

o4 : Ideal of QQ[x ..x ]
                  0   4

i5 : assert (isWellDefined iota and ideal iota == 0)

i6 : X = toricProjectiveSpace 1;

i7 : Y = toricProjectiveSpace 3;

i8 : f = map(Y, X, matrix{{1}, {2}, {3}})

o8 = | 1 |
     | 2 |
     | 3 |

o8 : ToricMap Y <--- X

i9 : S = ring Y;

i10 : I = ideal f

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

o10 : Ideal of S

i11 : assert (isWellDefined f and isHomogeneous I and
          I == saturate(I, ideal Y) and I == ker inducedMap f and
          I == minors(2, matrix{{S_0, S_1, S_2}, {S_1, S_2, S_3}}))

i12 : (Y2 = Y ** Y, R = ring Y2);

i13 : g = diagonalToricMap(Y, 2);

o13 : ToricMap Y2 <--- Y

i14 : J = ideal g

o14 = ideal (x x  - x x , x x  - x x , x x  - x x , x x  - x x , x x  - x x ,
              3 6    2 7   3 5    1 7   2 5    1 6   3 4    0 7   2 4    0 6 
      -----------------------------------------------------------------------
      x x  - x x )
       1 4    0 5

o14 : Ideal of R

i15 : assert (isWellDefined g and isHomogeneous J and
          J == saturate(J, ideal Y2) and
          J == minors(2, matrix{{R_0,R_1,R_2,R_3},{R_4,R_5,R_6,R_7}}))

i16 : 
