The isomorphism from N to M as g = N.cache.pruningMap unless M.cache.pruningMap already exists, in which case N is the same as M. The inverse isomorphism can be obtained as g^-1
Description
If the Module M is graded then the module N is a minimal presentation of M. If not, then an attempt is made to improve the presentation of M. An example follows.
i1 : R = ZZ/32003[a..d];
i2 : M = coker matrix {{a,1,b},{c,3,b+d}}
o2 = cokernel | a 1 b |
| c 3 b+d |
2
o2 : R-module, quotient of R
i3 : N = minimalPresentation M
o3 = cokernel | b+16001d a-10668c |
1
o3 : R-module, quotient of R