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 = | 4 1 6 1 |
     | 2 5 4 8 |
     | 7 7 5 9 |
     | 5 5 1 1 |
     | 3 9 6 8 |
     | 2 6 8 0 |

              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 (| 8  3  48 21  |, | 88  195  0 105 |)
                  | 4  15 32 168 |  | 44  975  0 840 |
                  | 14 21 40 189 |  | 154 1365 0 945 |
                  | 10 15 8  21  |  | 110 975  0 105 |
                  | 6  27 48 168 |  | 66  1755 0 840 |
                  | 4  18 64 0   |  | 44  1170 0 0   |

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

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

o3 : Expression of class Sum