Repository navigation
Expand file tree
/
Copy pathhelixcats.m2
More file actions
60 lines (49 loc) · 1.81 KB
/
Copy pathhelixcats.m2
File metadata and controls
60 lines (49 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
needs "fano.m2"
needsPackage "JSON"
debug needsPackage "AssociativeAlgebras"
chern Complex := RingElement => C -> sum(pairs C.module, (i, M) -> (-1)^i * chern M)
ncListForm = f -> (
kk := coefficientRing ring f;
L := rawSparseListFormMonomial \ last rawPairs(raw kk, raw f);
apply(L, word -> splice apply(word, (i,e) -> e:i)))
braidMonomials = (d, n) -> (
F := QQ<|s_0..s_(n-1)|>;
-- commuting relations |i-j|>1
rel0 := flatten for i from 0 to n-3 list (
for j from i+2 to n-1 list (
F_i*F_j - F_j*F_i));
-- braid relations
rel1 := for i from 0 to n-2 list (
F_i*F_(i+1)*F_i - F_(i+1)*F_i*F_(i+1));
B := F / join(rel0, rel1);
ncBasis(0, d, B))
datadir = "~/Projects/M2/fano/_data/"
toJSON Array := o -> L -> if #L == 0 then "[]" else (
concatenate("[", demark_"," apply(L, x -> toJSON(x)), "]"))
end--
restart
needs "helixcats.m2"
n = 3
X = hirzebruchSurface 2
BT = (sheaf \ zonotopeBundles X)_{0,1,3,4}
ExtTable(X, BT)
OC = sheaf koszulComplex (vars ring X)_{1}
BT = sphericalTwist(OC, BT)
n = 4
X = fano(n, 0)
BT = lineBundle_X \ -fanoZonotopeDegrees(n, 0)
ExtTable(X, BT)
-- the list of braid mutations to try
B = braidMonomials(2, n)
-- the partial helices
H = hashTable apply(first entries B, word -> word => fold(-*reduce' @@*- mutate, BT, first ncListForm word));
H = selectPairs(H, (word, E) -> rank sum directSum E < 100); -- throws away a handful of really large ones
E = elapsedTime applyPairs(H, (word, E) -> word => ExtTable(X, E, Strategy => "Basic"))
(datadir | "helix-H" | 2 | ".json") << json(Indent => 2, Sort => true,
applyPairs(E, (k,v) ->
toExternalString k => hashTable {
"Chern" => toExternalString { apply(H#k, E -> chern E) },
"Ranks" => toExternalString { apply(H#k, E -> rank E) },
"Ext" => toExternalString entries v
})
) << close