Macaulay2 » Documentation
Packages » SimplicialModules :: arithmetic with simplicial module maps
next | previous | forward | backward | up | index | toc

arithmetic with simplicial module maps -- perform arithmetic operations on simplicial module maps

The set of simplicial module maps forms a module over the underlying ring. These methods implement the basic operations of addition, subtraction, and scalar multiplication.

i1 : R = ZZ/101[a..d];
i2 : C = simplicialModule(freeResolution coker matrix{{a*b, a*c^2, b*c*d^3, a^3}}, Degeneracy => true)

      1      5      13      26
o2 = R  <-- R  <-- R   <-- R  <-- ...
                            
     0      1      2       3

o2 : SimplicialModule
i3 : D = simplicialModule(freeResolution coker matrix{{a*b, a*c^2, b*c*d^3, a^3, a*c*d}}, 3, Degeneracy => true)

      1      6      18      41
o3 = R  <-- R  <-- R   <-- R  <-- ...
                            
     0      1      2       3

o3 : SimplicialModule
i4 : f = randomSimplicialMap(D, C, Cycle => true);
i5 : prune normalize f

          1               1
o5 = 0 : R  <----------- R  : 0
               | -47 |

          5                                                                                          4
     1 : R  <-------------------------------------------------------------------------------------- R  : 1
               {2} | -47 0   0   24a3-36a2b-30a2c+19ac2+19bc2-10c3-29a2d-8acd-22bcd+43c2d-24cd2 |
               {3} | 0   -47 0   -24ab+36b2+30bc+18c2+29bd+15cd                                 |
               {3} | 0   0   -47 -18a2-19ab-19b2+10bc-8ad-5bd-19cd+47d2                         |
               {3} | 0   0   0   -15a2+8ab+22b2+8ac-38bc+19c2+24bd-47cd                         |
               {5} | 0   0   0   -47                                                            |

          7                                                                     4
     2 : R  <----------------------------------------------------------------- R  : 2
               {4} | -47 0   0    -24a2+36ab+30ac+39c2+29ad+43cd           |
               {4} | 0   -47 -28d 43a2-19ab+10ac+29ad-38bd-16cd+39d2       |
               {4} | 0   0   28c  -35a2+22ab+29ac+38bc+16c2+24ad-39cd-47d2 |
               {4} | 0   0   -28b 21a2+34ab-38b2+19ac-16bc-47ad+39bd       |
               {5} | 0   0   -47  -18a+39b+13d                             |
               {5} | 0   0   0    -15a+43b-13c                             |
               {6} | 0   0   0    -47                                      |

          4                    1
     3 : R  <---------------- R  : 3
               {5} | -28b |
               {6} | -47  |
               {6} | 0    |
               {6} | 0    |

o5 : ComplexMap
i6 : g = randomSimplicialMap(D, C, Boundary => true);
i7 : prune normalize g

          5                                                                                    4
o7 = 1 : R  <-------------------------------------------------------------------------------- R  : 1
               {2} | 0 0 0 -38a3-2a2b-16a2c-45ac2+34bc2+48c3-22a2d-47acd-19bcd-38c2d-7cd2 |
               {3} | 0 0 0 38ab+2b2+16bc+17c2+22bd+11cd                                   |
               {3} | 0 0 0 -17a2+45ab-34b2-48bc-15ad-24bd-39cd-43d2                       |
               {3} | 0 0 0 -11a2+47ab+19b2+15ac-39bc+39c2+7bd+43cd                        |
               {5} | 0 0 0 0                                                              |

          7                                                            4
     2 : R  <-------------------------------------------------------- R  : 2
               {4} | 0 0 0    38a2+2ab+16ac-38c2+22ad+33cd        |
               {4} | 0 0 48d  -18a2-34ab-48ac-47ad+36bd+35cd+11d2 |
               {4} | 0 0 -48c 14a2+19ab-16ac-36bc-35c2+7ad-11cd   |
               {4} | 0 0 48b  -25a2-23ab+36b2+39ac+35bc+43ad+11bd |
               {5} | 0 0 0    -17a-38b-40d                        |
               {5} | 0 0 0    -11a+33b+40c                        |
               {6} | 0 0 0    0                                   |

          4                   1
     3 : R  <--------------- R  : 3
               {5} | 48b |
               {6} | 0   |
               {6} | 0   |
               {6} | 0   |

o7 : ComplexMap
i8 : f+g;
i9 : isSimplicialMorphism oo

o9 = true
i10 : f-g;
i11 : isSimplicialMorphism oo

o11 = true
i12 : -f;
i13 : 3*f;
i14 : 0*f

o14 = 0

o14 : SimplicialModuleMap
i15 : a*f;
i16 : assert(0*f == 0)
i17 : assert(1*f == f)
i18 : assert((-1)*f == -f)
i19 : assert(-(f-g) == g-f)
i20 : assert((a+b)*f == a*f + b*f)
i21 : assert(a*(f+g) == a*f + a*g)
i22 : assert isSimplicialMorphism (f+g)

Adding or subtracting a scalar is the same as adding or subtracting the scalar multiple of the identity. In particular, the source and target must be equal.

i23 : h = randomSimplicialMap(C, C);
i24 : prune normalize h

           1              1
o24 = 0 : R  <---------- R  : 0
                | 11 |

           4                                                                                                                                                              4
      1 : R  <---------------------------------------------------------------------------------------------------------------------------------------------------------- R  : 1
                {2} | 46 -28a+b-3c+22d -7a+2b+29c-47d -13a3-10a2b+39ab2-20b3+30a2c+27abc+24b2c+32ac2-48bc2-18a2d-22abd-30b2d-9acd-15bcd+33c2d-32ad2+39bd2-49cd2-33d3 |
                {3} | 0  -47           15             -19a2+17ab-39b2-20ac+36bc-39c2+44ad+9bd+4cd+13d2                                                               |
                {3} | 0  -23           -37            -26a2+22ab-8b2-49ac+43bc+36c2-11ad-8bd-3cd-22d2                                                                |
                {5} | 0  0             0              -30                                                                                                            |

           4                                                                                        4
      2 : R  <------------------------------------------------------------------------------------ R  : 2
                {4} | 41 -28 35a-9b-35c+6d  -41a2-49ab+30b2-13ac-47bc-40c2+4ad+27bd+37cd-35d2  |
                {4} | 16 -6  40a+3b-31c+25d -31a2-39ab-29b2-31ac-48bc-37c2-48ad+30bd+47cd-49d2 |
                {5} | 0  0   -2             28a-18b+46c+d                                      |
                {6} | 0  0   0              40                                                 |

           1                   1
      3 : R  <--------------- R  : 3
                {6} | -22 |

o24 : ComplexMap
i25 : prune normalize(h+1)

           1              1
o25 = 0 : R  <---------- R  : 0
                | 12 |

           4                                                                                                                                                              4
      1 : R  <---------------------------------------------------------------------------------------------------------------------------------------------------------- R  : 1
                {2} | 47 -28a+b-3c+22d -7a+2b+29c-47d -13a3-10a2b+39ab2-20b3+30a2c+27abc+24b2c+32ac2-48bc2-18a2d-22abd-30b2d-9acd-15bcd+33c2d-32ad2+39bd2-49cd2-33d3 |
                {3} | 0  -46           15             -19a2+17ab-39b2-20ac+36bc-39c2+44ad+9bd+4cd+13d2                                                               |
                {3} | 0  -23           -36            -26a2+22ab-8b2-49ac+43bc+36c2-11ad-8bd-3cd-22d2                                                                |
                {5} | 0  0             0              -29                                                                                                            |

           4                                                                                        4
      2 : R  <------------------------------------------------------------------------------------ R  : 2
                {4} | 42 -28 35a-9b-35c+6d  -41a2-49ab+30b2-13ac-47bc-40c2+4ad+27bd+37cd-35d2  |
                {4} | 16 -5  40a+3b-31c+25d -31a2-39ab-29b2-31ac-48bc-37c2-48ad+30bd+47cd-49d2 |
                {5} | 0  0   -1             28a-18b+46c+d                                      |
                {6} | 0  0   0              41                                                 |

           1                   1
      3 : R  <--------------- R  : 3
                {6} | -21 |

o25 : ComplexMap
i26 : assert(h+1 == h + id_C)
i27 : assert(h+a == h + a*id_C)
i28 : assert(1-h == id_C - h)
i29 : assert(b-c*h == -c*h + b*id_C)
i30 : assert(b-h*c == -h*c + id_C*b)

See also


The source of this document is in /build/reproducible-path/macaulay2-1.26.05+ds/M2/Macaulay2/packages/SimplicialModules/SimplicialModuleDOC.m2:2590:0.