**Overview:**

Consider a monoid B in ℕ^{m} and a submonid A ⊆B (both finitely generated) such that K[B] is a finitely generated K[A]-module (with the module structure given by inclusion, and K being a field).

Note that this is equivalent to the condition that the corresponding cones C(A) and C(B) spanned by the monoids are equal. From this it follows that G(B)/G(A) is finite, where G(A) and G(B) are the groups generated by the monoids.

This package provides functions to decompose the corresponding monomial algebra K[B] as a direct sum of monomial ideals in K[A]. In

Le Tuan Hoa, Juergen Stueckrad: Castelnuovo-Mumford regularity of simplicial toric rings, Journal of Algebra, Volume 259, Issue 1, 1 January 2003, pages 127-146,

it is shown that this decomposition exists in the case that B is homogeneous and simplicial and A is generated by minimal generators of B on the extremal rays of C(B). In particular then K[A] is a Noether normalization of K[B].

For the existence of the decomposition in the general (non-simplicial) case, and for algorithms computing the decomposition and the regularity see:

J. Boehm, D. Eisenbud, M. Nitsche: Decomposition of semigroup algebras, Exper. Math. 21(4) (2012) 385-394, http://arxiv.org/abs/1110.3653.

Using the decomposition algorithm, the package also provides fast functions to test ring-theoretic properties of monomial algebras. For details on the corresponding algorithms see:

J. Boehm, D. Eisenbud, M. Nitsche: Decomposition of Monomial Algebras: Applications and Algorithms, 2012, http://arxiv.org/abs/1206.1735.

**Key user functions:**

*Decomposition:*

decomposeMonomialAlgebra -- Decomposition of one monomial algebra over a subalgebra.

decomposeHomogeneousMA -- Decomposition of one homogeneous monomial algebra over a subalgebra.

*Ring-theoretic properties:*

isCohenMacaulayMA -- Test whether a simplicial monomial algebra is Cohen-Macaulay.

isGorensteinMA -- Test whether a simplicial monomial algebra is Gorenstein.

isBuchsbaumMA -- Test whether a simplicial monomial algebra is Buchsbaum.

isNormalMA -- Test whether a simplicial monomial algebra is normal.

isSeminormalMA -- Test whether a simplicial monomial algebra is seminormal.

isSimplicialMA -- Test whether a monomial algebra is simplicial.

*Regularity:*

regularityMA -- Compute the regularity via the decomposition.

degreeMA -- Compute the degree via the decomposition.

codimMA -- Compute the codimension of a monomial algebra.

**Options:**

Computation of the binomial ideal associated to B via the function binomialIdeal can be done via two different methods:

The standard method uses the Macaulay2 function kernel and requires no configuration.

Alternatively, the external program 4ti2, http://www.4ti2.de/ can be called, which is delivered with the Macaulay2 distribution. For large examples this is typically much faster. To use this option load the *MonomialAlgebras* package with the following configuration option:

loadPackage("MonomialAlgebras",Configuration=>{"Use4ti2"=>true})

Note that you can change the standard option by editing the file init-MonomialAlgebras.m2 in the .Macaulay directory in your home directory.

In order to use 4ti2, on some systems you may have to configure the Macaulay2 package *FourTiTwo* first.

**Setup:**

Install this Package by doing

installPackage("MonomialAlgebras")

**Tests:**

The following files contain the tuples (regularity, degree, codim) for every semigroup B in ℕ^{d} with fixed **d** and fixed coodinate sum **a**. Using this data we have verified the Eisenbud-Goto conjecture in these cases.

**d = 3:**

a = 3: proveEG_33

a = 4: proveEG_43

a = 5: proveEG_53

**d = 4:**

a = 2: proveEG_24

a = 3: proveEG_34

**d = 5:**

a = 2: proveEG_25

More functions related to testing the Eisenbud-Goto conjecture can be found in the MonomialAlgebraExtras package.

**Diagrams:**

We illustrate the tests with Diagrams showing projections of the set of all possible (regularity, degree, codim).

Version **2.3** of this package was accepted for publication in volume 5 of the journal The Journal of Software for Algebra and Geometry on 2013-04-07, in the article Decomposition of Monomial Algebras: Applications and Algorithms. That version can be obtained from the journal or from the *Macaulay2* source code repository, http://github.com/Macaulay2/M2/blob/master/M2/Macaulay2/packages/MonomialAlgebras.m2, commit number 68f41d641fadb0a1054023432eb60177f1d7cbd9.

- Types
- MonomialAlgebra -- The class of all monomialAlgebras.

- Functions and commands
- adjoinPurePowers -- adjoin semigroup elements corresponding to pure powers of variables
- affineAlgebra -- Define a monomial algebra
- binomialIdeal -- Compute the ideal of a monomial algebra
- codimMA -- Codimension of a monomial algebra.
- decomposeHomogeneousMA -- Decomposition of one monomial algebra over a subalgebra
- decomposeMonomialAlgebra -- Decomposition of one monomial algebra over a subalgebra
- degreeMA -- Degree of a monomial algebra.
- findGeneratorsOfSubalgebra -- Find submonoid corresponding to the convex hull.
- findMonomialSubalgebra -- Find monomial subalgebra corresponding to the convex hull.
- homogenizeSemigroup -- Homogenize generators of a semigroup.
- isBuchsbaumMA -- Test whether a simplicial monomial algebra is Buchsbaum.
- isCohenMacaulayMA -- Test whether a simplicial monomial algebra is Cohen-Macaulay.
- isGorensteinMA -- Test whether a simplicial monomial algebra is Gorenstein.
- isNormalMA -- Test whether a simplicial monomial algebra is normal.
- isSeminormalMA -- Test whether a simplicial monomial algebra is seminormal.
- isSimplicialMA -- Test whether a monomial algebra is simplicial.
- monomialAlgebra -- Create a monomial algebra
- randomMonomialAlgebra -- Generate random monoimal algebra.
- randomSemigroup -- Generate random semigroups.
- regularityMA -- Compute regularity from decomposition

- Methods
- affineAlgebra(MonomialAlgebra), see affineAlgebra -- Define a monomial algebra
- binomialIdeal(MonomialAlgebra), see binomialIdeal -- Compute the ideal of a monomial algebra
- codimMA(MonomialAlgebra), see codimMA -- Codimension of a monomial algebra.
- decomposeHomogeneousMA(MonomialAlgebra), see decomposeHomogeneousMA -- Decomposition of one monomial algebra over a subalgebra
- decomposeMonomialAlgebra(MonomialAlgebra), see decomposeMonomialAlgebra -- Decomposition of one monomial algebra over a subalgebra
- degreeMA(MonomialAlgebra), see degreeMA -- Degree of a monomial algebra.
- degrees(MonomialAlgebra) -- Generators of the degree monoid
- findMonomialSubalgebra(MonomialAlgebra), see findMonomialSubalgebra -- Find monomial subalgebra corresponding to the convex hull.
- isBuchsbaumMA(MonomialAlgebra), see isBuchsbaumMA -- Test whether a simplicial monomial algebra is Buchsbaum.
- isCohenMacaulayMA(MonomialAlgebra), see isCohenMacaulayMA -- Test whether a simplicial monomial algebra is Cohen-Macaulay.
- isGorensteinMA(MonomialAlgebra), see isGorensteinMA -- Test whether a simplicial monomial algebra is Gorenstein.
- isNormalMA(MonomialAlgebra), see isNormalMA -- Test whether a simplicial monomial algebra is normal.
- isSeminormalMA(MonomialAlgebra), see isSeminormalMA -- Test whether a simplicial monomial algebra is seminormal.
- isSimplicialMA(MonomialAlgebra), see isSimplicialMA -- Test whether a monomial algebra is simplicial.
- net(MonomialAlgebra) -- Pretty print for monomial algebras
- regularityMA(MonomialAlgebra), see regularityMA -- Compute regularity from decomposition
- ring(MonomialAlgebra) -- Multigraded polynomial ring associated to a monomial algebra

- Symbols
- CoefficientField -- Option to set the coefficient field.
- Decomposition -- Optional argument of regularityMA to specify the decomposition.
- Num -- Option of randomSemigroup and randomMonomialAlgebra to return a list of several semigroups.
- ReturnMingens -- Option to return the minimal generating set B_A of K[B] as K[A]-module.
- SetSeed -- Option to set the random seed for randomSemigroup and randomMonomialAlgebra.
- Simplicial -- Option of randomSemigroup and randomMonomialAlgebra to return a simplicial semigroup.