-- Basic introduction loadPackage "BeginningMacaulay2" help BeginningMacaulay2 -- Basics on maps restart R=ZZ/101[x,y,z] M=matrix{{x,y,z}} kernel M gens oo -- convert the kernel into a matrix help kernel -- view help -- Example - primary decomposition restart R=QQ[x,y] I1=ideal(x^2,x*y) gens I1 J1=ideal(x^2,y) J2=ideal(x) intersect(J1,J2) intersect(J1,J2) == I1 radical I1 -- embedded components disappear primaryDecomposition I1 netList primaryDecomposition I1 -- primary Decomposition are not unique: K1=(ideal(x,y))^2 isPrimary K1 radical K1 K2=ideal(x) intersect(K1,K2) intersect(K1,K2) == I1 -- Example - example points restart R=QQ[x,y] I=ideal(x^2-x,y^2-y) netList primaryDecomposition I J=ideal(x-y) I:J netList primaryDecomposition (I:J) I+J R/I -- Powers of prime ideals are not necessarily primary ideals restart R=QQ[x,y] I=ideal(x,y) isPrimary I^2 I=ideal (x,y^2) isPrimary I isPrimary I^2 restart R=QQ[x_1..x_9] M=matrix{{x_1..x_3},{x_4..x_6},{x_7..x_9}} I=minors(2,M) transpose gens I isPrime I isPrimary I^2 -- false netList primaryDecomposition I^2