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