i1 : kk = ZZ/101;
|
i2 : S=kk[x_0..x_4];
|
i3 : i=monomialCurveIdeal(S,{2,3,5,6})
2 3 2 2 2 2
o3 = ideal (x x - x x , x - x x , x x - x x , x - x x , x x - x x , x x
2 3 1 4 2 0 4 1 2 0 3 3 2 4 1 3 0 4 0 3
------------------------------------------------------------------------
2 2 3 2
- x x , x x - x x x , x - x x )
1 4 1 3 0 2 4 1 0 4
o3 : Ideal of S
|
i4 : time V1 = reesIdeal i;
-- used 0.160789 seconds
o4 : Ideal of S[w , w , w , w , w , w , w , w ]
0 1 2 3 4 5 6 7
|
i5 : time V2 = reesIdeal(i,i_0);
-- used 0.467449 seconds
o5 : Ideal of S[w , w , w , w , w , w , w , w ]
0 1 2 3 4 5 6 7
|
This example is particularly interesting upon a bit more exploration.
The difference is striking and, at least in part, explains the difference in computing time. Furthermore, if we compute a Grobner basis for both and compare the two matrices, we see that we indeed got the same ideal.
i8 : M1 = gens gb V1;
1 84
o8 : Matrix (S[w , w , w , w , w , w , w , w ]) <--- (S[w , w , w , w , w , w , w , w ])
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
|
i9 : M2 = gens gb V2;
1 84
o9 : Matrix (S[w , w , w , w , w , w , w , w ]) <--- (S[w , w , w , w , w , w , w , w ])
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
|
i10 : use ring M2
o10 = S[w , w , w , w , w , w , w , w ]
0 1 2 3 4 5 6 7
o10 : PolynomialRing
|
i11 : M1 = substitute(M1, ring M2);
1 84
o11 : Matrix (S[w , w , w , w , w , w , w , w ]) <--- (S[w , w , w , w , w , w , w , w ])
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
|
i12 : M1 == M2
o12 = true
|
i13 : numgens source M2
o13 = 84
|
Another example illustrates the power and usage of the code. We also show the output in this example. While a bit messy, the user can see how we handle the degrees in both cases.
i14 : S=kk[a,b,c]
o14 = S
o14 : PolynomialRing
|
i15 : m=matrix{{a,0},{b,a},{0,b}}
o15 = | a 0 |
| b a |
| 0 b |
3 2
o15 : Matrix S <--- S
|
i16 : i=minors(2,m)
2 2
o16 = ideal (a , a*b, b )
o16 : Ideal of S
|
i17 : time reesIdeal i
-- used 0.070926 seconds
2
o17 = ideal (b*w - a*w , b*w - a*w , w - w w )
1 2 0 1 1 0 2
o17 : Ideal of S[w , w , w ]
0 1 2
|
i18 : res i
1 3 2
o18 = S <-- S <-- S <-- 0
0 1 2 3
o18 : ChainComplex
|
i19 : m=random(S^3,S^{4:-1})
o19 = | 42a-50b+39c -39a+30b+19c -32a+31b-32c 15a+17b-28c |
| 9a-15b-22c -38a+2b-4c -38a+31b+24c 37a-22b-19c |
| 50a+45b-29c -36a-16b-6c -42a-50b-41c 45a-8b-31c |
3 4
o19 : Matrix S <--- S
|
i20 : i=minors(3,m)
3 2 2 3 2 2 2
o20 = ideal (19a - 9a b + 31a*b - 42b - a c + 12a*b*c + 20b c - 28a*c +
-----------------------------------------------------------------------
2 3 3 2 2 3 2 2
43b*c + 25c , - 10a - 42a b + 17a*b - 28b - 36a c + 21a*b*c - 20b c
-----------------------------------------------------------------------
2 2 3 3 2 2 3 2
- 29a*c - 3b*c - 22c , 35a + 32a b - 25a*b + 7b + 40a c + 50a*b*c
-----------------------------------------------------------------------
2 2 2 3 3 2 2 3 2
+ 46b c + 25a*c - 5b*c + 41c , 34a + 6a b + 6a*b + 21b - 24a c +
-----------------------------------------------------------------------
2 2 2 3
19a*b*c + 30b c + 4a*c - 28b*c + 28c )
o20 : Ideal of S
|
i21 : time I=reesIdeal (i,i_0);
-- used 0.028329 seconds
o21 : Ideal of S[w , w , w , w ]
0 1 2 3
|
i22 : transpose gens I
o22 = {-1, -4} | w_0c-45w_1a-3w_1b+35w_1c+47w_2a+12w_2b+44w_2c-23w_3a-8w_3b
{-1, -4} | w_0b+5w_1a+12w_1b-7w_1c+34w_2a+16w_2b-45w_2c+14w_3a-21w_3b
{-1, -4} | w_0a-28w_1b+35w_1c-14w_2a+13w_2b-7w_2c-w_3a-8w_3b-38w_3c
{-3, -9} | w_0^3+47w_0^2w_1-7w_0w_1^2+12w_1^3+46w_0^2w_2+13w_0w_1w_2-
-----------------------------------------------------------------------
-27w_3c
-37w_3c
46w_1^2w_2-12w_0w_2^2+3w_1w_2^2-38w_2^3-49w_0^2w_3-29w_0w_1w_3+39w_1^2w
-----------------------------------------------------------------------
|
|
|
_3+45w_0w_2w_3+48w_1w_2w_3-39w_0w_3^2+28w_1w_3^2-38w_2w_3^2-17w_3^3 |
4 1
o22 : Matrix (S[w , w , w , w ]) <--- (S[w , w , w , w ])
0 1 2 3 0 1 2 3
|
i23 : i=minors(2,m);
o23 : Ideal of S
|
i24 : time I=reesIdeal (i,i_0);
-- used 0.11572 seconds
o24 : Ideal of S[w , w , w , w , w , w , w , w , w , w , w , w , w , w , w , w , w , w ]
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
i25 : R = ZZ/32003[x,y,z]
o25 = R
o25 : PolynomialRing
|
i26 : I = ideal(x,y)
o26 = ideal (x, y)
o26 : Ideal of R
|
i27 : cusp = ideal(x^2*z-y^3)
3 2
o27 = ideal(- y + x z)
o27 : Ideal of R
|
i28 : RI = reesIdeal(I)
o28 = ideal(y*w - x*w )
0 1
o28 : Ideal of R[w , w ]
0 1
|
i29 : S = ring RI
o29 = S
o29 : PolynomialRing
|
i30 : totalTransform = substitute(cusp, S) + RI
3 2
o30 = ideal (- y + x z, y*w - x*w )
0 1
o30 : Ideal of S
|
i31 : D = decompose totalTransform -- the components are the proper transform of the cuspidal curve and the exceptional curve
3 2 2 2 2
o31 = {ideal (y*w - x*w , y - x z, x*z*w - y w , z*w - y*w ), ideal (y,
0 1 0 1 0 1
-----------------------------------------------------------------------
x)}
o31 : List
|
i32 : totalTransform = first flattenRing totalTransform
3 2
o32 = ideal (- y + x z, w y - w x)
0 1
ZZ
o32 : Ideal of -----[w , w , x, y, z]
32003 0 1
|
i33 : L = primaryDecomposition totalTransform
3 2 2 2 2 2
o33 = {ideal (w y - w x, y - x z, w x*z - w y , w z - w y), ideal (y , x*y,
0 1 0 1 0 1
-----------------------------------------------------------------------
2
x , w y - w x)}
0 1
o33 : List
|
i34 : apply(L, i -> (degree i)/(degree radical i))
o34 = {1, 2}
o34 : List
|
The total transform of the cusp contains the exceptional with multiplicity two. The proper transform of the cusp is a smooth curve but is tangent to the exceptional curve.
i35 : use ring L_0
ZZ
o35 = -----[w , w , x, y, z]
32003 0 1
o35 : PolynomialRing
|
i36 : singular = ideal(singularLocus(L_0));
ZZ
o36 : Ideal of -----[w , w , x, y, z]
32003 0 1
|
i37 : SL = saturate(singular, ideal(x,y,z));
ZZ
o37 : Ideal of -----[w , w , x, y, z]
32003 0 1
|
i38 : saturate(SL, ideal(w_0,w_1)) -- we get 1 so it is smooth.
o38 = ideal 1
ZZ
o38 : Ideal of -----[w , w , x, y, z]
32003 0 1
|