Let $R$ be the multi-homogeneous polynomial ring $R=k[x_{1,0},x_{1,1},...,x_{1,r_1}, x_{2,0},x_{2,1},...,x_{2,r_2}, ......, x_{m,0},x_{m,1},...,x_{m,r_m}]$ and $I$ be the multi-homogeneous ideal $I=(f_0,f_1,...,f_s)$ where the polynomials $f_i$'s have the same multi-degree. We compute the degree of the rational map $\mathbb{F}: \mathbb{P}^{r_1} \times \mathbb{P}^{r_2} \times ... \times \mathbb{P}^{r_m} \to \mathbb{P}^s$ defined by $$ (x_{1,0} : ... : x_{1,r_1}; ...... ;x_{m,0} : ... : x_{m,r_m}) \to (f_0(x_{1,0},...,x_{1,r_1}, ...... ,x_{m,0},...,x_{m,r_m}), ..... , f_0(x_{1,0},...,x_{1,r_1}, ...... ,x_{m,0},...,x_{m,r_m})). $$ This method calls "satSpecialFiber(I, nsteps)" in order to obtain the saturated special fiber ring and then computes the degree of $\mathbb{F}$ from the multiplicity of the saturated special fiber ring.
i1 : R = QQ[x,y,u,v, Degrees => {{1,0}, {1,0}, {0,1}, {0,1}}]
o1 = R
o1 : PolynomialRing
|
i2 : I = ideal(x*u, y*u, y*v) -- a birational map o2 = ideal (x*u, y*u, y*v) o2 : Ideal of R |
i3 : degreeOfMapIter(I, 5) o3 = 1 |
i4 : I = ideal(x*u, y*v, x*v + y*u) -- a non birational map o4 = ideal (x*u, y*v, y*u + x*v) o4 : Ideal of R |
i5 : degreeOfMapIter(I, 5) o5 = 2 |
i6 : A = matrix{ {x^5*u, x^2*v^2},
{y^5*v, x^2*u^2},
{0, y^2*v^2}
};
3 2
o6 : Matrix R <--- R
|
i7 : I = minors(2, A) -- a non birational
7 3 2 5 3 5 2 2 7 3
o7 = ideal (x u - x y v , x y u*v , y v )
o7 : Ideal of R
|
i8 : degreeOfMapIter(I, 5) o8 = 10 |
It only gives the correct answer if nteps is big enough to attain all the generators of the saturated special fiber ring.
The object degreeOfMapIter is a method function.