next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
Macaulay2Doc :: factor(Module)

factor(Module) -- factor a ZZ-module

Synopsis

Description

The ring of M must be ZZ.

In the following example we construct a module with a known (but disguised) factorization.

i1 : f = random(ZZ^6, ZZ^4)

o1 = | 3 0 8 2 |
     | 2 1 6 0 |
     | 2 5 9 1 |
     | 9 6 4 1 |
     | 6 9 1 9 |
     | 9 2 0 8 |

              6        4
o1 : Matrix ZZ  <--- ZZ
i2 : M = subquotient ( f * diagonalMatrix{2,3,8,21}, f * diagonalMatrix{2*11,3*5*13,0,21*5} )

o2 = subquotient (| 6  0  64 42  |, | 66  0    0 210 |)
                  | 4  3  48 0   |  | 44  195  0 0   |
                  | 4  15 72 21  |  | 44  975  0 105 |
                  | 18 18 32 21  |  | 198 1170 0 105 |
                  | 12 27 8  189 |  | 132 1755 0 945 |
                  | 18 6  0  168 |  | 198 390  0 840 |

                                 6
o2 : ZZ-module, subquotient of ZZ
i3 : factor M

          ZZ   ZZ    ZZ
o3 = ZZ + -- + -- + ----
           5   11   5*13

o3 : Expression of class Sum