Macaulay2 / M2

The primary source code repository for Macaulay2, a system for computing in commutative algebra, algebraic geometry and related fields.
https://macaulay2.com
345 stars 230 forks source link

Primes in mixed characteristic #2611

Open mahrud opened 2 years ago

mahrud commented 2 years ago

Another easy computation that does not work over the integers:

R = ZZ[e_1, e_2, e_3, Degrees =>{1,2,3}]
I = ideal(2, e_1*e_2 - e_3)
isPrime I -- error: no applicable strategy for (minimalPrimes,Ideal)

I believe the algorithm of Gianni-Trager-Zacharias should work for minimalPrimes over integers. Is that right, @jchen419?

Somewhat related, codimension also doesn't work, but I believe it is at least a well-defined notion, since we can just look at the primary decomposition of I.

codim I -- error: codim: expected an affine ring (consider Generic=>true to work over QQ)

Reported by @sashapevzner

jchen419 commented 2 years ago

Yes, in general the algorithms described in GTZ work over any PID (at least if factorization is algorithmic). So using MinimalPrimes.m2 it should in theory be possible to test primality in polynomial rings over ZZ.

I agree that codimension - which is unambiguously defined for every ideal in any commutative ring whatsoever - should be made to work over ZZ, as Generic => true is not really always an acceptable workaround.