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
o2 = cokernel | x y z |
1
o2 : R-module, quotient of R
|
i3 : C = res M
1 3 3 1
o3 = R <-- R <-- R <-- R <-- 0
0 1 2 3 4
o3 : ChainComplex
|
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.cache.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.) (Example code, such as the code below, is run in such a way that interrupts stop the program, so to prevent that, we set
handleInterrupts to
true.)
i4 : R = ZZ/2[a..d];
|
i5 : M = coker random(R^4, R^{5:-3,6:-4});
|
i6 : handleInterrupts = true
o6 = true
|
i7 : (<< "-- computation started: " << endl;
while true do try (
alarm 1;
time res M;
alarm 0;
<< "-- computation complete" << endl;
status M.cache.resolution;
<< res M << endl << endl;
break;
) else (
<< "-- computation interrupted" << endl;
status M.cache.resolution;
<< "-- continuing the computation" << endl;
))
-- computation started:
-- used 1.00229 seconds
-- computation interrupted
-- continuing the computation
-- used 1.04164 seconds
-- computation interrupted
-- continuing the computation
-- used 0.972269 seconds
-- computation interrupted
-- continuing the computation
-- used 0.973646 seconds
-- computation interrupted
-- continuing the computation
-- used 0.972296 seconds
-- computation interrupted
-- continuing the computation
-- used 1.0103 seconds
-- computation interrupted
-- continuing the computation
-- used 0.999254 seconds
-- computation interrupted
-- continuing the computation
-- used 1.02012 seconds
-- computation interrupted
-- continuing the computation
-- used 0.992671 seconds
-- computation interrupted
-- continuing the computation
-- used 0.979129 seconds
-- computation interrupted
-- continuing the computation
-- used 0.976392 seconds
-- computation interrupted
-- continuing the computation
-- used 1.02421 seconds
-- computation interrupted
-- continuing the computation
-- used 0.987088 seconds
-- computation interrupted
-- continuing the computation
-- used 1.02347 seconds
-- computation interrupted
-- continuing the computation
-- used 1.02972 seconds
-- computation interrupted
-- continuing the computation
-- used 1.00289 seconds
-- computation interrupted
-- continuing the computation
-- used 0.998748 seconds
-- computation interrupted
-- continuing the computation
-- used 0.989744 seconds
-- computation interrupted
-- continuing the computation
-- used 0.968507 seconds
-- computation interrupted
-- continuing the computation
-- used 0.975008 seconds
-- computation interrupted
-- continuing the computation
-- used 1.01637 seconds
-- computation interrupted
-- continuing the computation
-- used 0.975782 seconds
-- computation interrupted
-- continuing the computation
-- used 0.993124 seconds
-- computation interrupted
-- continuing the computation
-- used 0.97594 seconds
-- computation interrupted
-- continuing the computation
-- used 1.10275 seconds
-- computation interrupted
-- continuing the computation
-- used 1.15946 seconds
-- computation interrupted
-- continuing the computation
-- used 1.16036 seconds
-- computation interrupted
-- continuing the computation
-- used 1.00465 seconds
-- computation interrupted
-- continuing the computation
-- used 0.991617 seconds
-- computation interrupted
-- continuing the computation
-- used 1.05793 seconds
-- computation interrupted
-- continuing the computation
-- used 0.977557 seconds
-- computation interrupted
-- continuing the computation
-- used 1.10433 seconds
-- computation interrupted
-- continuing the computation
-- used 0.982068 seconds
-- computation interrupted
-- continuing the computation
-- used 1.01523 seconds
-- computation interrupted
-- continuing the computation
-- used 0.984005 seconds
-- computation interrupted
-- continuing the computation
-- used 1.10861 seconds
-- computation interrupted
-- continuing the computation
-- used 1.00944 seconds
-- computation interrupted
-- continuing the computation
-- used 0.699506 seconds
-- computation complete
4 11 89 122 40
R <-- R <-- R <-- R <-- R <-- 0
0 1 2 3 4 5
|
If the user has a chain complex in hand that is known to be a projective resolution of
M, then it can be installed with
M.cache.resolution = C.
There are various optional arguments associated with
res which allow detailed control over the progress of the computation.