-- Macaulay2 bootcamp 2/9/2018 restart -- Make a polynomial ring S = QQ[x_1..x_9] M = genericMatrix(S,3,3) -- Ideal of 2x2 minors of M I = minors(2,M) -- Free resolution of S/I F = res I -- Graded Betti table of S/I betti F -- The differential maps F.dd_1 F.dd_2 F.dd_3 F.dd_4 betti F -- The Hilbert Series hilbertSeries I reduceHilbert oo dim comodule I degree I hilbertPolynomial( I,Projective=>false) coefficients leadTerm oo first flatten entries last coefficients leadTerm hilbertPolynomial(I,Projective=>false) oo * 4! -- The multiplicity is 6 dim comodule I codim I codim I == pdim comodule I -- comodule I means S/I as an S-module -- S/I is Cohen-Macualay since codim(I) = projdim(S/I) ass I isPrime I restart S = QQ[x,y,a,b,c] I = ideal(x^3,y^3,x^2*a+x*y*b+y^2*c) betti res I codim I == pdim comodule I -- Not Cohen-Macaulay! dim comodule I -- This is a surface in P^4 ass I primaryDecomposition I -- This is a non-reduced plane in P^4 with embedding components degree I J = saturate I -- Saturating removes components primary to the maximal (irrelevant) ideal ass J betti res J degree J -- This doesn't affect the degree or dimension but it does affect the algebra / resolution! radical I restart S = ZZ/101[x_0..x_8] R = ZZ/101[s,t,u] f = map(R,S,{s^3,s^2*t,s*t^2,t^3,t^2*u,t*u^2,u^3,u^2*s,u*s^2}) I = kernel f betti res I transpose gens gb I -- No quadratic Groebner basis but this example is still Koszul, i.e. k has a linear free -- resolution over S/I: R = S/I k = comodule ideal vars R betti res (k,LengthLimit=>5) restart S = QQ[x_0..x_8,MonomialOrder=>Lex] R = QQ[s,t,u] f = map(R,S,{s^3,s^2*t,s*t^2,t^3,t^2*u,t*u^2,u^3,u^2*s,u*s^2}) I = kernel f betti res I transpose gens gb I J = eliminate(x_0,I) betti res J degree I degree J -- We projected from a point on V(I), thus the degree drops for this projection betti res I betti res J codim I codim J restart T = QQ[x,y,z] loadPackage"InvariantRing" S3=generateGroup({matrix{{0,1,0},{0,0,1},{1,0,0}},matrix{{0,1,0},{1,0,0},{0,0,1}}},QQ) inv=invariantRing(T,S3) L = toList flatten inv L = remove(L,3) n = length L R = QQ[u_1..u_n] f = map(T,R,L) P = kernel f -- The invariant ring is a polynomial ring. restart S = QQ[x,y] loadPackage"InvariantRing" C4=generateGroup({matrix{{0,-1},{1,0}}},QQ) inv=invariantRing(S,C4) R = QQ[A,B,C,Degrees=>{2,4,4}] f = map(S,R,{x^2+y^2,-x^3*y+x*y^3,x^4+y^4}) P = kernel f -- The invariant ring is a hypersurface ring. restart T = QQ[x,y,z] loadPackage"InvariantRing" C4=generateGroup({matrix{{0,0,1},{0,-1,0},{-1,0,0}}},QQ) inv=invariantRing(T,C4) L = toList flatten inv L = remove(L,3) n = length L R = QQ[u_1..u_n] f = map(T,R,L) P = kernel f betti res P codim P -- The invariant ring is Cohen-Macaulay! D=flatten apply(L,x->degree x)