I have $G=\mathbb{Z}^3$, $H=\langle(3,2,4),(6,1,7),(2,3,6)\rangle \leq G$. My task was to find the quotient $G/H$ as the direct product of infinite cyclic groups and prime-power-order finite groups $(\mathbb{Z}^r \times \mathbb{Z}/n_1\mathbb{Z} \times ... \times \mathbb{Z}/n_k\mathbb{Z})$.

Doing it by hand I obtained that $G/H$ is isomorphic to $\mathbb{Z}/25\mathbb{Z}$. However I wanted to check this result with Sage Math, and created these:

G = AdditiveAbelianGroup([0,0,0])
H = G.submodule([(3,2,4),(6,1,7),(2,3,6)])

However doing G.quotient(H) returned that it was not an implemented function yet.

sage: G.quotient(H)
---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call last)
<ipython-input-64-ebaeef77a3b4> in <module>
----> 1 G.quotient(H)

/opt/sagemath-9.2/local/lib/python3.7/site-packages/sage/groups/old.pyx in sage.groups.old.Group.quotient (build/cythonized/sage/groups/old.c:2910)()
    204             NotImplementedError
    205         """
--> 206         raise NotImplementedError
    207
    208 cdef class AbelianGroup(Group):

NotImplementedError:
sage:

The fact that I can only find documentation for quotients of multiplicative abelian groups is discouraging. If this is not it, what can be the way to find and thus check quotients like these in Sage?


Welcome to MSE!

If you look at the documentation for additive abelian groups, it says

Additive abelian groups are just modules over $\mathbb{Z}$. Hence the classes in this module derive from those in the module sage.modules.fg_pid. The only major differences are in the way elements are printed.

This is a clue that, if things aren't working, we should check out the fg_pid module instead. Going to the documentation there, we see an example which is easily adapted to your problem:

# make a new ZZ-module with the obvious basis vectors
G = span([[1,0,0],[0,1,0],[0,0,1]], ZZ)

# make a submodule of G
H = G.span([[3,2,4],[6,1,7],[2,3,6]])

# take the quotient
G / H

When you run G/H above, you should get the print out

Finitely generated module V/W over Integer Ring with invariants (25)

which tells you that $G/H \cong \mathbb{Z} / (25)$, agreeing with your computation.


I hope this helps ^_^