restart
needsPackage "SegreClasses"
R=QQ[x..z,w]
I=ideal((y-x^3)^3);
Ib=ideal((y*w^2-x^3)^3);
rI=radical I
rIb=radical Ib
I==radical (I)
--the 'singular locus'
J=ideal mingens(I+minors(codim(I),jacobian I))
J==ideal((y-x^3)^2)
--the 'correct' singular locus
ideal mingens minors(codim(I),jacobian radical I)
Ib==radical (Ib)
--the 'singular locus'
Jb=ideal mingens(Ib+ minors(codim(Ib),jacobian Ib))
P=primaryDecomposition Jb
P_0==ideal((y*w^2-x^3)^2)
--the 'correct' singular locus
radical ideal mingens(Ib+ minors(codim(I),jacobian radical Ib))
R =QQ[x..z,w]
--affine version
X = ideal (x ^2 - y ^3)
Y=ideal y
X==radical(X)
--Singular locus of X== the z-axis
J=radical ideal mingens(X+minors(codim(X),jacobian X))
--Y= the x-z plane
--X\cap Y is the z-axis
XintY=radical(X+Y)
degree XintY
ideal mingens(XintY+minors(codim(XintY),jacobian XintY))
--note that the resulting intersection itself is smooth (which makes sense as it is a line)
--if we just use X+Y we will get less sensible answers:
ideal mingens(X+Y+minors(codim(X+Y),jacobian (X+Y)))
--i.e. it tells us that the entire z-axis is singular.. why is that?
ideal mingens (X+Y)
--so like the examples above we have an 'artifical' (i.e. non-geometric) algebraic singularity here
--geometrically one could think of this as having multiple 'copies' of the geometric object one on
--top of the other
XintAnotherY=radical(X+ideal(y-1))
decompose XintAnotherY
radical sum oo
--note that this is still smooth, since these two lines don't meet in affine space
--projective closure
X = ideal ( w * x ^2 - y ^3)
X==radical X
Y=ideal y
--Singular locus of X is the same as the affine version
J=radical ideal mingens(X+minors(codim(X),jacobian X))
--so again Y meets X all along its singular locus, but now it also intersects somewhere else
--now the intersection consists of two projective lines, one which coresponds
--to the affine z-axis and one 'at infinity'
XintY=radical(X+Y)
decompose XintY
--now the intersection is no longer smooth, since it is not irreducible
J=radical ideal mingens(XintY+minors(codim(XintY),jacobian XintY))
--in particular it is singular at the intersection of the two lines
--its degree of the projective intersection is also greater, not this is NOT the projective
--closure of the affine intersection.
degree XintY
--if we count each line in the intersection with a multiplcity we get the 'expected'
--degree for the intersection of a degree 3 and a degree 1 surface.
multiplicity ( ideal (x ,y ) , X )
multiplicity ( ideal (w ,y ) , X )
--Also note that again if we work with just X+Y we will get
--the appearence of non-geometric singularities, and this time it
-- is even 'uglier'
J=ideal mingens(X+Y+minors(codim(X+Y),jacobian (X+Y)))
--taking the radical of this can be misleading
radical J
--this looks like we have no 'direct' evidence of the singular point of the geometric
--point where the two lines meet, though that point is contained in the line we get
primaryDecomposition J
--Taking a primary decomposition we finally see it directly, but since, geometrically,
--it is fully embedded in V(x,y) it doesn't show up in the radical.