--Lecture 6, Demo 1: --Miller--Sturmfels Ex. 1.8 restart needsPackage "SimplicialComplexes" S = QQ[a..e,Degrees=>entries (id)_(ZZ^5)] --Define a simplicial complex via its facets: Delta = simplicialComplex {a*b*c, b*d, c*d, e} I = monomialIdeal Delta r = res I r.dd r.dd_0 ker r.dd_1 == image r.dd_2 HH r prune HH r ----- --Lecture 6, Demo 2: netList degrees r_0 netList degrees r_1 netList degrees r_2 netList degrees r_3 netList degrees r_4 C = chainComplex Delta C.dd HH C prune HH C --Remove e: prune HH simplicialComplex {a*b*c, b*d, c*d} -- Betti number in 4-1-1=2 --Remove d: prune HH simplicialComplex {a*b*c, e} -- 4-1-0=3 --Remove b,c: prune HH simplicialComplex {a, d, e} -- 3-1-0, rank 2 --Remove b,c,e: prune HH simplicialComplex {a, d} -- 2-1-0=1 ----------- ----------- --Lecture 6, Demo 3: restart needsPackage "VirtualResolutions" needsPackage "SimplicialComplexes" --Now we use a PP1xPP2 grading: S = QQ[a..e,Degrees=>{{1,0},{1,0},{0,1},{0,1},{0,1}}] B0 = ideal(a,b) B1 = ideal(c,d,e) B = intersect(B0,B1) --Same Delta as before, but with new grading: Delta = simplicialComplex {a*b*c, b*d, c*d, e} I = monomialIdeal Delta --Same free resolution as before, with collapsed grading: r = res I --Intersect I with component(s) of B to get virtual resolution: I' = intersect(ideal I,B0^1,B1^0) v = res I' --This one is short (= dim X), which is a good start. v.dd simplicialComplex monomialIdeal I' --How does this relate to Delta? --Also, intersect I with braket powers of component(s) of B --to get virtual resolution: I' = intersect(ideal I,B0^[2],B1^0) v = res I' --This one is short (= dim X), which is a good start. v.dd --Saturate with respect to B to --remove components of I supported on B. --Its resolution will also be a virtual resolution of I: J = saturate(I,B) s = res J s.dd --This is a particularly nice resolution, --called a Koszul complex! --This means that S/I is a VCI! simplicialComplex monomialIdeal J --How does this relate to Delta? --Another way to create a virtual resolution: L = findGensUpToIrrelevance(4,I,B) r' = res ideal apply(L#0,l-> I_l) J' = monomialIdeal image r'.dd_1 simplicialComplex J'