---
title: "Factorization and Primes"
canonical: "https://docs.magma-maths.org/v2.30-1/GlobalFields/EtaleAlgebras/factor_primes.html"
source: "https://docs.magma-maths.org/v2.30-1/GlobalFields/EtaleAlgebras/factor_primes.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": "Picard Group", "source": "https://docs.magma-maths.org/v2.30-1/GlobalFields/EtaleAlgebras/picard_group.md"}
next: {"title": "Low Cohen Macauley Type", "source": "https://docs.magma-maths.org/v2.30-1/GlobalFields/EtaleAlgebras/low_cohen_macauley_type.md"}
intrinsics:
  - {"name": "Factorization", "signature": "Factorization(I): AlgEtQIdl -> Tup"}
  - {"name": "PrimesAbove", "signature": "PrimesAbove(I): AlgEtQIdl -> SeqEnum[AlgAssEtOrdIdl]"}
  - {"name": "SingularPrimes", "signature": "SingularPrimes(R): AlgEtQOrd -> SeqEnum[AlgAssEtOrdIdl]"}
  - {"name": "PlacesAboveRationalPrime", "signature": "PlacesAboveRationalPrime(E, p): AlgEtQ, RngIntElt -> SeqEnum[AlgEtQIdl]"}
  - {"name": "NonInvertiblePrimes", "signature": "NonInvertiblePrimes(R): AlgEtQOrd -> SetIndx"}
  - {"name": "IsPrime", "signature": "IsPrime(I): AlgEtQIdl -> BoolElt"}
  - {"name": "IsMaximal", "signature": "IsMaximal(I): AlgEtQIdl -> BoolElt"}
  - {"name": "IsMaximalIdeal", "signature": "IsMaximalIdeal(I): AlgEtQIdl -> BoolElt"}
  - {"name": "Valuation", "signature": "Valuation(x, P): AlgEtQElt, AlgEtQIdl -> RngIntElt"}
  - {"name": "Valuation", "signature": "Valuation(I, P): AlgEtQIdl, AlgEtQIdl -> RngIntElt"}
  - {"name": "InertiaDegree", "signature": "InertiaDegree(P): AlgEtQIdl -> RngIntElt"}
  - {"name": "RamificationIndex", "signature": "RamificationIndex(P): AlgEtQIdl -> RngIntElt"}
  - {"name": "IsBassAtPrime", "signature": "IsBassAtPrime(S, P): AlgEtQOrd, AlgEtQIdl -> BoolElt"}
  - {"name": "IsBass", "signature": "IsBass(S): AlgEtQOrd -> BoolElt"}
  - {"name": "IsGorensteinAtPrime", "signature": "IsGorensteinAtPrime(S, P): AlgEtQOrd, AlgEtQIdl -> BoolElt"}
  - {"name": "IsGorenstein", "signature": "IsGorenstein(O): AlgEtQOrd -> BoolElt"}
  - {"name": "Uniformizers", "signature": "Uniformizers(PPs): SeqEnum[AlgEtQIdl] -> SeqEnum"}
---

# Factorization and Primes

<a id="function-factorization-algetqidl"></a>
## `Factorization(I): AlgEtQIdl -> Tup`

Given an integral $S$-ideal $I$ coprime with the conductor of $S$ (hence invertible in $S$), returns its factorization into a product of primes of $S$.

<a id="function-primesabove-algetqidl"></a>
## `PrimesAbove(I): AlgEtQIdl -> SeqEnum[AlgAssEtOrdIdl]`

Given an integral $S$-ideal $I$, returns the sequence of maximal ideals $P$ of $S$ above $I$.

<a id="function-singularprimes-algetqord"></a>
## `SingularPrimes(R): AlgEtQOrd -> SeqEnum[AlgAssEtOrdIdl]`

Returns the non-invertible primes of the order $R$.

<a id="function-placesaboverationalprime-algetq-rngintelt"></a>
## `PlacesAboveRationalPrime(E, p): AlgEtQ, RngIntElt -> SeqEnum[AlgEtQIdl]`

Given an étale algebra and a rational prime, returns the primes of the maximal order of the algebra containing the rational prime.

<a id="function-noninvertibleprimes-algetqord"></a>
## `NonInvertiblePrimes(R): AlgEtQOrd -> SetIndx`

Returns the non-invertible primes of the order $R$.

<a id="function-isprime-algetqidl"></a>
## `IsPrime(I): AlgEtQIdl -> BoolElt`

<a id="function-ismaximal-algetqidl"></a>
## `IsMaximal(I): AlgEtQIdl -> BoolElt`

<a id="function-ismaximalideal-algetqidl"></a>
## `IsMaximalIdeal(I): AlgEtQIdl -> BoolElt`

Given an integral $S$-ideal $I$, returns if the ideal is a prime fractional ideal of $S$, that is a maximal $S$ ideal.

<a id="function-valuation-algetqelt-algetqidl"></a>
## `Valuation(x, P): AlgEtQElt, AlgEtQIdl -> RngIntElt`

<a id="function-valuation-algetqidl-algetqidl"></a>
## `Valuation(I, P): AlgEtQIdl, AlgEtQIdl -> RngIntElt`

Valuation at the prime $P$ of an element $x$ or of a fractional ideal $I$ of the maximal order.

<a id="function-inertiadegree-algetqidl"></a>
## `InertiaDegree(P): AlgEtQIdl -> RngIntElt`

<a id="function-ramificationindex-algetqidl"></a>
## `RamificationIndex(P): AlgEtQIdl -> RngIntElt`

For a prime $P$ of the maximal order ${\cal O}$, returns its inertia degree and ramification index.

<a id="function-isbassatprime-algetqord-algetqidl"></a>
## `IsBassAtPrime(S, P): AlgEtQOrd, AlgEtQIdl -> BoolElt`

Check if the order is Bass at the prime ideal $P$, that is, if every overorder of $S$ is Gorenstein at the primes above $P$.

<a id="function-isbass-algetqord"></a>
## `IsBass(S): AlgEtQOrd -> BoolElt`

Check if the order $S$ is Bass, that is, if every overorder of $S$ is Gorenstein.

<a id="function-isgorensteinatprime-algetqord-algetqidl"></a>
## `IsGorensteinAtPrime(S, P): AlgEtQOrd, AlgEtQIdl -> BoolElt`

Check if the order $S$ is Gorenstein at the prime ideal $P$, that is, if every fractional ideal $I$ with $(I:I)=S$ is locally principal at $P$.

<a id="function-isgorenstein-algetqord"></a>
## `IsGorenstein(O): AlgEtQOrd -> BoolElt`

Checks if the order $O$ is Gorenstein, that is if the `TraceDualIdeal` of $O$ is invertible, or equivalently, if all fractional ideals $I$ with $(I:I)=O$ are invertible.

<a id="function-uniformizers-seqenum-algetqidl"></a>
## `Uniformizers(PPs): SeqEnum[AlgEtQIdl] -> SeqEnum`

Given a sequence of primes $P$ of the maximal order, returns a sequence of elements $t_P$ such that $t_P$ is a uniformizer at $P$ and a unit at every other prime in the sequence.
