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