---
title: "Weak Classes"
canonical: "https://docs.magma-maths.org/v2.30-1/GlobalFields/EtaleAlgebras/weak_classes.html"
source: "https://docs.magma-maths.org/v2.30-1/GlobalFields/EtaleAlgebras/weak_classes.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": "Low Cohen Macauley Type", "source": "https://docs.magma-maths.org/v2.30-1/GlobalFields/EtaleAlgebras/low_cohen_macauley_type.md"}
next: {"title": "Weak Testing", "source": "https://docs.magma-maths.org/v2.30-1/GlobalFields/EtaleAlgebras/weak_testing.md"}
intrinsics:
  - {"name": "WKICM_bar", "signature": "WKICM_bar(S): AlgEtQOrd -> SeqEnum"}
  - {"name": "WeakEquivalenceClassesWithPrescribedMultiplicatorRing", "signature": "WeakEquivalenceClassesWithPrescribedMultiplicatorRing(S): AlgEtQOrd -> SeqEnum[AlgEtQIdl]"}
  - {"name": "WeakEquivalenceClassMonoid", "signature": "WeakEquivalenceClassMonoid(E): AlgEtQOrd -> SeqEnum[AlgEtQIdl]"}
  - {"name": "WKICM", "signature": "WKICM(E): AlgEtQOrd -> SeqEnum"}
  - {"name": "WeakEquivalenceClassMonoidAbstract", "signature": "WeakEquivalenceClassMonoidAbstract(R): AlgEtQOrd -> AlgEtQWECM, Map"}
  - {"name": "!", "signature": "W ! x: AlgEtQWECM, Any -> AlgEtQWECMElt"}
  - {"name": "in", "signature": "x in W: AlgEtQWECMElt, AlgEtQWECM -> BoolElt"}
  - {"name": "Parent", "signature": "Parent(x): AlgEtQWECMElt -> AlgEtQWECM"}
  - {"name": "Ideal", "signature": "Ideal(x): AlgEtQWECMElt -> AlgEtQIdl"}
  - {"name": "MultiplicatorRing", "signature": "MultiplicatorRing(x): AlgEtQWECMElt -> AlgEtQOrd"}
  - {"name": "eq", "signature": "x1 eq x2: AlgEtQWECMElt, AlgEtQWECMElt -> BoolElt"}
  - {"name": "SetRepresentative", "signature": "SetRepresentative(x, J): AlgEtQWECMElt, AlgEtQIdl"}
  - {"name": "MultiplicationTable", "signature": "MultiplicationTable(W): AlgEtQWECM -> Assoc"}
  - {"name": "*", "signature": "x * y: AlgEtQWECMElt, AlgEtQWECMElt -> AlgEtQWECMElt"}
  - {"name": "^", "signature": "x ^ n: AlgEtQWECMElt, RngIntElt -> AlgEtQWECMElt"}
  - {"name": "IsOne", "signature": "IsOne(x): AlgEtQWECMElt -> BoolElt"}
  - {"name": "IsIdempotent", "signature": "IsIdempotent(x): AlgEtQWECMElt -> BoolElt"}
  - {"name": "Order", "signature": "Order(W): AlgEtQWECM -> AlgEtQOrd"}
  - {"name": "Array", "signature": "Array(W): AlgEtQWECM -> Assoc"}
  - {"name": "RepresentativeMap", "signature": "RepresentativeMap(W): AlgEtQWECM -> Map"}
  - {"name": "eq", "signature": "W1 eq W2: AlgEtQWECM, AlgEtQWECM -> BoolElt"}
  - {"name": "#", "signature": "# W: AlgEtQWECM -> RngInt"}
  - {"name": "Classes", "signature": "Classes(W): AlgEtQWECM -> SeqEnum[AlgEtQWECMElt]"}
  - {"name": "Representatives", "signature": "Representatives(W): AlgEtQWECM -> SeqEnum[AlgEtQIdl]"}
  - {"name": "One", "signature": "One(W): AlgEtQWECM -> AlgEtQWECMElt"}
  - {"name": "Random", "signature": "Random(W): AlgEtQWECM -> AlgEtQWECMElt"}
  - {"name": "Idempotents", "signature": "Idempotents(W): AlgEtQWECM -> SeqEnum[AlgEtQWECMElt]"}
  - {"name": "Localization", "signature": "Localization(W, P): AlgEtQWECM, AlgEtQIdl -> AlgEtQWECM"}
  - {"name": "IsGeneratingSet", "signature": "IsGeneratingSet(W, seq): AlgEtQWECM, SeqEnum[AlgEtQWECMElt] -> BoolElt"}
  - {"name": "IsGeneratingSet", "signature": "IsGeneratingSet(W, seq): AlgEtQWECM, SeqEnum[AlgEtQIdl] -> BoolElt"}
examples:
  - "ex-628357"
---

# Weak Classes

Let $R$ be an order and $I$ and $J$ be fractional $R$-ideals in an étale algebra $A$ over ${{\Q}}$. Then the following statements are equivalent:

**(a)**
$I_{\p} \simeq J_{\p}$ as $R_{\p}$-modules for every maximal ideal $\p$ of $R$.

**(b)**
$I_p \simeq J_p$ as $R_p$-modules for every rational prime $p$.

**(c)**
$1 \in (I:J)(J:I)$.

**(d)**
$I$ and $J$ have the same multiplicator ring, say $S$, and $(I:J)$ is an invertible fractional $S$-ideal.

**(e)**
$I$ and $J$ have the same multiplicator ring, say $S$, and $(J:I)$ is an invertible fractional $S$-ideal. If the previous conditions hold, one says that $I$ and $J$ are *weakly equivalent*. This is an equivalence relation.

Note that if $I$ is an order, then $J$ is weakly equivalent to $I$ if and only if $J$ is an invertible $I$-ideal. If both $I$ and $J$ are orders then they are weakly equivalent if and only if they are equal. In the literature, the same notion sometimes goes under the name *local isomorphism*.

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

```magma
Method: MonStgElt                    Default: "Auto"
```

Returns representatives of all the weak equivalence classes $I$ of $S$ satisfying $(I:I)=S$. The parameter `Method` (default `"Auto"`) determines if we should use the `"IntermediateIdeals"` routine or the `"LowIndexProcess"`, which is potentially much slower but more memory efficient.

<a id="function-weakequivalenceclasseswithprescribedmultiplicatorring-algetqord"></a>
## `WeakEquivalenceClassesWithPrescribedMultiplicatorRing(S): AlgEtQOrd -> SeqEnum[AlgEtQIdl]`

Given an order $S$, returns representatives $I$ of all weak equivalence classes of fractional $S$-ideals with $(I:I)=S$.

We also provide an abstract representation of the weak equivalence class monoid. In this representation the monoid has type `AlgEtQWECM` and classes have type `AlgEtQWECMElt`. Classes can be created via the coercion operator `!`, multiplied with `*` (and exponentiated with `^`), and a representative can be recovered using the `RepresentativeMap`. Additional helpers include `IsOne`, `IsIdempotent`, and `Localization`.

Let $R$ be an order in an étale algebra over ${{\Q}}$. Then ideal multiplication induces a commutative monoid structure on the set of weak equivalence classes of fractional $R$-ideals called the *weak equivalence class monoid* of $R$. This commutative monoid, which we denote by ${\cal W}(R)$, is finite and has unit element given by the class of $R$.

Since the multiplicator ring is an invariant of the weak equivalence class of a fractional $R$-ideal, we have a partitioning ${\cal W}(R) = \bigsqcup_S {\cal W}_S(R)$, where the disjoint union is taken over the overorders $S$ of $R$ and ${\cal W}_S(R)$ is the subset of ${\cal W}(R)$ consisting of the weak equivalence classes of fractional $R$-ideals with multiplicator ring $S$.

Let $S$ be an overorder of $R$. If $S$ is Gorenstein then ${\cal W}_S(R)$ consists only of the class defined by $S$. If $S$ has Cohen-Macaulay type $2$ and $\p$ is a prime of $S$, then each fractional $R$-ideal $I$ with multiplicator ring $S$ satisfies either $I_\p \simeq S_\p$ or $I_\p \simeq S^t_\p$. The second possibility occurs precisely when $S$ has Cohen-Macaulay type $2$ at the primes $\p$. This classification results provide a very efficient method to compute ${\cal W}_S(R)$ for orders $S$ with Cohen-Macaulay type $\leq 2$. For the general case, an algorithm that includes a more expensive enumeration step is provided.

<a id="function-weakequivalenceclassmonoid-algetqord"></a>
## `WeakEquivalenceClassMonoid(E): AlgEtQOrd -> SeqEnum[AlgEtQIdl]`

<a id="function-wkicm-algetqord"></a>
## `WKICM(E): AlgEtQOrd -> SeqEnum`

```magma
Method: MonStgElt                    Default: "Auto"
```

Computes the weak equivalence class monoid of $E$. The parameter `Method` (default `"Auto"`) determines if we should use the `"IntermediateIdeals"` routine or the `"LowIndexProcess"`, which is potentially much slower but more memory efficient.

The second method to compute ${\cal W}(R)$ returns an abstract representation of the monoid together with a map giving representatives. The monoid is of type `AlgEtQWECM` and each class is of type `AlgEtQWECMElt`. Classes can be created by feeding to the operator `!` a fractional $S$-ideal, when $S$ is an overorder of $R$, or an overorder of $R$ itself. Whenever a class is created a representative is stored in an attribute. This representative can be changed using the intrinsic `SetRepresentative`. Classes can be multiplied using the operator `*`. Whenever two classes are multiplied, the result is stored in the attribute `MultiplicationTable` of the monoid.

<a id="function-weakequivalenceclassmonoidabstract-algetqord"></a>
## `WeakEquivalenceClassMonoidAbstract(R): AlgEtQOrd -> AlgEtQWECM, Map`

Given an order $R$, returns the abstract weak equivalence class monoid $W$ of $R$ together with a map (with preimages) sending each class to a representative.

<a id="operation-op-algetqwecm-any"></a>
## `W ! x: AlgEtQWECM, Any -> AlgEtQWECMElt`

Coerce $x$ into the monoid $W$, when possible, returning a class.

<a id="operation-op-in-algetqwecmelt-algetqwecm"></a>
## `x in W: AlgEtQWECMElt, AlgEtQWECM -> BoolElt`

Returns whether the class $x$ belongs to the monoid $W$.

<a id="function-parent-algetqwecmelt"></a>
## `Parent(x): AlgEtQWECMElt -> AlgEtQWECM`

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

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

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

<a id="procedure-setrepresentative-algetqwecmelt-algetqidl"></a>
## `SetRepresentative(x, J): AlgEtQWECMElt, AlgEtQIdl`

Change the stored representative of the class $x$ to the weakly equivalent ideal $J$.

<a id="function-multiplicationtable-algetqwecm"></a>
## `MultiplicationTable(W): AlgEtQWECM -> Assoc`

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

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

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

<a id="function-isidempotent-algetqwecmelt"></a>
## `IsIdempotent(x): AlgEtQWECMElt -> BoolElt`

<a id="function-order-algetqwecm"></a>
## `Order(W): AlgEtQWECM -> AlgEtQOrd`

<a id="function-array-algetqwecm"></a>
## `Array(W): AlgEtQWECM -> Assoc`

<a id="function-representativemap-algetqwecm"></a>
## `RepresentativeMap(W): AlgEtQWECM -> Map`

<a id="operation-op-eq-algetqwecm-algetqwecm"></a>
## `W1 eq W2: AlgEtQWECM, AlgEtQWECM -> BoolElt`

<a id="operation-operation-algetqwecm-rngint"></a>
## `# W: AlgEtQWECM -> RngInt`

<a id="function-classes-algetqwecm"></a>
## `Classes(W): AlgEtQWECM -> SeqEnum[AlgEtQWECMElt]`

<a id="function-representatives-algetqwecm"></a>
## `Representatives(W): AlgEtQWECM -> SeqEnum[AlgEtQIdl]`

<a id="function-one-algetqwecm"></a>
## `One(W): AlgEtQWECM -> AlgEtQWECMElt`

<a id="function-random-algetqwecm"></a>
## `Random(W): AlgEtQWECM -> AlgEtQWECMElt`

<a id="function-idempotents-algetqwecm"></a>
## `Idempotents(W): AlgEtQWECM -> SeqEnum[AlgEtQWECMElt]`

<a id="function-localization-algetqwecm-algetqidl"></a>
## `Localization(W, P): AlgEtQWECM, AlgEtQIdl -> AlgEtQWECM`

<a id="function-isgeneratingset-algetqwecm-seqenum-algetqwecmelt"></a>
## `IsGeneratingSet(W, seq): AlgEtQWECM, SeqEnum[AlgEtQWECMElt] -> BoolElt`

<a id="function-isgeneratingset-algetqwecm-seqenum-algetqidl"></a>
## `IsGeneratingSet(W, seq): AlgEtQWECM, SeqEnum[AlgEtQIdl] -> BoolElt`

(More standard intrinsics.)

<a id="example-ex-628357"></a>
## `Example: Weak Equivalence Classes (ex-628357)`

```magma
> _<x> := PolynomialRing(Integers());
> f := (x^4+16)*(x^4+81);
> A := EtaleAlgebra(f);
> E := EquationOrder(A);
> w := WKICM_bar(E);
> #w;
1
> // Optionally compute full monoid
> W := WKICM(E);
> #W;
```
