The following functions give some fundamental basic constructions with modules.
Given compatible modules M and N (ie, embedded in the same ambient module), return the sum of M and N; that is, the submodule of the ambient generated by M and N.
Given compatible modules M and N (ie, embedded in the same ambient module), return the intersection of M and N in the ambient. This uses the standard algorithm for intersecting two modules of a free module (see Section 2.8.3 of [GP02]). If the ambient is the quotient of a free module F by non-trivial relations, the intersection performed is effectively that of the inverse images of M and N in F.
Given an R-module M and an element f∈R, return the submodule of M generated by { f.v: v ∈M } or { v.f: v ∈M }, respectively.
Given an R-module M and an ideal I of R, return the submodule of M generated by { f.v: f ∈I, v ∈M } or { v.f: f ∈I, v ∈M }, respectively.
Given compatible modules M and N (ie, embedded in the same ambient module), return the quotient module M/(M ∩N). This has the same effect as using the quo constructor.
Given R-modules M and N, return the direct sum D = M direct-sum N and two sequences of corresponding homomorphisms giving the injections into and projections from D, respectively.
A sequence or list L of R-modules, return their direct sum D and two sequences of corresponding homomorphisms giving the injections into and projections from D, respectively.
Given a graded module M, and an integer d, return the Serre twist M(d) and an isomorphism f:M -> M(d). The twisted module is simply an isomorphic copy of M, but with the grading twisted by d (so d is subtracted from each weight of M). f has degree -d.