|  |  D.5.10.6 sheafCoh Procedure from librarysheafcoh.lib(see  sheafcoh_lib).
 
Example:Usage:
sheafCoh(M,l,h); M module, l,h int
Assume:
Mis graded, and it comes assigned with an admissible degree
vector as an attribute,h>=l. The baseringShasn+1variables.
Return:
intmat, cohomology of twists of the coherent sheaf F on P^n
associated to coker(M). The range of twists is determined by l,h.
Display:
The intmat is displayed in a diagram of the following form: 
 A|  |                 l            l+1                      h
  ----------------------------------------------------------
      n:     h^n(F(l))    h^n(F(l+1))   ......    h^n(F(h))
           ...............................................
      1:     h^1(F(l))    h^1(F(l+1))   ......    h^1(F(h))
      0:     h^0(F(l))    h^0(F(l+1))   ......    h^0(F(h))
  ----------------------------------------------------------
    chi:     chi(F(l))    chi(F(l+1))   ......    chi(F(h))
 | 
 '-'in the diagram refers to a zero entry.
Note:
The procedure is based on local duality as described in [Eisenbud:
Computing cohomology. In Vasconcelos: Computational methods in
commutative algebra and algebraic geometry. Springer (1998)].By default, the procedure uses
 mresto compute the Ext
modules. If called with the additional parameter"sres",
thesrescommand is used instead.
 See also:
 dimH;
 sheafCohBGG.|  | LIB "sheafcoh.lib";
//
// cohomology of structure sheaf on P^4:
//-------------------------------------------
ring r=0,x(1..5),dp;
module M=0;
def A=sheafCoh(0,-7,2);
==>       -7  -6  -5  -4  -3  -2  -1   0   1   2
==> --------------------------------------------
==>   4:  15   5   1   -   -   -   -   -   -   -
==>   3:   -   -   -   -   -   -   -   -   -   -
==>   2:   -   -   -   -   -   -   -   -   -   -
==>   1:   -   -   -   -   -   -   -   -   -   -
==>   0:   -   -   -   -   -   -   -   1   5  15
==> --------------------------------------------
==> chi:  15   5   1   0   0   0   0   1   5  15
//
// cohomology of cotangential bundle on P^3:
//-------------------------------------------
ring R=0,(x,y,z,u),dp;
resolution T1=mres(maxideal(1),0);
module M=T1[3];
intvec v=2,2,2,2,2,2;
attrib(M,"isHomog",v);
def B=sheafCoh(M,-6,2);
==>       -6  -5  -4  -3  -2  -1   0   1   2
==> ----------------------------------------
==>   3:  70  36  15   4   -   -   -   -   -
==>   2:   -   -   -   -   -   -   -   -   -
==>   1:   -   -   -   -   -   -   1   -   -
==>   0:   -   -   -   -   -   -   -   -   6
==> ----------------------------------------
==> chi: -70 -36 -15  -4   0   0  -1   0   6
 | 
 
 |