-- -*- M2-comint -*- hash: 9206258828560595183

i1 : P5 = ZZ/101[x_0..x_5]

o1 = P5

o1 : PolynomialRing

i2 : P2 = ZZ/101[a,b,c]

o2 = P2

o2 : PolynomialRing

i3 : fourpoints = {
         {0,0,1},
         {1,0,0},
         {0,1,0},
         {1,1,1}}

o3 = {{0, 0, 1}, {1, 0, 0}, {0, 1, 0}, {1, 1, 1}}

o3 : List

i4 : fourPointsIdeals = apply (fourpoints, L -> fromCoordinates(L,P2))

o4 = {ideal (a, b), ideal (b, c), ideal (a, c), ideal (- a + b, - a + c)}

o4 : List

i5 : nodes = intersect apply(fourPointsIdeals, p -> p)

o5 = ideal (a*c - b*c, a*b - b*c)

o5 : Ideal of P2

i6 : sings' = intersect apply(fourPointsIdeals, p -> p^2)

             2 2         2    2 2   2         2         2    2 2   2 2  
o6 = ideal (a c  - 2a*b*c  + b c , a b*c - a*b c - a*b*c  + b c , a b  -
     ------------------------------------------------------------------------
         2     2 2
     2a*b c + b c )

o6 : Ideal of P2

i7 : C0 = P2/(ideal random(6, sings'))

o7 = C0

o7 : QuotientRing

i8 : sings = sub (sings', C0)

             2 2         2    2 2   2         2         2    2 2   2 2  
o8 = ideal (a c  - 2a*b*c  + b c , a b*c - a*b c - a*b*c  + b c , a b  -
     ------------------------------------------------------------------------
         2     2 2
     2a*b c + b c )

o8 : Ideal of C0

i9 : conductor C0 == sub(nodes, C0)

o9 = true

i10 : B' = gens image basis (3,nodes)

o10 = | a2c-abc abc-b2c ac2-bc2 a2b-abc ab2-b2c abc-bc2 |

               1       6
o10 : Matrix P2  <-- P2

i11 : B = sub(B',C0);

               1       6
o11 : Matrix C0  <-- C0

i12 : canonicalSeries(C0) == B

o12 = true

i13 : X = projectiveImage B'

o13 = X

o13 : QuotientRing

i14 : C = projectiveImage B

o14 = C

o14 : QuotientRing

i15 : betti res ideal C

             0 1  2 3 4
o15 = total: 1 6 10 6 1
          0: 1 .  . . .
          1: . 6  5 . .
          2: . .  5 6 .
          3: . .  . . 1

o15 : BettiTally

i16 : betti res ideal X

             0 1 2 3
o16 = total: 1 5 5 1
          0: 1 . . .
          1: . 5 5 .
          2: . . . 1

o16 : BettiTally

i17 : isSubset(sub(ideal X, ring ideal C), ideal C)

o17 = true

i18 : 
