## M953 Homework 6 Solutions

Due Friday, March 15, 2002

[1] Let R = k[x1, ..., xn] and let Rd denote the subset of all polynomials in R of degree d or less, including 0. Now let S = k[x0, ..., xn] and let Sd denote the subset of all homogeneous polynomials in S of degree d, including 0. Note that both Rd and Sd are k vector spaces. (Part (b) is optional; it's really just for those people who haven't seen "stars and bars" before.)
• (a) Show that dimkRd = dimkSd.
• (b) Show that dimkSd is equal to the binomial coefficient "n+d choose d". [Hint: count the number of monomials of degree d by writing each monomial as a product, not using exponents. For example, say n = 3, and consider x02x2x33 to be x0x0x2x3x3x3. But you can indicate the same information by replacing the variables by *'s, and separating the different variables by |'s. So x0x0x2x3x3x3 becomes **||*|***, meaning two x0's, no x1's, one x2, and three x3's.]

Solution:
• (a) A basis for Rd is given by the set A = {x1m1...xnmn : m1 + ... + m1 <= d} of monomials in x1, ..., xn of degree at most d. A basis for Sd is given by the set B = {x0m0...xnmn : m0 + ... + m1 = d} of monomials in x0, ..., xn of degree exactly d. We get a map f : B -> A by plugging 1 into x0. This map is bijective, since given f(b) it is easy to write down b (if d = 7 and f(b) = x12x2, then obviously b = x04x12x2). Thus f is injective. And for any monomial M in A, deg(M) <= d, so x0d-deg(M)M is in B and f(x0d-deg(M)M) = M, so f is surjective. Thus Rd and Sd have the same dimension.
• (b) A monomial of degree d is specified by saying how many factors of each variable xi occur in the monomial. This can be done by writing d stars, and inserting n bars to indicate which variable each star corresponds to. (We only need n bars, because just as one cut splits a sandwich into two pieces, n bars split the stars into n+1 subsets, one subset per variable.) Thus there is a bijective correspondence between elements of S and arrangements of d stars and n bars. But there are n+d choose d ways to arrange a set of n+d objects, split into two subsets of n identical objects, and d identical objects different from the other n.
[2] In this problem assume, F is in k[x,y], where k is the complex numbers.
• (a) Find each singular point p of F = x^2*y - y^2 + 2*y - 1, and for each one, find its multiplicity mp(F) and all tangent lines at p. Check your answer using Macaulay2.
• (b) Use Macaulay2 to find the singular points of F = x^4 + 2*x^2*y^2 + 2*x^3 + 2*x*y^2 + x^2 + y^2. For each singular point p, find its multiplicity mp(F) and all tangent lines at p.
• Notes: Recall that a point p is singular if and only if p is in V(F, Fx, Fy), where Fx and Fy represent partial derivatives with respect to x and y, resp. In Macaulay2, for any ideal I, we can find V(I) via the command decompose I. You can also use Macaulay2 to simplify substitutions: given F(x,y) = x^2 - y^3, to find F(x+1,y-3), simply input (x+1)^2 - (y-3)^3, as in the following example:
```     i11 : (x+1)^2 - (y-3)^3

3    2     2
o11 = - y  + x  + 9y  + 2x - 27y + 28
```

Solution:
• (a) The set of singular points is V(F, Fx, Fy). Here F = x^2*y - y^2 + 2*y - 1, Fx = 2*x*y, and Fy = x^2 - 2*y + 2. But Fx = 0 means either x = 0 or y = 0. If x = 0, then F = 0 gives - y^2 + 2*y - 1 = 0, so y = 1, and since (0,1) is in the 0-locus of Fy, we see that (0,1) is a singular point. If y = 0, then F = -1, so (0,1) is the only singular point. To find mp(F), we simplify F(x,y+1). We find F(x,y+1) = x^2*y + x^2 - y^2, so mp(F) = 2, and the tangents at p (in the p-centered coordinates) are the factors of x^2 - y^2; i.e., x-y and x+y. In the original coordinates, the tangents are x-(y-1) and x+(y-1). Here is how to do it in Macaulay2:
```i1 : R = QQ[x,y]

o1 = R

o1 : PolynomialRing

i2 : I = ideal(x^2*y - y^2 + 2*y - 1, 2*x*y, x^2-2*y+2)

2     2                  2
o2 = ideal (x y - y  + 2y - 1, 2x*y, x  - 2y + 2)

o2 : Ideal of R

i3 : decompose I

o3 = {ideal (y - 1, x)}

o3 : List

-- THIS SHOWED THAT THE ONLY SINGULAR POINT IS x = 0, y = 1; I.E. p = (0,1).

i4 : x^2*(y+1) - (y+1)^2 + 2*(y+1) - 1

2     2    2
o4 = x y + x  - y

-- HERE WE SAW THAT mp(F) = 2, AND
-- THAT THE TANGENT LINES AT p ARE THE FACTORS
-- OF x^2 - y^2, OR x-y AND x+y.
-- BUT THOSE COORDINATES ARE CENTERED AT p.
-- IN TERMS OF OUR ORIGINAL COORDINATES,
-- THE TANGENT LINES ARE x - (y-1) AND x + (y-1).

(b)
i5 : I = ideal(x^4 + 2*x^2*y^2 + 2*x^3 + 2*x*y^2 + x^2 + y^2, 4*x^3+4*y^2*x+6*x^2+2*y^2+2*x, 4*y*x^2+4*x*y+2*y)

4     2 2     3       2    2    2    3       2     2     2         2
o5 = ideal (x  + 2x y  + 2x  + 2x*y  + x  + y , 4x  + 4x*y  + 6x  + 2y  + 2x, 4x y + 4x*y + 2y)

o5 : Ideal of R

i6 : decompose I

o6 = {ideal (y, x), ideal (y, x + 1)}

o6 : List

i7 : (x-1)^4 + 2*(x-1)^2*y^2 + 2*(x-1)^3 + 2*(x-1)*y^2 + (x-1)^2 + y^2

4     2 2     3       2    2    2
o7 = x  + 2x y  - 2x  - 2x*y  + x  + y

-- SO WE SEE THAT THE ONLY SINGULAR POINTS ARE
-- (0,0) AND (-1,0), THAT FOR BOTH mp(F) = 2
-- AND THAT THE TANGENTS AT (0,0) ARE THE FACTORS
-- OF x^2 + y^2, OR x + iy and x - iy.
-- AT (-1,0), IN COORDINATES CENTERED AT (-1,0),
-- THE TANGENTS ARE AGAIN THE FACTORS OF x^2 + y^2,
-- OR x + iy and x - iy. IN TERMS OF OUR ORIGINAL
-- COORDINATES, THEY ARE (x+1) - iy and (x+1) + iy.

[3] Calculate the intersection multiplicity
I(p, F^G) [note: I'm using ^ to denote intersection]
for each F and G below. In each case, assume p = (0,0). Check your answers
with Macaulay2.

(a) F = y^2-x^5, G = y^2*x^2-x^5-y^5
(b) F = y^2-x^3, G = (y^2+x^2)^2+3*x^2*y-y^3
(c) F = y^4+x^4-x^3 G = y^3*x^2+y^5+x^2

Solution:

(a) Let H = G - F = y^2*x^2 - y^5 - y^2 = y^2*(x^2 - y^3 - 1). Then
I(p, F^G) = I(p, F^H), but since (x^2 - y^3 - 1) doesn't vanish at (0,0),
we can factor it out of H and we have I(p, F^H) = I(p, F^(y^2))
= I(p, (y^2)^F) = I(p, (y^2)^(F-y^2)) = I(p, (y^2)^-(F-y^2))
= I(p, (y^2)^(x^5)), and since y^2 and x^5 have no tangents in common at p
we can just multiply the multiplicities of the tangents to get I(p, (y^2)^(x^5)) = 2*5 = 10.
(b) Since F = y^2 - x^3, any place a y^2 appears in G we can replace it by x^3.
The new G will differ from the old one by a multiple of F, and the intersection multiplicities
will be unchanged. Thus I(p, F^G) = I(p, F^H), if H = (x^3+x^2)^2 + 3*x^2*y - y*x^3.
But H = x^2((x^2+x)^2 + 3*y - y*x), so I(p, F^H) = I(p, F^(x^2)) +
I(p, F^((x^2+x)^2 + 3*y - y*x)) = 2*2 + I(p, F^((x^2+x)^2 + 3*y - y*x)).
Now I(p, F^((x^2+x)^2 + 3*y - y*x)) =
I(p, (y*((x^2+x)^2 + 3*y - y*x) - 3*F)^((x^2+x)^2 + 3*y - y*x)),
but as above we can change y*((x^2+x)^2 + 3*y - y*x) - 3*F = y*(x^2+x)^2 - y^2*x + 3*x^3 to
y*(x^2+x)^2 - x^3*x + 3*x^3 = x^2(y*(x+1)^2 - x^2 + 3*x) without changing the intersection
multiplicity, so I(p, F^((x^2+x)^2 + 3*y - y*x)) =
I(p, (x^2(y*(x+1)^2 - x^2 + 3*x))^((x^2+x)^2 + 3*y - y*x)) =
I(p, (x^2)^((x^2+x)^2 + 3*y - y*x)) + I(p, (y*(x+1)^2 - x^2 + 3*x)^((x^2+x)^2 + 3*y - y*x)) =
2*1 + I(p, (y*(x+1)^2 - x^2 + 3*x)^((x^2+x)^2 + 3*y - y*x)).
But the tangent to (y*(x+1)^2 - x^2 + 3*x) at (0,0) is y+3*x, while the tangent
to ((x^2+x)^2 + 3*y - y*x) is 3*y. These are different so
I(p, (y*(x+1)^2 - x^2 + 3*x)^((x^2+x)^2 + 3*y - y*x)) = 1*1 = 1. Thus
I(p, F^G) = 2*2 + 2*1 + 1*1 = 7.
(c) This time F = -y^4 + x^4 + x^3 G = y^3*x^2 + y^5 + x^2.
Replace G by G + y*F = y^3*x^2 + x^2 + y*x^4 + y*x^3 = x^2*(y^3 + 1 + y*x^2 + y*x).
Since y^3 + 1 + y*x^2 + y*x does not vanish at p = (0,0), we can replace this new G by
x^2. Thus I(p, F^G) = I(p, F^(x^2)) = I(p, (y^4)^(y)) = 2*4 = 8.

Here are the same results, done by Macaulay2:

i8 : findIntMult(ideal(y^2 - x^5,y^2*x^2 - x^5 - y^5),ideal(x,y),R)

o8 = 10

i9 : findIntMult(ideal(y^2-x^3,(y^2+x^2)^2+3*x^2*y-y^3),ideal(x,y),R)

o9 = 7

i10 : findIntMult(ideal(y^4+x^4-x^3,y^3*x^2+y^5+x^2),ideal(x,y),R)

o10 = 8

Here are some useful Macaulay2 routines to compute intersection multiplicities.
Assuming R = k[x,y] is your ring, P = I(p) is the ideal of a point p in the plane,
and I = ideal(f,g) for some polynomials f and g in R which have no common factor
vanishing at p, then mylocalize(I,P,R) gives the ideal Qi
corresponding to p in the minimal primary decomposition
I = Q1^...^Qr of I.
Thus I(p, F^G) = dimkR/Qi, as discussed in class,
but the Macaulay2 command for "dim" in this case is degree
so I(p, F^G) = degree( R/mylocalize(I,P,R) ).

Now, mylocalize is not built in, it's actually a Macaulay2 script that I define
below. You can copy it from the web page for the homework and paste it into Macaulay2
(the whole thing all at once). For convenience we can also define a second script
that calls mylocalize to calculate I(p, F^G) in one step.
Here are the scripts. Below I give a sample session using them.
findIntMult = (I,P,R) -> (
if(dim(R/mylocalize(I,P,R)) > 0 ) then
print "The intersection multiplicity is infinite!!!!!!" else
degree( R/mylocalize(I,P,R) ))

mylocalize = (I,P,R) -> (
L:=primaryDecomposition I;
j:=-1;
J:= I;
B:= ideal (matrix {{1}}**R);  -- Make B the ideal (1) but in current ring, not ZZ.
scan(#L, i->(
J=(L_i)*ideal (matrix {{1}}**R);  -- convert L_i into an ideal if it's of type MonomialIdeal
if( (P:J) == (ideal (matrix {{1}}**R)) ) then B=intersect(B,J);
));
B)

Sample Session:
Macaulay 2, version 0.9.2
--Copyright 1993-2001, D. R. Grayson and M. E. Stillman
--Singular-Factory 1.3c, copyright 1993-2001, G.-M. Greuel, et al.
--Singular-Libfac 0.3.2, copyright 1996-2001, M. Messollen

i1 : R = QQ[x,y]

o1 = R

o1 : PolynomialRing

i2 : findIntMult = (I,P,R) -> (
if(dim(R/mylocalize(I,P,R)) > 0 ) then
print "The intersection multiplicity is infinite!!!!!!" else
degree( R/mylocalize(I,P,R) ))

mylocalize = (I,P,R) -> (
L:=primaryDecomposition I;
j:=-1;
J:= I;
B:= ideal (matrix {{1}}**R);  -- Make B the ideal (1) but in current ring, not ZZ.
scan(#L, i->(
J=(L_i)*ideal (matrix {{1}}**R);  -- convert L_i into an ideal if it's of type MonomialIdeal
if( (P:J) == (ideal (matrix {{1}}**R)) ) then B=intersect(B,J);
));
B)

o2 = findIntMult

o2 : Function

i3 :
o3 = mylocalize

o3 : Function

i4 : findIntMult(ideal(x^3,y^4),ideal(x,y),R)

o4 = 12

i5 : quit

Notes:
(1) matrix {{1}} makes a 1x1 matrix whose entry is 1. But
ideal (matrix {{1}}) would be the unit ideal in ZZ, not R.
To get the unit ideal in R we need to tensor by R, hence I use
ideal (matrix {{1}}**R) in the script; "**" denotes tensoring.

(2) The colon in L:=primaryDecomposition I makes L into a local variable,
so you don't overwrite other L's you may have defined outside of the script.

(3) Now, primaryDecomposition I is a list of ideals. Thus L
is a list whose (i+1)st item is L_i (so L_0 is the first
item in the list); #L is the number of entries in the list, and
scan(#L, i->( various commands go here ) ) makes i run from
0 to #L-1.

(4) P:J is the usual colon operation in commutative algebra; it is the
ideal of all f in R such that fJ is contained in P. Thus P:J = (1)
if and only if P contains J, so
if( (P:J) == (ideal (matrix {{1}}**R)) ) then B=intersect(B,J)
intersects B with J if P contains J. Together with the scan statement
the effect is to make B the intersection of all ideals
in the minimal primary decomposition
of I which are contained in P.

```