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