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