optional inputs for associatedPrimes

25 views
Skip to first unread message

Kriti Goel

unread,
May 28, 2025, 6:18:30 AM5/28/25
to Macaulay2
Hi,

We know that computing the associated primes of an ideal can be a complex task. I have a situation where I don't want to compute the entire set of associated primes, but stop as soon as more than one such prime is found. Is there a way to do so? 
I know that all associated primes of my ideal have the same codimension, so the optional input 'CodimensionLimit' doesn't help.

Thanks!
Kriti

Michael Burr

unread,
May 28, 2025, 7:09:13 AM5/28/25
to Macaulay2
Could you specify the ring that you're working over and interested in?  If you're thinking about the reals or complexes (even if you're using rationals for computations), a numerical irreducible decomposition may answer your question.

Kriti Goel

unread,
May 28, 2025, 10:44:43 AM5/28/25
to Macaulay2
Thank you for the information. The ideal is over a polynomial ring in characteristic zero. So, while rational numbers are preferred for computation, I guess I could pass to complex numbers just for this check, if it is quicker than the computation of the associated primes?
I checked the numericalIrreducibleDecomposition function. It works in some cases, but I am also getting some errors and some interesting answers in different examples.
Example 1: 
i1 :  R = QQ[x,y,z];
I2 : f = x^4+y^4+z^4;
i3 : J = ideal jacobian f;
i4 : ass J
o4 = {ideal (z, y, x)}
i5 : T = CC[x,y,z];
i6 : numericalIrreducibleDecomposition sub(J,T)
stdio:34:33:(3): error: key not found in hash table:
        DeflationSequenceMatrices (of class Symbol)

Example 2: 
i1 : R = QQ[z_0..z_2];
i2 : h = z_0^3+z_1^3+z_2^3+z_0*z_1*z_2;
i3 : J = ideal jacobian h;
i4 : ass J
o4 = {ideal (z , z , z )}
                       2   1   0
i5 : T = CC[z_0..z_2];
i6 : numericalIrreducibleDecomposition (sub(J,T))
o6 = a "numerical variety" with components in
o6 : NumericalVariety

Example 3:
i1 : R = QQ[y,z];
i2 : f = y^4-2*y^2*z+z^2-y*z^3;
i3 : J = ideal jacobian f;
i4 : ass J
                                             2                               2
o4 = {ideal (z, y), ideal (3z  + 14y, 9y*z - 7, 6y  + z)}
i5 : T = CC[y,z];
i6 : numericalIrreducibleDecomposition sub(J,T)
stdio:19:33:(3): error: check failed

Is this because the ideal J in all of the above cases is not a radical ideal?

Michael Burr

unread,
May 29, 2025, 6:05:41 AM5/29/25
to Macaulay2
I think that you're right that not being radical is causing issues in your examples.  On these examples, numericalIrreducibleDecomposition radical J worked quite nicely (although I know that radical J can be an expensive computation)

Example 1:
o7 = a "numerical variety" with components in
     dim 0:  (dim=0,deg=1)

Example 2:
o13 = a "numerical variety" with components in
      dim 0:  (dim=0,deg=1)

Example 3:
o19 = a "numerical variety" with components in
      dim 0:  (dim=0,deg=1) (dim=0,deg=1) (dim=0,deg=1) (dim=0,deg=1)

Note also that there's no need to create the ring T, numericalIrreducibleDecomposition J gives a decomposition over the complexes even if your base field consists of the rationals.  This is particularly important if you use the radial J call, since you want that computation to occur over an exact field.

Kriti Goel

unread,
May 30, 2025, 6:51:17 AM5/30/25
to Macaulay2
This was helpful. Thanks!
I will run some examples to compare the computational timings via this method, using the radical, and via the associated primes.

Reply all
Reply to author
Forward
0 new messages