next | previous | forward | backward | up | top | index | toc | Macaulay2 website
Complexes :: Complex == Complex

Complex == Complex -- whether two complexes are equal

Synopsis

Description

Two complexes are equal if the corresponding objects and corresponding maps at each index are equal.

i1 : S = ZZ/101[a..c]

o1 = S

o1 : PolynomialRing
i2 : C = freeResolution coker vars S

      1      3      3      1
o2 = S  <-- S  <-- S  <-- S
                           
     0      1      2      3

o2 : Complex
i3 : D = C[3][-3]

      1      3      3      1
o3 = S  <-- S  <-- S  <-- S
                           
     0      1      2      3

o3 : Complex
i4 : C === D

o4 = false
i5 : C == D

o5 = true

Both the maps and the objects must be equal.

i6 : (lo,hi) = concentration C

o6 = (0, 3)

o6 : Sequence
i7 : E = complex for i from lo+1 to hi list 0*dd^C_i

      1      3      3      1
o7 = S  <-- S  <-- S  <-- S
                           
     0      1      2      3

o7 : Complex
i8 : dd^E

          1         3
o8 = 0 : S  <----- S  : 1
               0

          3         3
     1 : S  <----- S  : 2
               0

          3         1
     2 : S  <----- S  : 3
               0

o8 : ComplexMap
i9 : C == E

o9 = false
i10 : E == 0

o10 = false

A complex is equal to zero if all the objects and maps are zero. This could require computation to determine if something that is superficially not zero is in fact zero.

i11 : f = id_C

           1             1
o11 = 0 : S  <--------- S  : 0
                | 1 |

           3                     3
      1 : S  <----------------- S  : 1
                {1} | 1 0 0 |
                {1} | 0 1 0 |
                {1} | 0 0 1 |

           3                     3
      2 : S  <----------------- S  : 2
                {2} | 1 0 0 |
                {2} | 0 1 0 |
                {2} | 0 0 1 |

           1                 1
      3 : S  <------------- S  : 3
                {3} | 1 |

o11 : ComplexMap
i12 : D = coker f

o12 = cokernel | 1 | <-- cokernel {1} | 1 0 0 | <-- cokernel {2} | 1 0 0 | <-- cokernel {3} | 1 |
                                  {1} | 0 1 0 |              {2} | 0 1 0 |      
      0                           {1} | 0 0 1 |              {2} | 0 0 1 |     3
                                                     
                         1                          2

o12 : Complex
i13 : D == 0

o13 = true
i14 : C0 = complex S^0

o14 = 0
       
      0

o14 : Complex
i15 : C1 = C0[4]

o15 = 0
       
      -4

o15 : Complex
i16 : concentration C0 == concentration C1

o16 = false
i17 : C0 == C1

o17 = true
i18 : C0 == 0

o18 = true
i19 : C1 == 0

o19 = true

Testing for equality is not the same testing for isomorphism. In particular, different presentations of a complex need not be equal.

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

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

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

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

              3       2
o22 : Matrix R  <--- R
i23 : C = complex {f0, f1}

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

o23 : Complex
i24 : HH C != complex coker f0

o24 = true
i25 : prune HH C == complex coker f0

o25 = true

Caveat