-- -*- M2-comint -*- hash: 8094504995832320213

i1 : PP2 = toricProjectiveSpace 2;

i2 : A1 = fromWDivToCl PP2

o2 = | 1 1 1 |

              1       3
o2 : Matrix ZZ  <-- ZZ

i3 : assert ( (target A1, source A1) === (classGroup PP2, weilDivisorGroup PP2) )

i4 : assert ( A1 * matrix rays PP2 == 0)

i5 : X = weightedProjectiveSpace {1,2,2,3,4};

i6 : A2 = fromWDivToCl X

o6 = | 1 2 2 3 4 |

              1       5
o6 : Matrix ZZ  <-- ZZ

i7 : assert ( (target A2, source A2) === (classGroup X, weilDivisorGroup X) )

i8 : assert ( A2 * matrix rays X == 0)

i9 : Y = normalToricVariety ( id_(ZZ^3) | - id_(ZZ^3));

i10 : A3 = fromWDivToCl Y

o10 = | 1  0  1  0 0 0 0 0 |
      | 1  1  0  0 0 0 0 0 |
      | 1  -1 -1 1 0 0 0 0 |
      | -1 1  1  0 1 0 0 0 |
      | 0  0  1  0 0 1 0 0 |
      | 0  1  0  0 0 0 1 0 |
      | 1  0  0  0 0 0 0 1 |

o10 : Matrix

i11 : classGroup Y

o11 = cokernel | 2 0 |
               | 0 2 |
               | 0 0 |
               | 0 0 |
               | 0 0 |
               | 0 0 |
               | 0 0 |

                               7
o11 : ZZ-module, quotient of ZZ

i12 : assert ( (target A3, source A3) === (classGroup Y, weilDivisorGroup Y) )

i13 : assert ( A3 * matrix rays Y == 0)

i14 : U = normalToricVariety ({{4,-1},{0,1}},{{0,1}});

i15 : A4 = fromWDivToCl U

o15 = | -1 -1 |

o15 : Matrix

i16 : classGroup U

o16 = cokernel | 4 |

                               1
o16 : ZZ-module, quotient of ZZ

i17 : assert ( (target A4, source A4) === (classGroup U, weilDivisorGroup U) )

i18 : assert ( A4 * matrix rays U == 0)

i19 : assert ( transpose matrix degrees ring PP2 === fromWDivToCl PP2)

i20 : assert ( transpose matrix degrees ring X === fromWDivToCl X)

i21 : 
