This package includes various methods for pruning chain complexes over polynomial and local rings. In particular, in the local or graded case the output is guaranteed to be a minimal free resolution.
Algorithms in this package are also implemented using C++ in e/mutablecomplex.hpp for speed.
i1 : R = ZZ/32003[vars(0..17)]; |
i2 : m1 = genericMatrix(R,a,3,3) o2 = | a d g | | b e h | | c f i | 3 3 o2 : Matrix R <--- R |
i3 : m2 = genericMatrix(R,j,3,3) o3 = | j m p | | k n q | | l o r | 3 3 o3 : Matrix R <--- R |
i4 : I = ideal(m1*m2-m2*m1) o4 = ideal (d*k + g*l - b*m - c*p, b*j - a*k + e*k + h*l - b*n - c*q, c*j + ------------------------------------------------------------------------ f*k - a*l + i*l - b*o - c*r, - d*j + a*m - e*m + d*n + g*o - f*p, - d*k ------------------------------------------------------------------------ + b*m + h*o - f*q, - d*l + c*m + f*n - e*o + i*o - f*r, - g*j - h*m + ------------------------------------------------------------------------ a*p - i*p + d*q + g*r, - g*k - h*n + b*p + e*q - i*q + h*r, - g*l - h*o ------------------------------------------------------------------------ + c*p + f*q) o4 : Ideal of R |
Here we produce an intentionally nonminimal resolution:
i5 : C = res(I, FastNonminimal=>true) 1 26 108 208 221 132 41 5 o5 = R <-- R <-- R <-- R <-- R <-- R <-- R <-- R <-- 0 0 1 2 3 4 5 6 7 8 o5 : ChainComplex |
Now we prune the resolution above to get a minimal resolution:
i6 : D = pruneComplex(C, UnitTest => isScalar) 1 8 33 60 61 32 5 o6 = R <-- R <-- R <-- R <-- R <-- R <-- R 0 1 2 3 4 5 6 o6 : ChainComplex |
i7 : isCommutative D.cache.pruningMap o7 = true |
i8 : betti D == betti res I o8 = true |
Only supports localization at prime ideals.