# Introduction

Since the structure theory for modules over arbitrary orders (which are in general not Dedekind domains) is very unsatisfactory, modules over orders in Magma are always modules over some maximal order of a number field or function field, they form a magma of type `ModDed`.

Let $k$ be a number field or function field and ${\cal O}_k$ its ring of integers. Since ${\cal O}_k$ is a Dedekind domain, every finitely generated torsion free module $M$ over ${\cal O}_k$ has a representation as a direct sum

$$
M = \sum_{i=1}^m {{\cal A}_i} \alpha_i =
   \{ \sum_{i=1}^m a_i\alpha_i \mid a_i \in {\cal A}_i\}
$$

with (fractional) ideals ${{\cal A}_i}$ and elements $\alpha_i \in kM \cong k^r$.

A (not necessarily direct) sum $\sum _{i=1}^m {{\cal A}_i}\alpha_i$ will be represented as a pseudo–matrix $({{\cal A}}|A)$ where ${{\cal A}} = ({{\cal A}_1}, \ldots, {{\cal A}_m})^t$ is a column vector of ideals and $A = (\alpha_1, \ldots, \alpha_m)^t \in k^{m\times r}$ is a matrix. The ideals ${{\cal A}_i}$ are called coefficient ideals.

This pseudo–matrix is called a pseudo–basis iff the sum is direct. A pseudo–matrix $({{\cal A}}| A)$ is in Hermite normal form iff there are $s\leq m$, $1\leq i_1 < i_2< \cdots < i_s$ such that $A_{j, l} = 0$ ($1\leq l<i_j$), $A_{j, i_j} = 1$ and $A_{j, l}$ is reduced modulo ${{\cal A}_j}{{\cal A}_l}^{-1}$. For $j>s$ we have $A_{j,l} = 0$.

This normal form is unique if a suitable reduction is used.

As a consequence of this normalisation, usually $\alpha_i\not\in M$. To be precise: $\alpha_i\in M$ iff $1\in {{\cal A}_i}$.

All modules are in Hermite normal form, i.e. every module is represented by a pseudo–basis in Hermite normal form.

General (non torsion free) modules are represented as quotients of a torsion free module $M$ and a submodule $S$. Elements of $Q := M/S$ are represented as elements of $M$, arithmetic in $Q$ is reduced to arithmetic in $M$ followed by a reduction modulo the pseudo–basis of $S$.
