Finds the torsion submodule of a given module. It does this by computing the kernel of the map from M1 to its double dual
i1 : R = QQ[x,y] o1 = R o1 : PolynomialRing |
i2 : m = ideal(x,y) o2 = ideal (x, y) o2 : Ideal of R |
i3 : M = (R^1/m) ++ R^1
o3 = cokernel | x y |
| 0 0 |
2
o3 : R-module, quotient of R
|
i4 : prune torsionSubmodule M
o4 = cokernel | y x |
1
o4 : R-module, quotient of R
|