Maps between free modules are usual specified as matrices, as described in the section on matrices. In this section we cover a few other techniques.
Let's set up a ring, a matrix, and a free module.
i1 : R = ZZ/101[x,y,z]; |
i2 : f = vars R |
i3 : M = R^4 |
We can use Module ^ {...} and Module _ {...} to produce projection maps to quotient modules and injection maps from submodules corresponding to specified basis vectors.
i4 : M^{0,1} |
i5 : M_{2,3} |
Natural maps between modules can be obtained with map; the first argument is the desired target, and the second is the source.
i6 : map(source f, ker f) |
i7 : map(coker f, target f) |