# subquotient of module

how can I take a quotient of a submodule? I was expecting the following to work:

sage: M = CombinatorialFreeModule(QQ, [1,2], prefix='x'); x = M.basis()
sage: A = M.submodule([x[2]])
sage: A.quotient_module(A)
Free module generated by {1} over Rational Field


Which is clearly taking the quotient over the ambient space of A and not the image

sage: A.quotient_module(A) == M.quotient_module(A)
True

Replacing A with A.lift.image() is the same.

EDIT: well, reading now in Modules.WithBasis.FiniteDimensional.ParentMethods.quotient_modules this is simply a call to QuotientModuleWithBasis(A,category) which will infer the parent of A.

As a side observation, I find it disturbing that there is not even a check that submodule is indeed a submodule of self in that call.

edit retag close merge delete

Sort by » oldest newest most voted

Perhaps someone can explain me here a better way but the only way I found to to this now is as follows. Suppose we have two submodules with bases A and B of M defined by M.submodule(). Suppose moreover B is a submodule of A and both are of finite rank. Then we have to lift the basis of B as per (in this case A and B are the same)

sage: A.quotient_module([A.retract(b.lift()) for b in B.basis()])
Free module generated by {} over Rational Field

more