Greg
unread,Nov 9, 2009, 11:51:38 AM11/9/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Macaulay2
René:
I would do the something like the following:
hh(ZZ,ToricVectorBundle,ZZ) := ZZ => (i,E,u) -> ( ... )
A silly example illustrating the idea and how I discovered it
is given below.
-- Greg.
Macaulay2, version 1.3.1
with packages: ConwayPolynomials, Elimination, IntegralClosure,
LLLBases, PrimaryDecomposition, ReesAlgebra,
SchurRings,
TangentCone
i1 : methods(hh)
o1 = {(hh, Sequence, ProjectiveVariety)}
o1 : VerticalList
i2 : code(hh,Sequence,ProjectiveVariety)
o2 = -- code for method: hh(Sequence,ProjectiveVariety)
/Applications/Macaulay2-1.3.1/share/Macaulay2/Core/
varieties.m2:431:42-440:6: --source code:
hh(Sequence,ProjectiveVariety) := (pq,X) -> if X.cache.?hh and
X.cache.hh#?pq then X.cache.hh#pq else (
(p,q) := pq;
if class p =!= ZZ or class q =!= ZZ then error "expected
integer superscripts";
d := dim X;
pqs := { (p,q), (q,p), (d-p,d-q), (d-q,d-p) };
(p,q) = min { (p,q), (q,p), (d-p,d-q), (d-q,d-p) };
h := rank HH^q cotangentSheaf(p,X);
if not X.cache.?hh then X.cache.hh = new MutableHashTable;
scan(pqs, pq -> X.cache.hh#pq = h);
h)
i3 : hh(ZZ,QQ) := QQ => (pq,r) -> 3*pq*r;
i4 : hh^1(2/1)
o4 = 6
o4 : QQ
i5 : hh^2(2/1)
o5 = 12
o5 : QQ
i6 : hh^3(1/2)
9
o6 = -
2
o6 : QQ