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 | 15x-48y 48x+19y 15x+16y -49x-44y 9x+48y -39x-37y 8x+42y 23x-31y |
| -48x-29y 46x-33y 37x-42y 43x+23y 4x-31y -26x+45y -43x+46y -28x-44y |
| 42x-46y 20x-19y 23x+48y -33x-38y -15x+24y 40x+8y -50x-25y -40x-48y |
| 36x-10y -44x-45y -27x+45y -24x-39y -21x+21y 41x+48y -48x-48y -50x-50y |
| -10x+10y 9x+5y -45x+43y 43x+29y 39x-41y 44x+11y -6x-33y -44x-45y |
5
o3 : R-module, quotient of R
|
i4 : (N,f) = decomposeModule M
o4 = (cokernel | y x 0 0 0 0 0 0 |, | 16 35 30 -35 -27 |)
| 0 0 x 0 y 0 0 0 | | 40 28 24 -18 18 |
| 0 0 0 y x 0 0 0 | | -2 -2 46 9 -38 |
| 0 0 0 0 0 x 0 y | | 39 39 2 -9 -46 |
| 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
|