Macaulay2 » Documentation
Packages » Macaulay2Doc > basic commutative algebra > M2SingularBook > Singular Book 1.3.15
next | previous | forward | backward | up | index | toc

Singular Book 1.3.15 -- computing with radicals

Compute the radical of an ideal with radical.
i1 : R = QQ[x,y,z];
i2 : radical ideal(z^4+2*z^2+1)

            2
o2 = ideal(z  + 1)

o2 : Ideal of R
A somewhat more complicated example:
i3 : I = ideal"xyz,x2,y4+y5"

                    2   5    4
o3 = ideal (x*y*z, x , y  + y )

o3 : Ideal of R
i4 : radical I

                2
o4 = ideal (x, y  + y)

o4 : Ideal of R
The index of nilpotency. We compute the minimal integer $k$ such that $(y^2+y)^k \in I$.
i5 : k = 0;
i6 : while (y^2+y)^k % I != 0 do k = k+1;
i7 : k

o7 = 4
The index of nilpotency is 4.