Low Cohen Macauley Type

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 St/PSt over S/P, where St is the TraceDualIdeal of S.
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 St/P * St where St is the trace dual of S.
CohenMacaulayType(S) : AlgEtQOrd->RngIntElt
Given an order S returns its Cohen-Macaulay Type. This integer equals the max dimension of St/P * St where St is the trace dual of S and P runs over all (non-Gorenstein) primes of S.

Example AlgEtQ_MaxCohenMacaulayType (H42E11)

> // Given an Ãùtale 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
V2.29, 28 November 2025