The main reason to implement algebraic varieties is support the computation of sheaf cohomology of coherent sheaves, which doesn't have an immediate description in terms of graded modules.
In this example, we use cotangentSheaf to produce the cotangent sheaf on a K3 surface and compute its sheaf cohomology.
i1 : R = QQ[a,b,c,d]/(a^4+b^4+c^4+d^4); |
i2 : X = Proj R |
i3 : Omega = cotangentSheaf X |
i4 : HH^1(Omega) |
Use the function sheaf to convert a graded module to a coherent sheaf, and module to get the graded module back again.
i5 : F = sheaf coker matrix {{a,b}} |
i6 : module F |
See also: