For a subvariety X of an irreducible subscheme Y of ℙn1x...xℙnm this command computes the algebraic multiplicity eXY of X in Y. Let R be the coordinate ring of ℙn1x...xℙnm, let OX,Y=(R/IY)IX be the local ring obtained by localizing (R/IY) at the prime ideal IX, and let len denote the length of a local ring. Let M be the unique maximal ideal of OX,Y. The Hilbert-Samuel polynomial is the polynomial PHS(t)=len(OX,Y/Mt) for t large. In different words, this command computes the leading coefficient of the Hilbert-Samuel polynomial PHS(t) associated to OX,Y. Below we have an example of the multiplicity of the twisted cubic in a double twisted cubic.
R = ZZ/32749[x,y,z,w] |
X = ideal(-z^2+y*w,-y*z+x*w,-y^2+x*z) |
Y = ideal(-z^3+2*y*z*w-x*w^2,-y^2+x*z) |
multiplicity(X,Y) |