Macaulay2 » Documentation
Packages » Complexes :: isWellDefined(Complex)
next | previous | forward | backward | up | index | toc

isWellDefined(Complex) -- whether a complex is well-defined

Synopsis

Description

This routine checks that the differential of C composes to zero. Additionally, it checks that the underlying data in C is a properly formed Complex object in Macaulay2. If the variable debugLevel is set to a value greater than zero, then information about the nature of any failure is displayed.

As a first example, we construct by hand the free resolution of the twisted cubic. One must work with maps rather than matrices, because the source and the target of adjacent maps must be the same (including degree information).

i1 : R = QQ[a..d];
i2 : f0 = matrix {{-b^2+a*c, b*c-a*d, -c^2+b*d}}

o2 = | -b2+ac bc-ad -c2+bd |

             1      3
o2 : Matrix R  <-- R
i3 : f1 = map(source f0,, {{d, c}, {c, b}, {b, a}})

o3 = {2} | d c |
     {2} | c b |
     {2} | b a |

             3      2
o3 : Matrix R  <-- R
i4 : C = complex {f0, f1}

      1      3      2
o4 = R  <-- R  <-- R
                    
     0      1      2

o4 : Complex
i5 : isWellDefined C

o5 = true
i6 : dd^C

          1                               3
o6 = 0 : R  <--------------------------- R  : 1
               | -b2+ac bc-ad -c2+bd |

          3                   2
     1 : R  <--------------- R  : 2
               {2} | d c |
               {2} | c b |
               {2} | b a |

o6 : ComplexMap
i7 : (dd^C)^2

o7 = 0

o7 : ComplexMap

The zero complex is well-defined.

i8 : C = complex R^0

o8 = 0
      
     0

o8 : Complex
i9 : isWellDefined C

o9 = true

The next example demonstrates the case when the sequence maps do not compose to 0.

i10 : g1 = map(source f0,, {{-d, c}, {c, b}, {b, a}})

o10 = {2} | -d c |
      {2} | c  b |
      {2} | b  a |

              3      2
o10 : Matrix R  <-- R
i11 : C = complex {f0, g1}

       1      3      2
o11 = R  <-- R  <-- R
                     
      0      1      2

o11 : Complex
i12 : isWellDefined C

o12 = false
i13 : debugLevel = 1

o13 = 1
i14 : isWellDefined C
-- expected maps in the differential to compose to zero 
--   differentials at indices (2, 1) fail this condition

o14 = false
i15 : (dd^C)^2

           1                       2
o15 = 0 : R  <------------------- R  : 2
                | 2b2d-2acd 0 |

o15 : ComplexMap

See also

Ways to use this method: