---
title: "Elements of Modules"
canonical: "https://docs.magma-maths.org/v2.30-1/Modules/ModulesOverDedekindDomains/elements.html"
source: "https://docs.magma-maths.org/v2.30-1/Modules/ModulesOverDedekindDomains/elements.md"
part: "Modules"
chapter: "Modules over Dedekind Domains"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Modules", "source": "https://docs.magma-maths.org/v2.30-1/Modules/index-modules.md"}
  - {"title": "Modules over Dedekind Domains", "source": "https://docs.magma-maths.org/v2.30-1/Modules/ModulesOverDedekindDomains/index-modules-over-dedekind-domains.md"}
prev: {"title": "Homomorphisms between Modules", "source": "https://docs.magma-maths.org/v2.30-1/Modules/ModulesOverDedekindDomains/homomorphisms.md"}
next: {"title": "Pseudo Matrices", "source": "https://docs.magma-maths.org/v2.30-1/Modules/ModulesOverDedekindDomains/pmat.md"}
intrinsics:
  - {"name": "!", "signature": "M ! v: ModDed, SeqEnum -> ModDedElt"}
  - {"name": "!", "signature": "M ! v: ModDed, ModDedElt -> ModDedElt"}
  - {"name": "!", "signature": "M ! v: ModDed, ModElt -> ModDedElt"}
  - {"name": "+", "signature": "x + y: ModDedElt, ModDedElt -> ModDedElt"}
  - {"name": "-", "signature": "x - y: ModDedElt, ModDedElt -> ModDedElt"}
  - {"name": "*", "signature": "u * c: ModDedElt, RngElt -> ModDedElt"}
  - {"name": "*", "signature": "c * u: RngElt, ModDedElt -> ModDedElt"}
  - {"name": "/", "signature": "u / c: ModDedElt, RngElt -> ModDedElt"}
  - {"name": "*", "signature": "I * u: RngOrdIdl, ModDedElt -> ModDed"}
  - {"name": "*", "signature": "I * u: RngFunOrdIdl, ModDedElt -> ModDed"}
  - {"name": "*", "signature": "u * I: ModDedElt, RngOrdIdl -> ModDed"}
  - {"name": "*", "signature": "u * I: ModDedElt, RngFunOrdIdl -> ModDed"}
  - {"name": "eq", "signature": "x eq y: ModDedElt, ModDedElt -> Bool"}
  - {"name": "IsZero", "signature": "IsZero(a): ModDedElt -> BoolElt"}
  - {"name": "ElementToSequence", "signature": "ElementToSequence(a): ModDedElt -> SeqEnum"}
  - {"name": "Eltseq", "signature": "Eltseq(a): ModDedElt -> SeqEnum"}
examples:
  - "ex-2c7014"
---

# Elements of Modules

## Creation of Elements

<a id="operation-op-modded-seqenum"></a>
### `M ! v: ModDed, SeqEnum -> ModDedElt`

<a id="operation-op-modded-moddedelt"></a>
### `M ! v: ModDed, ModDedElt -> ModDedElt`

<a id="operation-op-modded-modelt"></a>
### `M ! v: ModDed, ModElt -> ModDedElt`

Coerce $v$ into an element of $M$. $v$ can be a sequence of length dimension of $M$, a module element or vector or an element of another module over a Dedekind domain which is compatible with $M$.

<a id="example-ex-2c7014"></a>
### `Example: Coercion into Quotient Modules (ex-2c7014)`

Let `Mod` and its submodules and quotient modules be as in the sub and quotient module example above.

```magma
> m := 4*Mod.1;
> m;
(4/1*M.1 0)
> Q1!m;
( 4/1*M.1 0 )
> Q2!m;
( 4/1*M.1 0 )
> m := Mod!m;
> Q3!m;
( 4/1*M.1 0 )
> Q4!m;
( 4/1*M.1 0 )
> S1!m;
>> S1!m;
     ^
Runtime error in `!': Illegal coercion
LHS: ModDed
RHS: ModDedElt
> S1!Mod!V!0;
(  )
> S2!Mod!Mod.2;
( M.1 )
> S3!Mod!(4*Mod.1);
( 4/1*M.1 0 )
```

## Arithmetic with Elements

Basic arithmetic can be performed with elements of a module over a Dedekind domain.

<a id="operation-op-plus-moddedelt-moddedelt"></a>
### `x + y: ModDedElt, ModDedElt -> ModDedElt`

The sum of the module elements.

<a id="operation-op-minus-moddedelt-moddedelt"></a>
### `x - y: ModDedElt, ModDedElt -> ModDedElt`

The difference of the module elements.

<a id="operation-op-times-moddedelt-rngelt"></a>
### `u * c: ModDedElt, RngElt -> ModDedElt`

<a id="operation-op-times-rngelt-moddedelt"></a>
### `c * u: RngElt, ModDedElt -> ModDedElt`

The product of the module element $u$ and the ring element $c$.

<a id="operation-op-div-moddedelt-rngelt"></a>
### `u / c: ModDedElt, RngElt -> ModDedElt`

The product of $u$ and $1/c$ if it lies in the parent module of $u$.

<a id="operation-op-times-rngordidl-moddedelt-2"></a>
### `I * u: RngOrdIdl, ModDedElt -> ModDed`

<a id="operation-op-times-rngfunordidl-moddedelt-2"></a>
### `I * u: RngFunOrdIdl, ModDedElt -> ModDed`

<a id="operation-op-times-moddedelt-rngordidl-2"></a>
### `u * I: ModDedElt, RngOrdIdl -> ModDed`

<a id="operation-op-times-moddedelt-rngfunordidl-2"></a>
### `u * I: ModDedElt, RngFunOrdIdl -> ModDed`

The module containing elements which are products of $u$ and an element lying in $I$.

## Other Functions on Elements

Elements of modules over a Dedekind domain can be tested for equality and represented as a sequence.

<a id="operation-op-eq-moddedelt-moddedelt"></a>
### `x eq y: ModDedElt, ModDedElt -> Bool`

Return `true` if $x$ and $y$ are the same element of a module.

<a id="function-iszero-moddedelt"></a>
### `IsZero(a): ModDedElt -> BoolElt`

Returns whether the module element $a$ is zero.

<a id="function-elementtosequence-moddedelt"></a>
### `ElementToSequence(a): ModDedElt -> SeqEnum`

<a id="function-eltseq-moddedelt"></a>
### `Eltseq(a): ModDedElt -> SeqEnum`

The module element $a$ expressed as a sequence.
