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