R=QQ[x..z]
I=ideal(x^3 - y*z, y^3 - x*z, z^3 - x*y)
dim I
degree I
flatten entries basis(R/I)
#oo
degree radical I
flatten entries basis(R/(radical I))
#oo
D=decompose I
D=primaryDecomposition radical I
P=primaryDecomposition I
#D
#P
for p in P list degree p
for p in D list degree p
sum oo
--so the degree of rad(I) is the number of points in V(I)
needsPackage "NumericalAlgebraicGeometry"
solveSystem flatten entries gens radical I
solveSystem flatten entries gens I
V=numericalIrreducibleDecomposition I
#components V
--isolated and embedded primes
R =QQ[x..z,w]
X= ideal ( w * x ^2 - y ^3,y)
J=ideal mingens(X+minors(codim(X),jacobian X))
P=primaryDecomposition J
for p in P list radical p
--the first component p0 is a minimal (or isolated) associated prime
--the second p1 is an embedded prime
--the compont p1 is embedded since V(p1) \subset V(p0)
isSubset(radical P_0,radical P_1)
--alternitively if we take the radical of J we see that only the minimal
--associated prime occurs
radical J
--note that the M2 'decompose' command only computes the minimal primes
decompose J
primaryDecomposition ideal (x^2,x*y)