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