Suppose $I$ is a primary ideal and $J=\sqrt{I}$ , radical of it and $J$ now is a prime ideal. How can I use Macaulay2 to compute the multiplicity of $I$ along $J$.
When the scheme-theoretically image of $V(I)$ is just a point, I can use the function 'multiplicity' to compute it.
e.g.: R=QQ[x,y]; I=ideal(x^2,y^2); Then I have multiplicty(I)=4 which is the multiplicity of $I$ along $(x,y)$.
Apparently, it doesn't work for higher dimension.
e.g.: R=QQ[x,y]; I=ideal(x^2-y); It gives multiplicity(I)=2 but $I$ is already a prime ideal and we should expect the answer should be one.
Does anyone know how to find multiplicity when $V(\sqrt{I})$ has dimension higher than zero?