This function decomposes a module into a direct sum of simple modules, given some fairly strong assumptions on the ring which acts on the ring which acts on the module. This ring must only have two variables, and the square of each of those variables must kill the module.
i1 : Q = ZZ/101[x,y]
o1 = Q
o1 : PolynomialRing
|
i2 : R = Q/(x^2,y^2)
o2 = R
o2 : QuotientRing
|
i3 : M = coker random(R^5, R^8 ** R^{-1})
o3 = cokernel | 29x-41y -26x-38y -48x+5y 14y -43x+14y 22x-29y 36x-46y -44x-3y |
| 30x-33y -50x-19y 41x-24y 32x 32x+29y 32x+18y 17x-24y 33x-12y |
| -45x+47y 33x-24y -19x-26y 47x-38y 38x+22y 16x+22y -19x-19y 4x-47y |
| -26x-48y -38x+13y 2x-32y -30x-38y -32x+15y 47x-26y 33x-21y -32x-22y |
| -2x+21y -25x-12y 47x+32y 35x-48y 31x+17y 48x-31y -2x+3y -27x+10y |
5
o3 : R-module, quotient of R
|
i4 : (N,f) = decomposeModule M
o4 = (cokernel | y x 0 0 0 0 0 0 |, | -43 0 -6 3 -19 |)
| 0 0 x 0 y 0 0 0 | | -5 -18 -21 36 -17 |
| 0 0 0 y x 0 0 0 | | 30 42 -26 -39 35 |
| 0 0 0 0 0 x 0 y | | 34 -25 -10 41 -47 |
| 0 0 0 0 0 0 y x | | 1 0 0 0 0 |
o4 : Sequence
|
i5 : components N
o5 = {cokernel | y x |, cokernel | x 0 y |, cokernel | x 0 y |}
| 0 y x | | 0 y x |
o5 : List
|
i6 : ker f == 0
o6 = true
|
i7 : coker f == 0
o7 = true
|