Use the function resolution, often abbreviated as res, to compute a free resolution of a module.
i1 : R = QQ[x..z]; |
i2 : M = cokernel vars R |
i3 : C = res M |
See chain complexes for further details about how to handle and examine the result.
A reference to the result is stored within the module M, so that requesting a computation of res M a second time yields the formerly computed result immediately.
If the computation is interrupted or discontinued after the skeleton has been successfully computed, then the partially completed resolution is available as M.resolution, and can be examined with status. The computation can be continued with res M. Here is an example, with an alarm interrupting the computation several times before it's complete. (On my machine, the computation takes a total of 14 seconds.)
i4 : R = ZZ/2[a..d]; |
i5 : M = coker random(R^4, R^{5:-3,6:-4}); |
i6 : while true do try ( |
If the user has a chain complex in hand which is known to be a projective resolution of M, then it can be installed with M.resolution = C.
There are various optional arguments associated with res which allow detailed control over the progress of the computation.