-- -*- M2-comint -*- hash: 3667766987736846977

i1 : V={{0,1},{1,0},{0,-1},{-1,0}};

i2 : F={{0,1,2},{0,2,3}};--two triangles meeting along an edge

i3 : R=QQ[x,y];

i4 : M=splineModule(V,F,1,BaseRing=>R,Homogenize=>false);--create spline module

i5 : phi=ringStructure(M)

              QQ[e ..e , x..y]
                  0   1                                                   2
o5 = map (------------------------, QQ[Y ..Y ], {e x + e x, e y + e y, e x })
                  2        2            0   2     0     1    0     1    0
          (e e , e  - e , e  - e )
            0 1   0    0   1    1

                 QQ[e ..e , x..y]
                     0   1
o5 : RingMap ------------------------ <-- QQ[Y ..Y ]
                     2        2               0   2
             (e e , e  - e , e  - e )
               0 1   0    0   1    1

i6 : T=target phi;

i7 : describe T --direct sum of two copies of R, one for each face; e_i corresponds to the face F_i

         QQ[e ..e , x..y]
             0   1
o7 = ------------------------
             2        2
     (e e , e  - e , e  - e )
       0 1   0    0   1    1

i8 : H=source phi;

i9 : describe H --polynomial ring in three variables, one for each generator of R and each (non-identity) generator of M

o9 = QQ[Y ..Y , Degrees => {2:1, 2}, Heft => {1}, MonomialOrder => {MonomialSize => 32 }]
         0   2                                                     {GRevLex => {2:1, 2}}
                                                                   {Position => Up     }

i10 : scan(3,i->print phi(H_i))--these are the splines the variables map to
e x + e x
 0     1
e y + e y
 0     1
   2
e x
 0

i11 : degrees H --degrees of variables are same as degrees of generators of M

o11 = {{1}, {1}, {2}}

o11 : List

i12 : I=ker phi--the ideal of relations among generators

             2      2
o12 = ideal(Y Y  - Y )
             0 2    2

o12 : Ideal of H

i13 : reduceHilbert(hilbertSeries (H/I))--cokernel of phi has the same graded structure as M

            2
       1 + T
o13 = --------
             2
      (1 - T)

o13 : Expression of class Divide

i14 : reduceHilbert(hilbertSeries M)

            2
       1 + T
o14 = --------
             2
      (1 - T)

o14 : Expression of class Divide

i15 : V={{0,0},{0,1},{-1,-1},{1,0}};

i16 : F={{0,1,2},{0,2,3},{0,1,3}};--three triangles meeting at (and surrounding) a vertex

i17 : R=QQ[x,y];

i18 : M=splineModule(V,F,0,BaseRing=>R,Homogenize=>false);

i19 : phi = ringStructure(M);

                             QQ[e ..e , x..y]
                                 0   2
o19 : RingMap --------------------------------------------- <-- QQ[Y ..Y ]
                                  2        2        2               0   3
              (e e , e e , e e , e  - e , e  - e , e  - e )
                0 1   0 2   1 2   0    0   1    1   2    2

i20 : ker phi --notice a generator involves an isolated variable

                                  2
o20 = ideal (Y Y  - Y Y , Y Y  - Y  - Y )
              1 3    2 3   0 2    2    3

o20 : Ideal of QQ[Y ..Y ]
                   0   3

i21 : phi' = ringStructure(M,Trim=>true);

                             QQ[e ..e , x..y]
                                 0   2
o21 : RingMap --------------------------------------------- <-- QQ[Y ..Y ]
                                  2        2        2               0   2
              (e e , e e , e e , e  - e , e  - e , e  - e )
                0 1   0 2   1 2   0    0   1    1   2    2

i22 : ker phi' --now all variables correspond to irredundant generators

                        2      2    3
o22 = ideal(Y Y Y  - Y Y  - Y Y  + Y )
             0 1 2    0 2    1 2    2

o22 : Ideal of QQ[Y ..Y ]
                   0   2

i23 : f = (ker phi')_0

                  2      2    3
o23 = Y Y Y  - Y Y  - Y Y  + Y
       0 1 2    0 2    1 2    2

o23 : QQ[Y ..Y ]
          0   2

i24 : sub(f,{Y_0=>Y_0-Y_1,Y_1=>Y_0-Y_2,Y_2=>Y_0})

o24 = Y Y Y
       0 1 2

o24 : QQ[Y ..Y ]
          0   2

i25 : E={{0,1},{1,2},{0,2}};

i26 : S=QQ[x,y];

i27 : I={y-x^2,x+y^2,y-x^3};

i28 : C0=generalizedSplines(E,I);--splines on a non-linear partition

i29 : ringStructure(C0)

                          QQ[e ..e , x..y]
                              0   2                                                                           4       3 2      4      3        2      3                      3      2         2      2       4       3 2      4      3        2      3                      3      2         2       3      2                5      4       3       3      2         2      2            2 2      3        2      2       5      4       3       3      2         2      2            2 2      3        2      2
o29 = map (---------------------------------------------, QQ[Y ..Y ], {e x + e x + e x, e y + e y + e y, - e x y - e x y  - e x  - e x  + e x*y  + e y  + e x*y + e y - e x*y  - e x y + e x*y  + e x , - e x y + e x y  + e x  - e x  + e x*y  - e y  - e x*y + e y + e x*y  + e x y + e x*y  - 2e y  + e x  - 2e x*y, - e x  - e x y + e x y - e x  + e x y + e x*y  - e y  + e y - e x y  - e x  + e x*y  + e x , - e x  + e x y + e x y + e x  + e x y - e x*y  - e y  - e y + e x y  + e x  - e x*y  - e x })
                               2        2        2            0   5     0     1     2    0     1     2      0       0        0      0      0        0      0       0     1        1       1        1       0       0        0      0      0        0      0       0     1        1       1         1      1       1        0      0       0       0      0       0        0      0     1        1      1        1       0      0       0       0      0       0        0      0     1        1      1        1
           (e e , e e , e e , e  - e , e  - e , e  - e )
             0 1   0 2   1 2   0    0   1    1   2    2

                             QQ[e ..e , x..y]
                                 0   2
o29 : RingMap --------------------------------------------- <-- QQ[Y ..Y ]
                                  2        2        2               0   5
              (e e , e e , e e , e  - e , e  - e , e  - e )
                0 1   0 2   1 2   0    0   1    1   2    2

i30 : 
