L = intersectInP(I,J)
This function applies the technology of distinguished to compute the distinguished subvarieties, with their multiplicities, for an intersection in affine or projective space. The function distinguished is actually applied to the diagonal ideal in P**P and the ideal I**P + P**I, and the answer is pulled back to P.









Note that in the last two cases, which are improper intersections of two cubics, the total multiplicity is 9 = 3*3. But this is not always the case (in the actual definition of the intersection product, the multiplicity is multiplied by the class of a certain cycle supported on the distinguished subvariety).


The object intersectInP is a method function with options.