Graded free resolutions#

Let \(R\) be a commutative ring. A graded free resolution of a graded \(R\)-module \(M\) is a free resolution such that all maps are homogeneous module homomorphisms.

EXAMPLES:

sage: S.<x,y,z,w> = PolynomialRing(QQ)
sage: I = S.ideal([y*w - z^2, -x*w + y*z, x*z - y^2])
sage: r = I.graded_free_resolution(algorithm='minimal')
sage: r
S(0) <-- S(-2)⊕S(-2)⊕S(-2) <-- S(-3)⊕S(-3) <-- 0
sage: I.graded_free_resolution(algorithm='shreyer')
S(0) <-- S(-2)⊕S(-2)⊕S(-2) <-- S(-3)⊕S(-3) <-- 0
sage: I.graded_free_resolution(algorithm='standard')
S(0) <-- S(-2)⊕S(-2)⊕S(-2) <-- S(-3)⊕S(-3) <-- 0
sage: I.graded_free_resolution(algorithm='heuristic')
S(0) <-- S(-2)⊕S(-2)⊕S(-2) <-- S(-3)⊕S(-3) <-- 0
sage: d = r.differential(2)
sage: d
Free module morphism defined as left-multiplication by the matrix
[ y  x]
[-z -y]
[ w  z]
Domain: Ambient free module of rank 2 over the integral domain Multivariate Polynomial Ring
in x, y, z, w over Rational Field
Codomain: Ambient free module of rank 3 over the integral domain Multivariate Polynomial Ring
in x, y, z, w over Rational Field
sage: d.image()
Submodule of Ambient free module of rank 3 over the integral domain Multivariate Polynomial Ring
in x, y, z, w over Rational Field
Generated by the rows of the matrix:
[ y -z  w]
[ x -y  z]
sage: m = d.image()
sage: m.graded_free_resolution(shifts=(2,2,2))
S(-2)⊕S(-2)⊕S(-2) <-- S(-3)⊕S(-3) <-- 0

An example of multigraded resolution from Example 9.1 of [MilStu2005]:

sage: R.<s,t> = QQ[]
sage: S.<a,b,c,d> = QQ[]
sage: phi = S.hom([s, s*t, s*t^2, s*t^3])
sage: I = phi.kernel(); I
Ideal (c^2 - b*d, b*c - a*d, b^2 - a*c) of Multivariate Polynomial Ring in a, b, c, d over Rational Field
sage: P3 = ProjectiveSpace(S)
sage: C = P3.subscheme(I)  # twisted cubic curve
sage: r = I.graded_free_resolution(degrees=[(1,0), (1,1), (1,2), (1,3)])
sage: r
S((0, 0)) <-- S((-2, -4))⊕S((-2, -3))⊕S((-2, -2)) <-- S((-3, -5))⊕S((-3, -4)) <-- 0
sage: r.K_polynomial(names='s,t')
s^3*t^5 + s^3*t^4 - s^2*t^4 - s^2*t^3 - s^2*t^2 + 1

AUTHORS:

  • Kwankyu Lee (2022-05): initial version

  • Travis Scrimshaw (2022-08-23): refactored for free module inputs

class sage.homology.graded_resolution.GradedFiniteFreeResolution(module, degrees=None, shifts=None, name='S', **kwds)#

Bases: FiniteFreeResolution

Graded finite free resolutions.

INPUT:

  • module – a homogeneous submodule of a free module \(M\) of rank \(n\) over \(S\) or a homogeneous ideal of a multivariate polynomial ring \(S\)

  • degrees – (default: a list with all entries \(1\)) a list of integers or integer vectors giving degrees of variables of \(S\)

  • shifts – a list of integers or integer vectors giving shifts of degrees of \(n\) summands of the free module \(M\); this is a list of zero degrees of length \(n\) by default

  • name – a string; name of the base ring

Warning

This does not check that the module is homogeneous.

K_polynomial(names=None)#

Return the K-polynomial of this resolution.

INPUT:

  • names – (optional) a string of names of the variables of the K-polynomial

EXAMPLES:

sage: S.<x,y,z,w> = PolynomialRing(QQ)
sage: I = S.ideal([y*w - z^2, -x*w + y*z, x*z - y^2])
sage: r = I.graded_free_resolution()
sage: r.K_polynomial()
2*t^3 - 3*t^2 + 1
betti(i, a=None)#

Return the \(i\)-th Betti number in degree \(a\).

INPUT:

  • i – nonnegative integer

  • a – a degree; if None, return Betti numbers in all degrees

EXAMPLES:

sage: S.<x,y,z,w> = PolynomialRing(QQ)
sage: I = S.ideal([y*w - z^2, -x*w + y*z, x*z - y^2])
sage: r = I.graded_free_resolution()
sage: r.betti(0)
{0: 1}
sage: r.betti(1)
{2: 3}
sage: r.betti(2)
{3: 2}
sage: r.betti(1, 0)
0
sage: r.betti(1, 1)
0
sage: r.betti(1, 2)
3
shifts(i)#

Return the shifts of self.

EXAMPLES:

sage: S.<x,y,z,w> = PolynomialRing(QQ)
sage: I = S.ideal([y*w - z^2, -x*w + y*z, x*z - y^2])
sage: r = I.graded_free_resolution()
sage: r.shifts(0)
[0]
sage: r.shifts(1)
[2, 2, 2]
sage: r.shifts(2)
[3, 3]
sage: r.shifts(3)
[]
class sage.homology.graded_resolution.GradedFiniteFreeResolution_free_module(module, degrees=None, *args, **kwds)#

Bases: GradedFiniteFreeResolution, FiniteFreeResolution_free_module

Graded free resolution of free modules.

Warning

This does not check that the module is homogeneous.

EXAMPLES:

sage: from sage.homology.free_resolution import FreeResolution
sage: R.<x> = QQ[]
sage: M = matrix([[x^3, 3*x^3, 5*x^3],
....:             [0, x, 2*x]])
sage: res = FreeResolution(M, graded=True)
sage: res
S(0)⊕S(0)⊕S(0) <-- S(-3)⊕S(-1) <-- 0
class sage.homology.graded_resolution.GradedFiniteFreeResolution_singular(module, degrees=None, shifts=None, name='S', algorithm='heuristic', **kwds)#

Bases: GradedFiniteFreeResolution, FiniteFreeResolution_singular

Graded free resolutions of submodules and ideals of multivariate polynomial rings implemented using Singular.

INPUT:

  • module – a homogeneous submodule of a free module \(M\) of rank \(n\) over \(S\) or a homogeneous ideal of a multivariate polynomial ring \(S\)

  • degrees – (default: a list with all entries \(1\)) a list of integers or integer vectors giving degrees of variables of \(S\)

  • shifts – a list of integers or integer vectors giving shifts of degrees of \(n\) summands of the free module \(M\); this is a list of zero degrees of length \(n\) by default

  • name – a string; name of the base ring

  • algorithm – Singular algorithm to compute a resolution of ideal

If module is an ideal of \(S\), it is considered as a submodule of a free module of rank \(1\) over \(S\).

The degrees given to the variables of \(S\) are integers or integer vectors of the same length. In the latter case, \(S\) is said to be multigraded, and the resolution is a multigraded free resolution. The standard grading where all variables have degree \(1\) is used if the degrees are not specified.

A summand of the graded free module \(M\) is a shifted (or twisted) module of rank one over \(S\), denoted \(S(-d)\) with shift \(d\).

The computation of the resolution is done by using libSingular. Different Singular algorithms can be chosen for best performance.

OUTPUT: a graded minimal free resolution of ideal

The available algorithms and the corresponding Singular commands are shown below:

algorithm

Singular commands

minimal

mres(ideal)

shreyer

minres(sres(std(ideal)))

standard

minres(nres(std(ideal)))

heuristic

minres(res(std(ideal)))

Warning

This does not check that the module is homogeneous.

EXAMPLES:

sage: S.<x,y,z,w> = PolynomialRing(QQ)
sage: I = S.ideal([y*w - z^2, -x*w + y*z, x*z - y^2])
sage: r = I.graded_free_resolution()
sage: r
S(0) <-- S(-2)⊕S(-2)⊕S(-2) <-- S(-3)⊕S(-3) <-- 0
sage: len(r)
2

sage: I = S.ideal([z^2 - y*w, y*z - x*w, y - x])
sage: I.is_homogeneous()
True
sage: r = I.graded_free_resolution()
sage: r
S(0) <-- S(-1)⊕S(-2)⊕S(-2) <-- S(-3)⊕S(-3)⊕S(-4) <-- S(-5) <-- 0