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