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