# Quotients

## `Quotient(I, zbJ): AlgEtQIdl, SeqEnum[AlgEtQElt] -> GrpAb, Map`

Given an ideal $I$ and the ZBasis of an ideal or order $J$ such that $J \subset I$, returns the abelian group $Q=I/J$ together with the quotient map $q:I\mapsto Q$.

## `Quotient(I, J): AlgEtQIdl, AlgEtQIdl -> GrpAb, Map`

Given fractional ideals $J \subset I$, returns the abelian group $Q=I/J$ together with the quotient map $q:I\mapsto Q$.

## `Quotient(S, zbJ): AlgEtQOrd, SeqEnum[AlgEtQElt] -> GrpAb, Map`

Given an order $S$ and the ZBasis of an ideal $J$ such that $J \subset S$, returns the abelian group $Q=S/J$ together with the quotient map $q:S\mapsto Q$. The ideal $J$ can also be an order.

## `ResidueRing(S, I): AlgEtQOrd, AlgEtQIdl -> GrpAb, Map`

Given an integral ideal $I$ of $S$, returns the abelian group $S/I$ and the quotient map $q:S \mapsto S/I$ (with preimages). Important: the domain of $q$ is the Algebra of $S$, since the elements of $S$ are expressed as elements of $A$. We stress that the output is a group and does not have a multiplication. This can be obtained by first taking preimages, doing the multiplication, and then applying the projection.

## `ResidueField(P): AlgEtQIdl -> FldFin, Map`

Given $P$ a prime of $S$, returns a finite field $F$ isomorphic to $S/P$ and a surjection (with inverse) $S\mapsto F$.

## `PrimitiveElementResidueField(P): AlgEtQIdl -> AlgEtQElt`

Returns an element of the ideal $P$ that maps to the primitive element of the residue field $S/P$, that is a multiplicative generator of $(S/P)^*$.

## `QuotientVS(I, J, P): AlgEtQOrd, AlgEtQOrd, AlgEtQIdl -> ModRng, Map`

Let $I, J$ be orders, $P$ a fractional $R$-ideal such that:

- $P$ is prime of some order $R$ with residue field $K$;

- $J$ in $I$ and $I/J$ is a vector space $V$ over $K$, say of dimension $d$.

The function returns the `KModule` $K^d=V$ and the natural surjection $I\mapsto V$ (with preimages).

## `Example: Quotients Residues (ex-c0d808)`

```magma
> _<x> := PolynomialRing(Integers());
> f := (x^8+16)*(x^8+81);
> A := EtaleAlgebra(f);
> O := MaximalOrder(A);
> // Choose a prime above 2
> P := PrimesAbove(2*O)[1];
> // Residue field
> F, pi := ResidueField(P);
> F;
Finite field of size 2
> // Residue ring
> G, q := ResidueRing(O,P);
> G;
Abelian Group isomorphic to Z/2
Defined on 1 generator
Relations:
2*G.1 = 0

```

## `QuotientVS(I, J, P): AlgEtQOrd, AlgEtQIdl, AlgEtQIdl -> ModRng, Map`

Let $I$ be an order, $J$ and $P$ be fractional $R$-ideals such that:

- $P$ is prime of some order $R$, with residue field $K$;

- $J$ in $I$ and $I/J$ is a vector space $V$ over $K$, say of dimension $d$.

The function returns the `KModule` $K^d=V$ and the natural surjection $I\mapsto V$ (with preimages).

## `QuotientVS(I, J, P): AlgEtQIdl, AlgEtQOrd, AlgEtQIdl -> ModRng, Map`

Let $J$ be an order, $I$ and $P$ be fractional $R$-ideals such that:

- $P$ is prime of some order $R$, with residue field $K$;

- $J$ in $I$ and $I/J$ is a vector space $V$ over $K$, say of dimension $d$.

The function returns the `KModule` $K^d=V$ and the natural surjection $I\mapsto V$ (with preimages).

## `QuotientVS(I, J, P): AlgEtQIdl, AlgEtQIdl, AlgEtQIdl -> ModRng, Map`

Let $I, J, P$ be fractional $R$-ideals such that:

- $P$ is prime of some order $R$;

- $J$ in $I$ and $I/J$ is a vector space over $R/P$, say of dimension $d$;

The function returns the `KModule` $K^d=V$ and the natural surjection $I\mapsto V$ (with preimages).
