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