# multiplicity -- This method computes the algebraic (Hilbert-Samuel) multiplicity

## Synopsis

• Usage:
multiplicity(IX,IY)
• Inputs:
• IX, an ideal, a multi-homogeneous prime ideal defining a closed subscheme of \PP^{n_1}x...x\PP^{n_m}; makeProductRing builds the graded coordinate ring of \PP^{n_1}x...x\PP^{n_m}.
• IY, an ideal, a multi-homogeneous primary ideal defining a closed subscheme of \PP^{n_1}x...x\PP^{n_m}; makeProductRing builds the graded coordinate ring of \PP^{n_1}x...x\PP^{n_m}.
• Optional inputs:
• Verbose (missing documentation) => , default value false,
• Outputs:
• eXY, an integer, the algebraic (Hilbert-Samuel) multiplicity e_XY of the variety X associated to IX in the scheme Y associated to IY.

## Description

For a subvariety X of an irreducible subscheme Y of \PP^{n_1}x...x\PP^{n_m} this command computes the algebraic multiplicity e_XY of X in Y. Let R be the coordinate ring of \PP^{n_1}x...x\PP^{n_m}, let O_{X,Y}=(R/I_Y)_{I_X} be the local ring obtained by localizing (R/I_Y) at the prime ideal I_X, and let len denote the length of a local ring. Let M be the unique maximal ideal of O_{X,Y}. The Hilbert-Samuel polynomial is the polynomial P_{HS}(t)=len(O_{X,Y}/M^t) for t large. In different words, this command computes the leading coefficient of the Hilbert-Samuel polynomial P_{HS}(t) associated to O_{X,Y}. Below we have an example of the multiplicity of the twisted cubic in a double twisted cubic.

 i1 : R = ZZ/32749[x,y,z,w] o1 = R o1 : PolynomialRing i2 : X = ideal(-z^2+y*w,-y*z+x*w,-y^2+x*z) 2 2 o2 = ideal (- z + y*w, - y*z + x*w, - y + x*z) o2 : Ideal of R i3 : Y = ideal(-z^3+2*y*z*w-x*w^2,-y^2+x*z) 3 2 2 o3 = ideal (- z + 2y*z*w - x*w , - y + x*z) o3 : Ideal of R i4 : multiplicity(X,Y) o4 = 2 o4 : QQ

## For the programmer

The object multiplicity is .