---
title: "Low Cohen Macauley Type"
canonical: "https://docs.magma-maths.org/v2.30-1/GlobalFields/EtaleAlgebras/low_cohen_macauley_type.html"
source: "https://docs.magma-maths.org/v2.30-1/GlobalFields/EtaleAlgebras/low_cohen_macauley_type.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": "Factorization and Primes", "source": "https://docs.magma-maths.org/v2.30-1/GlobalFields/EtaleAlgebras/factor_primes.md"}
next: {"title": "Weak Classes", "source": "https://docs.magma-maths.org/v2.30-1/GlobalFields/EtaleAlgebras/weak_classes.md"}
intrinsics:
  - {"name": "NonGorensteinPrimes", "signature": "NonGorensteinPrimes(S): AlgEtQOrd -> SeqEnum, SeqEnum"}
  - {"name": "CohenMacaulayTypeAtPrime", "signature": "CohenMacaulayTypeAtPrime(S, P): AlgEtQOrd, AlgEtQIdl -> RngIntElt"}
  - {"name": "CohenMacaulayType", "signature": "CohenMacaulayType(S): AlgEtQOrd -> RngIntElt"}
examples:
  - "ex-442922"
---

# Low Cohen Macauley Type

<a id="function-nongorensteinprimes-algetqord"></a>
## `NonGorensteinPrimes(S): AlgEtQOrd -> SeqEnum, SeqEnum`

Given an order $S$ it returns two sequences: the first containis the primes at which $S$ is locally not Gorenstein; the second contains the Cohen Macaulay types of $S$ at these primes, that is, the dimension of $S^t/PS^t$ over $S/P$, where $S^t$ is the `TraceDualIdeal` of $S$.

<a id="function-cohenmacaulaytypeatprime-algetqord-algetqidl"></a>
## `CohenMacaulayTypeAtPrime(S, P): AlgEtQOrd, AlgEtQIdl -> RngIntElt`

Given an order $S$ and a prime ideal $P$, it returns its Cohen-Macaulay Type at $P$. This integer equals the dimension of $S^t/P*S^t$ where $S^t$ is the trace dual of $S$.

<a id="function-cohenmacaulaytype-algetqord"></a>
## `CohenMacaulayType(S): AlgEtQOrd -> RngIntElt`

Given an order $S$ returns its Cohen-Macaulay Type. This integer equals the max dimension of $S^t/P*S^t$ where $S^t$ is the trace dual of $S$ and $P$ runs over all (non-Gorenstein) primes of $S$.

<a id="example-ex-442922"></a>
## `Example: Order of Maximal Cohen-Macaulay Type (ex-442922)`

```magma
> // Given an \'etale algebra A of dimension n over Q, the maximum Cohen-Macaulay
> // type that an order can have is n-1.
> // An order with such maximal Cohen-Macaualay type can be found among the
> // overorders of the order Z+p*O_A where p an arbitrary rational prime.
> // We verify this statement in an example.
> _<x> := PolynomialRing(Integers());
> f := x^4+8;
> A := EtaleAlgebra(f);
> O := MaximalOrder(A);
> p := 7;
> E := Order([p*z : z in ZBasis(O)]);
> n := Dimension(A);
> oo := OverOrders(E);
> exists{ S : S in oo | CohenMacaulayType(S) eq n-1 };
true
```
