MathOverflow is a question and answer site for professional mathematicians. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Let $(A,\mathfrak{m})$ be a local Artinian ring with finite residue field, which I'm happy to assume is $\mathbf{F}_3$. (In particular, $A$ has finitely many elements.)

I would like to do some computations of the following kind, as $I$ ranges over all of the ideals of $A$.

(0) A way to enumerate all the ideals of $A$.

(1) For an ideal $I$ of $A$, compute the length of $I/I^2$.

(2) For an ideal $I$ of $A$, compute the ideal $J = \mathrm{Ann}(I)$.

(3) For an ideal $I$ of $A$, decide if $I$ is principal. (By computing the length of $I/\mathfrak{m} I$ or otherwise.)

The ring $A$ itself will be given explicitly as a quotient of a power series ring over $W(\mathbf{F}_3) = \mathbf{Z}_3$. For example, $A$ might be given as $\mathbf{Z}_3[[x]]/(27,9x,x^3)$ or $\mathbf{Z}_3[[x]]/(9,x^2)$.

My question: What is the computer algebra package that is best suited to carry out these computations? (I would like something that can be semi-automated for various possible $A$.) I would be interested in even a very simple one like $\mathbf{Z}_3[[x]]/(9,x^2)$

EDIT 2: There seems to be a consensus in the comments that this problem is significantly more manageable if $A$ is actually an algebra over its residue field. For example, in MAGMA, it is only possible to create ideals and quotient rings in univariate polynomial rings over fields. Other computer algebra packages have similar issues when the coefficient ring is not a field, although SINGULAR (for example) has some functionality with polynomials in several variables. As it happens, the problem I was interested in studying is still of interest for such fields.

share|cite|improve this question
In SAGE 4.4.4 it is at least possible to create ideals in this ring. The code is something like: R = ZZ.quo(9); S.<x,y>=PolynomialRing(R,2); I = S.ideal(x^2,y^2). Now SAGE knows that I is an ideal in S. Unfortunately, some experimentation shows that very few operations on ideals in polynomial algebras have been implemented when the base is not a field. (I'm sure people would be thrilled if you implement these!) Similarly, you can form the ring T = S.quo(I). But again the standard methods SAGE has implemented for algebras over fields don't seem to be implemented for T. – Sam Lichtenstein Aug 21 '10 at 18:48
I had no luck with SAGE. I'm convinced the right program for this problem is MACAULAY2, but I'm not very experienced with it. However, it can certainly handle (2) with no problem. Here's some prototypical code: R = (ZZ/3)[a,b]/(a^3,a^2*b,ab^2,b^3) I = ideal (a+2*b, b^2) ann I The output is (b^2, ab, a^2). – Sam Lichtenstein Aug 21 '10 at 21:19
Also, Macaulay will complain if you work over Z/9 for example, so stick with char = 3. – Sam Lichtenstein Aug 21 '10 at 21:21
If you set 3 = 0, then you can do everything you want directly using Singular. (That is what Sage uses for its commutative algebra, but Sage does not wrap most of the relevant Singular functions.) If you are still interested in the case where you only start with 9 = 0, then since Singular can compute Groebner bases over Z, you can probably still do everything, but you will have to do many steps by hand, as the built-in algorithms may assume that the coefficient ring is a field. Maple, Mathematica, Magma, and Macaulay 2 also compute Groebner bases over Z, and so they are also options. – user2490 Aug 21 '10 at 21:25
As for (1) and (3), working over k = Z/3, if R is a quotient of a polynomial k-algebra and M is a finite dimensional graded R-module, Macaulay can compute dim_k M with the command "degree M". This should give you some handle on the lengths of I/I^2 and I/mI for certain R and I. – Sam Lichtenstein Aug 21 '10 at 21:32
up vote 5 down vote accepted

This is fleshed out from comments of Sam Lichtenstein; Some (or all) of what I have written is surely not the most elegant programming (at best), feel free to improve. One can do the following with MACAULAY2 (if you copy and paste this into the MACAULAY2 prompt it should work:)

R = GF(2)[x,y]/(x^3,y^3);
m = ideal(x,y);
ModSquare = ideal -> length(ideal/(ideal*ideal));
Generators = ideal -> length(ideal/(ideal*m));
I := ideal(x^2 + y^2);
J := ann(I);

The function ModSquare applied to an ideal $I$ computes the length of $I/I^2$, and the function Generators computes the minimal number of generators of $I$. Similarly, ann computes the annihilator of $I$. From this we may compute that $I$ is principal, $J$ has two generators, and both $I/I^2$ and $J/J^2$ have length $4$. These functions only work for homogenous ideals. Following James Parson's suggestion, I also considered MAGMA (again with the restriction to affine algebras), and the following works for arbitrary ideals:

A:=AffineAlgebra<GF(2),x,y|x^3,y^3>; x:=A.1; y:=A.2; AssignNames(~A,["x","y"]);
Minus := func
<ideal | Dimension(quo<A|ideal>)>;
Generators := func
<ideal | Minus(ideal*m) - Minus(ideal)>;
ModSquare := func
<ideal | Minus(ideal*ideal) - Minus(ideal)>;
ann := func
<ideal | Annihilator(ideal)>;

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.