-- This is code related to HW 1 for Math 615, Winter 2013
-- By: Daniel Erman
-- Exercise 4
S = QQ[x_0..x_3]
I = ideal(x_0^3-x_1^3,x_2^2+x_2*x_3,x_3^3);
dim I
-- Note that for an ideal I, "dim I" returns the same thing as "dim S^1/I" or "dim S/I"
dim (S/I)
dim (S^1/I)
-- Exercise 5
-- You can do this one by hand or in Macaulay2. This will get you started in Macaulay2:
S = QQ[a,b,c,d];
viewHelp matrix
viewHelp ker
-- Exercise 6
phi = map(ZZ^2,ZZ^4,matrix{{1,3,11,8},{5,19,67,60}})
-- the next command will explain the syntax behind defining a map
viewHelp map
Q = coker phi
-- you can get the annihilator of Q as follows:
annihilator Q
-- to get a minimal set of generators, you can do
mingens annihilator Q
-- Note that "ann" is the same as "annihilator"