---
title: "Invariants of an Abelian Group"
canonical: "https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/AbelianGroups/invariant.html"
source: "https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/AbelianGroups/invariant.md"
part: "Finitely Presented Groups"
chapter: "Abelian Groups"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Finitely Presented Groups", "source": "https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/index-finitely-presented-groups.md"}
  - {"title": "Abelian Groups", "source": "https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/AbelianGroups/index-abelian-groups.md"}
prev: {"title": "Operations on Elements", "source": "https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/AbelianGroups/operation-element.md"}
next: {"title": "Canonical Decomposition", "source": "https://docs.magma-maths.org/v2.30-1/FinitelyPresentedGroups/AbelianGroups/decomposition.md"}
intrinsics:
  - {"name": "ElementaryAbelianQuotient", "signature": "ElementaryAbelianQuotient(G, p): GrpAb, RngIntElt -> GrpAb, Map"}
  - {"name": "FreeAbelianQuotient", "signature": "FreeAbelianQuotient(G): GrpAb -> GrpAb, Map"}
  - {"name": "PrimaryAbelianInvariants", "signature": "PrimaryAbelianInvariants(A): GrpAb -> [ RngIntElt ]"}
  - {"name": "AbelianInvariants", "signature": "AbelianInvariants(A): GrpAb -> [ RngIntElt ]"}
  - {"name": "PrimaryAbelianBasis", "signature": "PrimaryAbelianBasis(A): GrpAb -> [ GrpAbElt ], [ RngIntElt ]"}
  - {"name": "AbelianBasis", "signature": "AbelianBasis(A): GrpAb -> [ GrpAbElt ], [ RngIntElt ]"}
  - {"name": "TorsionFreeRank", "signature": "TorsionFreeRank(A): GrpAb -> RngIntElt"}
  - {"name": "TorsionInvariants", "signature": "TorsionInvariants(A): GrpAb -> [ RngIntElt ]"}
  - {"name": "pPrimaryInvariants", "signature": "pPrimaryInvariants(A, p): GrpAb, RngIntElt -> [ RngIntElt ]"}
---

# Invariants of an Abelian Group

<a id="function-elementaryabelianquotient-grpab-rngintelt"></a>
## `ElementaryAbelianQuotient(G, p): GrpAb, RngIntElt -> GrpAb, Map`

The maximal $p$-elementary abelian quotient of the group $G$ as `GrpAb`. The natural epimorphism is returned as second value.

<a id="function-freeabelianquotient-grpab"></a>
## `FreeAbelianQuotient(G): GrpAb -> GrpAb, Map`

The maximal free abelian quotient of the group $G$ as `GrpAb`. The natural epimorphism is returned as second value.

<a id="function-primaryabelianinvariants-grpab"></a>
## `PrimaryAbelianInvariants(A): GrpAb -> [ RngIntElt ]`

<a id="function-abelianinvariants-grpab"></a>
## `AbelianInvariants(A): GrpAb -> [ RngIntElt ]`

The $p$-primary invariants of the abelian group $A$. Each infinite cyclic factor is represented by zero. The non-primary form gives the Smith form invariants, i.e. each element of the sequence divides the next.

<a id="function-primaryabelianbasis-grpab"></a>
## `PrimaryAbelianBasis(A): GrpAb -> [ GrpAbElt ], [ RngIntElt ]`

<a id="function-abelianbasis-grpab"></a>
## `AbelianBasis(A): GrpAb -> [ GrpAbElt ], [ RngIntElt ]`

Returns sequences $B$ and $I$, where $I$ are the $p$-primary invariants of $A$, and $B$ are generators for $A$ with orders as in $I$. The non-primary form uses the Smith form invariants, i.e. each element of the sequence divides the next.

<a id="function-torsionfreerank-grpab"></a>
## `TorsionFreeRank(A): GrpAb -> RngIntElt`

The torsion-free rank of the abelian group $G$.

<a id="function-torsioninvariants-grpab"></a>
## `TorsionInvariants(A): GrpAb -> [ RngIntElt ]`

The torsion invariants of the abelian group $G$.

<a id="function-pprimaryinvariants-grpab-rngintelt"></a>
## `pPrimaryInvariants(A, p): GrpAb, RngIntElt -> [ RngIntElt ]`

The $p$-primary invariants of the abelian group $G$.
