'Generate a submodule.
>>> from sympy.abc import x
>>> from sympy import QQ
>>> M = QQ.old_poly_ring(x).free_module(2).submodule([x, 1])
>>> M.submodule([x**2, x])
<[x**2, x]>'

def submodule(self, *gens):

    if (not self.subset(gens)):
        raise ValueError(('%s    not    a    subset    of    %s' % (gens, self)))
    return self.__class__(gens, self.container)
