---
title: "Ideal Class Monoid"
canonical: "https://docs.magma-maths.org/v2.30-1/GlobalFields/EtaleAlgebras/ideal_class_monoid.html"
source: "https://docs.magma-maths.org/v2.30-1/GlobalFields/EtaleAlgebras/ideal_class_monoid.md"
part: "Global Fields"
chapter: "Étale Algebras"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Global Fields", "source": "https://docs.magma-maths.org/v2.30-1/GlobalFields/index-global-fields.md"}
  - {"title": "Étale Algebras", "source": "https://docs.magma-maths.org/v2.30-1/GlobalFields/EtaleAlgebras/index-etale-algebras.md"}
prev: {"title": "Weak Testing", "source": "https://docs.magma-maths.org/v2.30-1/GlobalFields/EtaleAlgebras/weak_testing.md"}
next: {"title": "Complex Conjugation", "source": "https://docs.magma-maths.org/v2.30-1/GlobalFields/EtaleAlgebras/complex_conj.md"}
intrinsics:
  - {"name": "ICM_bar", "signature": "ICM_bar(S): AlgEtQOrd -> SeqEnum"}
  - {"name": "ICM", "signature": "ICM(S): AlgEtQOrd -> SeqEnum"}
  - {"name": "IdealClassMonoidAbstract", "signature": "IdealClassMonoidAbstract(R): AlgEtQOrd -> AlgEtQICM, Map"}
  - {"name": "!", "signature": "icm ! x: AlgEtQICM, Any -> AlgEtQICMElt"}
  - {"name": "in", "signature": "x in icm: AlgEtQICMElt, AlgEtQICM -> BoolElt"}
  - {"name": "Parent", "signature": "Parent(x): AlgEtQICMElt -> AlgEtQICM"}
  - {"name": "WEClass", "signature": "WEClass(x): AlgEtQICMElt -> AlgEtQWECMElt"}
  - {"name": "PicClass", "signature": "PicClass(x): AlgEtQICMElt -> GrpAbElt, Map"}
  - {"name": "Ideal", "signature": "Ideal(x): AlgEtQICMElt -> AlgEtQIdl"}
  - {"name": "MultiplicatorRing", "signature": "MultiplicatorRing(x): AlgEtQICMElt -> AlgEtQOrd"}
  - {"name": "eq", "signature": "x1 eq x2: AlgEtQICMElt, AlgEtQICMElt -> BoolElt"}
  - {"name": "*", "signature": "x * y: AlgEtQICMElt, AlgEtQICMElt -> AlgEtQICMElt"}
  - {"name": "^", "signature": "x ^ n: AlgEtQICMElt, RngIntElt -> AlgEtQICMElt"}
  - {"name": "IsOne", "signature": "IsOne(x): AlgEtQICMElt -> BoolElt"}
  - {"name": "IsInvertibleInMultiplicatorRing", "signature": "IsInvertibleInMultiplicatorRing(x): AlgEtQICMElt -> BoolElt"}
  - {"name": "Order", "signature": "Order(icm): AlgEtQICM -> AlgEtQOrd"}
  - {"name": "RepresentativeMap", "signature": "RepresentativeMap(icm): AlgEtQICM -> Map"}
  - {"name": "eq", "signature": "icm1 eq icm2: AlgEtQICM, AlgEtQICM -> BoolElt"}
  - {"name": "#", "signature": "# icm: AlgEtQICM -> RngInt"}
  - {"name": "Classes", "signature": "Classes(icm): AlgEtQICM -> SeqEnum[AlgEtQICMElt]"}
  - {"name": "Representatives", "signature": "Representatives(icm): AlgEtQICM -> SeqEnum[AlgEtQIdl]"}
  - {"name": "One", "signature": "One(icm): AlgEtQICM -> AlgEtQICMElt"}
  - {"name": "Random", "signature": "Random(icm): AlgEtQICM -> AlgEtQICMElt"}
---

# Ideal Class Monoid

Let $R$ be an order in an étale algebra $A$ over ${{\Q}}$. Ideal multiplication induces the structure of commutative monoid on the set of ideal classes of $R$, which we then call *ideal class monoid* of $R$. We denote it by ${\cal I}(R)$. The unit element of ${\cal I}(R)$ is the class of any principal fractional $R$-ideal.

We have a partitioning ${\cal I}(R) = \bigsqcup_S {\cal I}_S(R)$ where the disjoint union is taken over the overorders $S$ of $R$ and ${\cal I}_S(R)$ is the subset of ${\cal I}(R)$ consisting of ideal classes with multiplicator ring $S$. The computation is then performed by first computing ${\cal W}(R)$ and then observing that for each overorder $S$ of $R$, the Picard group ${\rm Pic}(S)$ acts freely on ${\cal I}_S(R)$ with quotient space ${\cal W}_S(R)$.

<a id="function-icm-bar-algetqord"></a>
## `ICM_bar(S): AlgEtQOrd -> SeqEnum`

```magma
GRH: BoolElt                    Default: false
```

Returns the ideal classes of fractional $S$-ideals having Multiplicator Ring equal to $S$. This is the same as the orbit of the action of `PicardGroup(S)` on `WKICM_bar(S)`.

<a id="function-icm-algetqord"></a>
## `ICM(S): AlgEtQOrd -> SeqEnum`

```magma
GRH: BoolElt                    Default: false
```

Returns the ideal class monoid of the order $S$, that is, a set of representatives for the isomorphism classes of the fractional $S$-ideals.

We also provide an abstract representation of the ideal class monoid. The abstract monoid has type `AlgEtQICM` and classes have type `AlgEtQICMElt`. An ideal class can be created via `!` starting from an overorder or a fractional ideal, and a (deterministic) representative can be recovered using `RepresentativeMap`. Each class is internally a pair consisting of a weak equivalence class and an element of the abstract representation of ${\rm Pic}(S)$.

The second method to compute the ideal class monoid of an order $R$, returns an abstract representation of ${\cal I}(R)$ with type `AlgEtQICM` together with a map to a set of representatives. Each class has type `AlgEtQICMElt`, and it is internally represented as a pair consisting of a weak equivalence class (of type `AlgEtQWECMElt`) and an element of the representation of ${\rm Pic}(S)$ (as an abstract abelian group), where $S$ is the corresponding multiplicator ring. This representation is more efficient than the previous one, since it does not need to compute in advance and store a representative for each ideal class. Ideal classes can be created using the coercion operator `!` starting from an overorder $S$ of $R$ or a fractional $S$-ideal. Ideal classes can be multiplied using the operator `*`.

<a id="function-idealclassmonoidabstract-algetqord"></a>
## `IdealClassMonoidAbstract(R): AlgEtQOrd -> AlgEtQICM, Map`

Given an order $R$, returns the abstract ideal class monoid ${\rm icm}$ together with a map (with preimages) sending each class to a representative.

<a id="operation-op-algetqicm-any"></a>
## `icm ! x: AlgEtQICM, Any -> AlgEtQICMElt`

Coerce $x$ into the abstract ideal class monoid when possible, returning an ideal class.

<a id="operation-op-in-algetqicmelt-algetqicm"></a>
## `x in icm: AlgEtQICMElt, AlgEtQICM -> BoolElt`

<a id="function-parent-algetqicmelt"></a>
## `Parent(x): AlgEtQICMElt -> AlgEtQICM`

<a id="function-weclass-algetqicmelt"></a>
## `WEClass(x): AlgEtQICMElt -> AlgEtQWECMElt`

<a id="function-picclass-algetqicmelt"></a>
## `PicClass(x): AlgEtQICMElt -> GrpAbElt, Map`

<a id="function-ideal-algetqicmelt"></a>
## `Ideal(x): AlgEtQICMElt -> AlgEtQIdl`

<a id="function-multiplicatorring-algetqicmelt"></a>
## `MultiplicatorRing(x): AlgEtQICMElt -> AlgEtQOrd`

<a id="operation-op-eq-algetqicmelt-algetqicmelt"></a>
## `x1 eq x2: AlgEtQICMElt, AlgEtQICMElt -> BoolElt`

<a id="operation-op-times-algetqicmelt-algetqicmelt"></a>
## `x * y: AlgEtQICMElt, AlgEtQICMElt -> AlgEtQICMElt`

<a id="operation-op-pow-algetqicmelt-rngintelt"></a>
## `x ^ n: AlgEtQICMElt, RngIntElt -> AlgEtQICMElt`

<a id="function-isone-algetqicmelt"></a>
## `IsOne(x): AlgEtQICMElt -> BoolElt`

<a id="function-isinvertibleinmultiplicatorring-algetqicmelt"></a>
## `IsInvertibleInMultiplicatorRing(x): AlgEtQICMElt -> BoolElt`

<a id="function-order-algetqicm"></a>
## `Order(icm): AlgEtQICM -> AlgEtQOrd`

<a id="function-representativemap-algetqicm"></a>
## `RepresentativeMap(icm): AlgEtQICM -> Map`

<a id="operation-op-eq-algetqicm-algetqicm"></a>
## `icm1 eq icm2: AlgEtQICM, AlgEtQICM -> BoolElt`

<a id="operation-operation-algetqicm-rngint"></a>
## `# icm: AlgEtQICM -> RngInt`

<a id="function-classes-algetqicm"></a>
## `Classes(icm): AlgEtQICM -> SeqEnum[AlgEtQICMElt]`

<a id="function-representatives-algetqicm"></a>
## `Representatives(icm): AlgEtQICM -> SeqEnum[AlgEtQIdl]`

<a id="function-one-algetqicm"></a>
## `One(icm): AlgEtQICM -> AlgEtQICMElt`

<a id="function-random-algetqicm"></a>
## `Random(icm): AlgEtQICM -> AlgEtQICMElt`

(More standard intrinsics.)
