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