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