'Return True if ``other`` is a submodule of ``self``.
>>> from sympy.abc import x
>>> from sympy import QQ
>>> Q = QQ.old_poly_ring(x).free_module(2) / [(x, x)]
>>> S = Q.submodule([1, 0])
>>> Q.is_submodule(S)
True
>>> S.is_submodule(Q)
False'

def is_submodule(self, other):

    if isinstance(other, QuotientModule):
        return ((self.killed_module == other.killed_module) and self.base.is_submodule(other.base))
    if isinstance(other, SubQuotientModule):
        return (other.container == self)
    return False
