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