Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Project: admcycles
Views: 724
Visibility: Unlisted (only visible to those who know the link)
Image: ubuntu2004
1
r"""
2
Chern character of the derived pushforward of a line bundle `\O(D)` on
3
the universal curve C_{g,n} over the space Mbar_{g,n} of stable curves via
4
the Grothendieck-Riemann-Roch (GRR) formula.
5
6
The algorithm implemented is the formula of Theorem 1 from the paper [PRvZ] of
7
Pagani, Ricolfi and van Zelm. The formula itself is in the function
8
``generalized_hodge_chern(l,d,a,dmax,g,n)`` where using the notation from [PRvZ]:
9
10
- ``l`` is the integer l from equation (0.1)
11
- ``d`` is a list [d_1,...,d_n]
12
- ``a`` is a list of triples [h,S,a_{h,S}], where h is an integer and S a list
13
so that [h,S] indicates the graph with two vertices and one edge with genus h
14
on the left and markings S on the left. The integer a_{h,S} is the
15
corresponding value to this graph from equation (0.1). Only the graphs with
16
nonzero a_{h,S} need to be entered.
17
18
- ``dmax`` is the maximal codim to which we want to compute the formula of Theorem 1.
19
- ``g`` and ``n`` are respectively the genus and the number of marked points
20
21
As described in the paper [PRvZ] this can be used to compute the DR cycle in
22
certain cases (namely when (d=[0,...,\pm 1,...,\mp 1,...,0]). The DR cycle can
23
be computed directly in this case by
24
25
DR_phi(g,d)
26
27
The DR cycle can also be computed using [JPPZ]. This method has already been
28
implemented in admcycles.sage as DR_cycle(g,d). To verify that the methods give
29
the same result modulo Pixton relations one can type:
30
31
(DR_phi(g,d) - DR_cycle(g,d)).is_zero()
32
33
We verified that these classes are the same for d=[1,-1] and g=1,2,3,4. For
34
higher values of g the computation takes too long. Note that in the case of
35
g=4 these are codimension 4 classes. The ring R^4(M_4,2) is generated by 3990
36
distinct decorated stratum classes, so this is a serious check on the
37
correctness of these formula's. Note also that the two methods do not give the
38
same result if we do not mod out by Pixton relations. i.e.
39
40
(DR_phi(g,d) - DR_cycle(g,d)).simplify()
41
42
is not zero.
43
"""
44
import operator
45
46
from .admcycles import tautclass, decstratum, stgraph, psicl, kappacl, psiclass, kappaclass
47
from .admcycles import chern_char_to_poly, chern_char_to_class, fundclass
48
49
from sage.rings.all import ZZ, QQ
50
from sage.matrix.constructor import matrix
51
from sage.misc.misc import powerset
52
from sage.misc.misc_c import prod
53
from sage.arith.all import bernoulli, binomial, multinomial
54
from sage.combinat.all import bernoulli_polynomial, IntegerVectors
55
56
57
def divided_bernoulli(n):
58
"""
59
Return Bernoulli number of index ``n`` divided by ``n!``.
60
61
EXAMPLES::
62
63
sage: from admcycles import *
64
sage: from admcycles.GRRcomp import *
65
sage: divided_bernoulli(12)
66
-691/1307674368000
67
"""
68
return bernoulli(n) / ZZ(n).factorial()
69
70
71
def divided_bernoulli_polynomial(l, n):
72
"""
73
Return Bernoulli polynomial of index ``n`` at ``l``, divided by ``n!``.
74
75
EXAMPLES::
76
77
sage: from admcycles import *
78
sage: from admcycles.GRRcomp import *
79
sage: x = polygen(QQ,'x')
80
sage: divided_bernoulli_polynomial(x,4)
81
1/24*x^4 - 1/12*x^3 + 1/24*x^2 - 1/720
82
"""
83
return bernoulli_polynomial(l, n) / ZZ(n).factorial()
84
85
86
def handle_g_n(g, n):
87
"""
88
Helper function that fetches the global ``g`` and ``n`` parameters.
89
90
See also :func:`admcycles.reset_g_n`.
91
92
The global ``g`` and ``n`` should rather be replaced by the creation
93
of an object ``MMbar(g, n)`` with attributes ``g`` and ``n``.
94
"""
95
if g is None:
96
from .admcycles import g
97
if n is None:
98
from .admcycles import n
99
return g, n
100
101
102
def generalized_hodge_chern(l,d,a,dmax=None,g=None,n=None):
103
r"""
104
Computes the Chern character of the derived pushforward of a line bundle \O(D) on
105
the universal curve C_{g,n} over the space Mbar_{g,n} of stable curves.
106
107
A divisor D on C_{g,n} up to pullbacks from Mbar_{g,n} takes the form
108
109
D = l \tilde{K} + sum_{i=1}^n d_i \sigma_i + \sum_{h,S} a_{h,S} C_{h,S}
110
111
where the numbers l, d_i and a_{h,S} are integers, \tilde{K} is the relative canonical
112
class of the morphism C_{g,n} -> Mbar_{g,n}, \sigma_i is the image of the ith section
113
and C_{h,S} is the boundary divisor of C_{g,n} where the moving point lies on a genus h
114
component with markings given by the set S.
115
For such a divisor this function computes the Chern character
116
117
ch(R^\bullet \pi_* \O(D))
118
119
up to codimension dmax using the formula given in [Pagani-Ricolfi-van Zelm].
120
121
NOTE: This formula assumes that the number n of marked points is at least 1.
122
123
INPUT:
124
125
l : integer
126
the coefficient in front of \tilde{K}
127
d : list
128
vector of integers (d_1,...,d_n)
129
a : list
130
list of triples [h,S,a_{h,S}] where a_{h,S} is nonzero (and S is a subset of [1,...,n] )
131
dmax : integer
132
maximum codimension, set to 3g+3-n by default
133
g : integer
134
genus
135
n : integer
136
number of markings, for the formula to be correct we need at least one
137
138
EXAMPLES::
139
140
sage: from admcycles import *
141
sage: from admcycles.GRRcomp import *
142
sage: g=1;n=2
143
sage: l=0;d=[1,-1];a=[[1,[],-1]]
144
sage: generalized_hodge_chern(l,d,a,1,g,n)
145
Graph : [1] [[1, 2]] []
146
Polynomial : 1/12*(kappa_1^1 )_0
147
<BLANKLINE>
148
Graph : [1] [[1, 2]] []
149
Polynomial : (-13/12)*psi_1^1
150
<BLANKLINE>
151
Graph : [1] [[1, 2]] []
152
Polynomial : (-1/12)*psi_2^1
153
<BLANKLINE>
154
Graph : [0, 1] [[1, 2, 4], [5]] [(4, 5)]
155
Polynomial : (-11/12)*
156
<BLANKLINE>
157
Graph : [0] [[4, 5, 1, 2]] [(4, 5)]
158
Polynomial : 1/24*
159
"""
160
g, n = handle_g_n(g, n)
161
if dmax is None:
162
dmax = 3*g-3+n
163
164
return sum(generalized_hodge_chern_single(t,l,d,a,g,n) for t in range(1,dmax+1))
165
166
167
def generalized_hodge_chern_single(t,l,d,a,g=None,n=None):
168
r"""
169
Computes the degree t part of the Chern character of the derived pushforward of a line
170
bundle \O(D) on the universal curve C_{g,n} over the space Mbar_{g,n} of stable curves.
171
172
A divisor D on C_{g,n} up to pullbacks from Mbar_{g,n} takes the form
173
174
D = l \tilde{K} + sum_{i=1}^n d_i \sigma_i + \sum_{h,S} a_{h,S} C_{h,S}
175
176
where the numbers l, d_i and a_{h,S} are integers, \tilde{K} is the relative canonical
177
class of the morphism C_{g,n} -> Mbar_{g,n}, \sigma_i is the image of the ith section
178
and C_{h,S} is the boundary divisor of C_{g,n} where the moving point lies on a genus h
179
component with markings given by the set S.
180
For such a divisor this function computes the degree t part
181
182
ch_t(R^\bullet \pi_* \O(D))
183
184
of the Chern character of R^\bullet \pi_* \O(D) using the formula given in
185
[Pagani-Ricolfi-van Zelm].
186
187
NOTE: This formula assumes that the number n of marked points is at least 1.
188
189
EXAMPLES::
190
191
sage: from admcycles import *
192
sage: from admcycles.GRRcomp import *
193
sage: l=0; d=[1,-1]; a=[[1,[],-1]]
194
sage: generalized_hodge_chern_single(1, l, d, a, 1, 2)
195
Graph : [1] [[1, 2]] []
196
Polynomial : 1/12*(kappa_1^1 )_0
197
<BLANKLINE>
198
Graph : [1] [[1, 2]] []
199
Polynomial : (-13/12)*psi_1^1
200
<BLANKLINE>
201
Graph : [1] [[1, 2]] []
202
Polynomial : (-1/12)*psi_2^1
203
<BLANKLINE>
204
Graph : [0, 1] [[1, 2, 4], [5]] [(4, 5)]
205
Polynomial : (-11/12)*
206
<BLANKLINE>
207
Graph : [0] [[4, 5, 1, 2]] [(4, 5)]
208
Polynomial : 1/24*
209
210
If you do not want to manually enter ``g`` and ``n`` each time these can be
211
set globally::
212
213
sage: reset_g_n(1, 2)
214
sage: generalized_hodge_chern_single(1, l, d, a)
215
Graph : [1] [[1, 2]] []
216
Polynomial : 1/12*(kappa_1^1 )_0
217
<BLANKLINE>
218
Graph : [1] [[1, 2]] []
219
Polynomial : (-13/12)*psi_1^1
220
<BLANKLINE>
221
Graph : [1] [[1, 2]] []
222
Polynomial : (-1/12)*psi_2^1
223
<BLANKLINE>
224
Graph : [0, 1] [[1, 2, 4], [5]] [(4, 5)]
225
Polynomial : (-11/12)*
226
<BLANKLINE>
227
Graph : [0] [[4, 5, 1, 2]] [(4, 5)]
228
Polynomial : 1/24*
229
"""
230
g, n = handle_g_n(g, n)
231
if n==0:
232
raise ValueError('There needs to be at least one marked point for generalized_hodge_chern_single to work')
233
234
a.sort(key=operator.itemgetter(1,2)) #Order a to our convention
235
result = generalized_hodge_chern_K(t,l,a,g,n) + generalized_hodge_chern_S(t,l,d,a,g,n) + todd_inv_exp(a,t,g,n) # -generalized_hodge_chern_exp(t,a,g,n)
236
return result.simplify(g,n,t)
237
238
239
240
241
def todd_inv_exp(a, t, g=None, n=None):
242
"""
243
EXAMPLES::
244
245
sage: from admcycles import *
246
sage: from admcycles.GRRcomp import *
247
sage: todd_inv_exp([],1,1,2)
248
Graph : [0, 1] [[1, 2, 4], [5]] [(4, 5)]
249
Polynomial : 1/12*
250
<BLANKLINE>
251
Graph : [0] [[4, 5, 1, 2]] [(4, 5)]
252
Polynomial : 1/24*
253
"""
254
g, n = handle_g_n(g, n)
255
a.sort(key=operator.itemgetter(1, 2)) # Order a to our convention
256
result = tautclass([])
257
for t1 in range(1, t, 2):
258
coeff_t1 = divided_bernoulli(t1+1)/ZZ(t-t1).factorial()
259
for tvect in IntegerVectors(t - t1, len(a)):
260
result += coeff_t1 * prod(ai[2]**tvecti for ai, tvecti in zip(a, tvect)) * multinomial(tvect) * todd_inv_exp_graphs(a, t1, tvect, g, n)
261
result += todd_inv_sigma(t, g, n)
262
return result
263
264
265
##
266
## The case without the graphs
267
def todd_inv_sigma(t,g,n):
268
if t % 2 == 0:
269
return tautclass([])
270
271
if n > 0:
272
seprange = [[h,[1]+s] for h in range(g+1) for s in powerset(range(2,n+1))
273
if not (h==0 and not s) and not (h==g and len(s)>n-3)]
274
else:
275
seprange = [[h,[]] for h in range(1, g//2+1)]
276
#The list [h,S] of possible nonisomorphic irreducible codimension 1 graphs
277
decsum = sum((-psicl(n+1,n+2))**i*psicl(n+2,n+2)**(t-1-i) for i in range(t)) ## The decoration
278
tautclass1 = tautclass([decstratum(stgraph([g-1],[list(range(1,n+3))],[(n+1,n+2)]),poly=decsum)]) ## The irreducible graph
279
tautclass2 = sum(tautclass([decstratum(stgraph([ahS[0],g-ahS[0]],[ahS[1]+[n+1],list(set(range(1,n+1))-set(ahS[1]))+[n+2]],[(n+1,n+2)]),poly=decsum)]) for ahS in seprange) ## The separating graphs
280
281
result = divided_bernoulli(t+1)*(QQ((1,2)) * tautclass1 + tautclass2 )
282
return (result+0*fundclass(g,n)).simplify(g,n,t)
283
284
285
##
286
## The graphs in the sigma part
287
def todd_inv_exp_graphs(a,t1,tvect,g,n):
288
#assume a is ordered
289
tvn = [tvi for tvi in tvect if tvi != 0]
290
atn = [ai for ai, tvi in zip(a, tvect) if tvi != 0]
291
L = len(tvn)
292
result=0*fundclass(g,n)
293
if all(atn[i][0] <= atn[i+1][0] and atn[i][1] <= atn[i+1][1]
294
for i in range(L-1)):
295
#restrict to the case nonzero elements of tvect give a ordered sequence in a (i.e. each element smaller than or equal to the next).
296
297
Snc = powerset(set(range(1,n+1))-set(atn[-1][1]))#Powerset of complement of Sn
298
299
#The sum of different graphs (bigger than or equal (hn,Sn))
300
for h in range(atn[-1][0],g+1):
301
for S in Snc:
302
#the strictly bigger ones:
303
if not (h==atn[-1][0] and not S) and not (h==g and n-len(atn[-1][1])-len(S)<2):
304
vertices = [atn[0][0]] + [atn[i][0] - atn[i-1][0] for i in range(1,L)] + [h - atn[-1][0]] + [g - h]
305
labels = [atn[0][1] + [n+1] ] + [list(set(atn[i][1]) - set(atn[i-1][1])) + [n+2*i,n+2*i+1] for i in range(1,L)] + [list(set(S)-set(atn[-1][1])) + [n+2*L,n+2*L+1]] + [list(set(range(1,n+1))-set(atn[-1][1])-set(S)) + [n+2*L+2] ]
306
involution = [(n+2*i+1,n+2*i+2) for i in range(L+1)]
307
graph=stgraph(vertices,labels,involution)
308
psi=prod([sum([binomial(tvn[i]-1,j) * (-1)**(tvn[i]-1) * psicl(n+2*i+1,n+2*L+2)**j * psicl(n+2*i+2,n+2*L+2)**(tvn[i]-1-j) for j in range(tvn[i])]) for i in range(L)] + [sum([ (-psicl(n+2*L+1,n+2*L+2))**j * psicl(n+2*L+2,n+2*L+2)**(t1-1-j) for j in range(t1)])])##psi class of graph coinciding graphs. Note last one in a is only on one side and to the power of a[-1].
309
result+=tautclass([decstratum(graph,poly=psi)])
310
311
# the case where they are equal
312
if (h==atn[-1][0] and not S):
313
vertices = [atn[0][0]] + [atn[i][0] - atn[i-1][0] for i in range(1,L)] + [g - atn[-1][0]]
314
labels = [atn[0][1] + [n+1] ] + [list(set(atn[i][1]) - set(atn[i-1][1])) + [n+2*i,n+2*i+1] for i in range(1,L)] + [list(set(range(1,n+1))-set(atn[-1][1])) + [n+2*L] ]
315
involution = [(n+2*i+1,n+2*i+2) for i in range(L)]
316
graph=stgraph(vertices,labels,involution)
317
psi=prod([sum([binomial(tvn[i]-1,j) * (-1)**(tvn[i]-1) * psicl(n+2*i+1,n+2*L)**j * psicl(n+2*i+2,n+2*L)**(tvn[i]-1-j) for j in range(tvn[i])]) for i in range(L-1)] + [(-psicl(n+2*L-1,n+2*L))**(tvn[-1]) ] + [sum([(-psicl(n+2*L-1,n+2*L))**j * psicl(n+2*L,n+2*L)**(t1-1-j) for j in range(t1)])] )
318
result+=tautclass([decstratum(graph,poly=psi)])
319
320
#The case of the irreducible graph in Sigma:
321
if g - atn[-1][0] > 0:
322
vertices = [atn[0][0]] + [atn[i][0] - atn[i-1][0] for i in range(1,L)] + [g - atn[-1][0]-1]
323
labels = [atn[0][1] + [n+1] ] + [list(set(atn[i][1]) - set(atn[i-1][1])) + [n+2*i,n+2*i+1] for i in range(1,L)] + [list(set(range(1,n+1))-set(atn[-1][1])) + [n+2*L,n+2*L+1,n+2*L+2] ]
324
involution = [(n+2*i+1,n+2*i+2) for i in range(L+1)]
325
graph=stgraph(vertices,labels,involution)
326
psi=prod([sum([binomial(tvn[i]-1,j) * (-1)**(tvn[i]-1) * psicl(n+2*i+1,n+2*L+2)**j * psicl(n+2*i+2,n+2*L+2)**(tvn[i]-1-j) for j in range(tvn[i])]) for i in range(L)] + [sum([ (-psicl(n+2*L+1,n+2*L+2))**j * psicl(n+2*L+2,n+2*L+2)**(t1-1-j) for j in range(t1)])])
327
result+=QQ((1,2))*tautclass([decstratum(graph,poly=psi)])
328
return result
329
##
330
##
331
332
333
334
def generalized_hodge_chern_exp(t,a,g=None,n=None): #The exponential e^C
335
g, n = handle_g_n(g, n)
336
#a.sort(key=operator.itemgetter(1,2)) ## Order a to our convention
337
result=tautclass([])
338
# loop on Partition of t+1 over elements of ChS, assume a is ordered
339
for tvect in IntegerVectors(t+1,len(a)):
340
tvn = [tvi for tvi in tvect if tvi != 0]
341
atn = [ai for ai, tvi in zip(a, tvect) if tvi != 0]
342
L = len(tvn)
343
Scomp = list(set(range(1,n+1))-set(atn[-1][1]))
344
if all(atn[i][0] <= atn[i+1][0] and atn[i][1] <= atn[i+1][1] for i in range(L-1)) and tvn[-1] > 1 :
345
vertices = [atn[0][0]] + [atn[i][0] - atn[i-1][0] for i in range(1,L)] + [g - atn[-1][0]]
346
labels = [atn[0][1] + [n+1] ] + [list(set(atn[i][1]) - set(atn[i-1][1])) + [n+2*i,n+2*i+1] for i in range(1,L)] + [Scomp + [n+2*L] ]
347
involution = [(n+2*i+1,n+2*i+2) for i in range(L)]
348
graph=stgraph(vertices,labels,involution)
349
psi=prod([atn[i][2]**tvn[i] * (-1)**(tvn[i]-1) *
350
sum([binomial(tvn[i]-1,j) * psicl(n+2*i+1,n+2*L)**j * psicl(n+2*i+2,n+2*L)**(tvn[i]-1-j) for j in range(tvn[i])]) for i in range(L-1)] +
351
[atn[-1][2]**tvn[-1] * (-1)**(tvn[-1]-1)*
352
sum([binomial(tvn[-1]-1,j) * psicl(n+2*L-1,n+2*L)**j * psicl(n+2*L,n+2*L)**(tvn[-1]-1-j-1) for j in range(tvn[-1]-1)]) ] )
353
result+=multinomial(tvn)*tautclass([decstratum(graph,poly=psi)])
354
return ZZ.one()/ZZ(t+1).factorial()*result
355
356
357
def generalized_hodge_chern_K(t,l,a,g,n):#The thing with K
358
result=tautclass([])
359
for alpha in range(t+2):
360
beta = t+1-alpha
361
result += (divided_bernoulli_polynomial(l,beta)/ZZ(alpha).factorial()) * generalized_hodge_chern_Kin(alpha,beta,a,g,n)
362
return result
363
364
365
def generalized_hodge_chern_S(t,l,d,a,g,n):#The thing with sigma
366
result=tautclass([])
367
for alpha in range(t+1):
368
beta = t+1-alpha
369
for p in range(1,n+1):
370
result += sum(((-1)**b * d[p-1]**(beta-b) * divided_bernoulli_polynomial(l,b)/(ZZ(alpha).factorial()*ZZ(beta-b).factorial()))* generalized_hodge_chern_Sin(alpha,beta,p,a,g,n) for b in range(beta+1))
371
return result
372
373
374
375
def generalized_hodge_chern_Kin(alpha,beta,a,g,n):
376
if beta == 0:
377
return ZZ(alpha).factorial() * generalized_hodge_chern_exp(alpha-1,a,g,n)
378
if alpha == 0:
379
return kappaclass(beta-1,g,n)
380
result=tautclass([])
381
# Partition of t+1 over elements of ChS, assume a is ordered
382
for tvect in IntegerVectors(alpha, len(a)):
383
tvn = [tvi for tvi in tvect if tvi != 0]
384
atn = [ai for ai, tvi in zip(a, tvect) if tvi != 0]
385
L = len(tvn)
386
Scomp = list(set(range(1,n+1))-set(atn[-1][1]))
387
if all(atn[i][0] <= atn[i+1][0] and atn[i][1] <= atn[i+1][1]
388
for i in range(L-1)):
389
vertices = [atn[0][0]] + [atn[i][0] - atn[i-1][0] for i in range(1,L)] + [g - atn[-1][0]]
390
labels = [atn[0][1] + [n+1] ] + [list(set(atn[i][1]) - set(atn[i-1][1])) + [n+2*i,n+2*i+1] for i in range(1,L)] + [Scomp + [n+2*L] ]
391
involution = [(n+2*i+1,n+2*i+2) for i in range(L)]
392
graph=stgraph(vertices,labels,involution)
393
psi=prod([atn[i][2]**tvn[i] * (-1)**(tvn[i]-1) * sum([binomial(tvn[i]-1,j) * psicl(n+2*i+1,n+2*L)**j * psicl(n+2*i+2,n+2*L)**(tvn[i]-1-j) for j in range(tvn[i])]) for i in range(L)])
394
kappa=kappacl(L,beta-1,L+1,g - atn[-1][0] , len(Scomp)+1)
395
result+=multinomial(tvn)*tautclass([decstratum(graph,poly=kappa*psi)])
396
return result
397
398
399
def generalized_hodge_chern_Sin(alpha,beta,p,a,g,n):
400
if beta == 0:
401
return ZZ(alpha).factorial() * generalized_hodge_chern_exp(alpha-1,a,g,n)
402
if alpha == 0:
403
return (-psiclass(p,g,n))**(beta-1)
404
result=tautclass([])
405
# Partition of t+1 over elements of ChS, assume a is ordered
406
for tvect in IntegerVectors(alpha, len(a)):
407
tvn = [tvi for tvi in tvect if tvi != 0]
408
atn = [ai for ai, tvi in zip(a, tvect) if tvi != 0]
409
L = len(tvn)
410
Scomp = list(set(range(1,n+1))-set(atn[-1][1]))
411
if all(atn[i][0] <= atn[i+1][0] and atn[i][1] <= atn[i+1][1]
412
for i in range(L-1)) and p in Scomp:
413
vertices = [atn[0][0]] + [atn[i][0] - atn[i-1][0] for i in range(1,L)] + [g - atn[-1][0]]
414
labels = [atn[0][1] + [n+1] ] + [list(set(atn[i][1]) - set(atn[i-1][1])) + [n+2*i,n+2*i+1] for i in range(1,L)] + [Scomp + [n+2*L] ]
415
involution = [(n+2*i+1,n+2*i+2) for i in range(L)]
416
graph=stgraph(vertices,labels,involution)
417
psi=prod([atn[i][2]**tvn[i] * (-1)**(tvn[i]-1) * sum([binomial(tvn[i]-1,j) * psicl(n+2*i+1,n+2*L)**j * psicl(n+2*i+2,n+2*L)**(tvn[i]-1-j) for j in range(tvn[i])]) for i in range(L)] + [ (-1)**(beta-1)*psicl(p,n+2*L)**(beta-1)])
418
result+=multinomial(tvn)*tautclass([decstratum(graph,poly=psi)])
419
return result
420
421
422
def twist_div_to_zero(l, d, g=None, n=None):
423
"""
424
INPUT:
425
426
- l -- integer
427
428
- d -- list of integers (d_1,...,d_n)
429
430
EXAMPLES::
431
432
sage: from admcycles import *
433
sage: from admcycles.GRRcomp import *
434
sage: twist_div_to_zero(3,[3,4],2,2)
435
[[0, [1, 2], -10], [1, [1], -9], [1, [1, 2], -16]]
436
"""
437
g, n = handle_g_n(g, n)
438
seprange = ([h, [1] + s] for h in range(g + 1)
439
for s in powerset(range(2, n + 1))
440
if (h != 0 or s) and (h != g or len(s) <= n - 3))
441
a = []
442
for hS0, hS1 in seprange:
443
ahS = -l*(2*hS0-2+len(hS1)+1) - sum(d[p-1] for p in hS1)
444
if ahS != 0:
445
a.append([hS0, hS1, ahS])
446
return a
447
448
449
def generalized_lambda(deg,l,d,a,g=None,n=None):
450
r"""
451
Computes the Chern class c_deg of the derived pushforward of a line
452
bundle \O(D) on the universal curve C_{g,n} over the space Mbar_{g,n} of stable curves.
453
454
A divisor D on C_{g,n} up to pullbacks from Mbar_{g,n} takes the form
455
456
D = l \tilde{K} + sum_{i=1}^n d_i \sigma_i + \sum_{h,S} a_{h,S} C_{h,S}
457
458
where the numbers l, d_i and a_{h,S} are integers, \tilde{K} is the relative canonical
459
class of the morphism C_{g,n} -> Mbar_{g,n}, \sigma_i is the image of the ith section
460
and C_{h,S} is the boundary divisor of C_{g,n} where the moving point lies on a genus h
461
component with markings given by the set S.
462
For such a divisor this function computes the Chern class
463
464
c_deg(R^\bullet \pi_* \O(D))
465
466
of the derived pushforward R^\bullet \pi_* \O(D) using the formula given in
467
[Pagani-Ricolfi-van Zelm]. When l=1, d=[0,...,0] and a=[] this coincides with the lambda class.
468
469
NOTE: This formula assumes that the number n of marked points is at least 1.
470
471
INPUT:
472
473
deg : integer
474
degree of the chern class
475
l : integer
476
the coefficient in front of \tilde{K}
477
d : list
478
vector of integers (d_1,...,d_n)
479
a : list
480
list of triples [h,S,a_{h,S}] where a_{h,S} is nonzero (and S is a subset of [1,...,n] )
481
g : integer
482
genus
483
n : integer
484
number of markings, for the formula to work we need n > 0
485
486
487
EXAMPLES::
488
489
sage: from admcycles import *
490
sage: from admcycles.GRRcomp import *
491
sage: l = 1; d = [0]; a = []
492
sage: t = generalized_lambda(1,l,d,a,2,1);t
493
Graph : [2] [[1]] []
494
Polynomial : 1/12*(kappa_1^1 )_0
495
<BLANKLINE>
496
Graph : [2] [[1]] []
497
Polynomial : (-1/12)*psi_1^1
498
<BLANKLINE>
499
Graph : [1, 1] [[3], [1, 4]] [(3, 4)]
500
Polynomial : 1/12*
501
<BLANKLINE>
502
Graph : [1] [[3, 4, 1]] [(3, 4)]
503
Polynomial : 1/24*
504
sage: t.toTautbasis()
505
(1/2, -1/2, -1/2)
506
507
We can verify that this computes the lambda class when l=1, d=[0,...,0] and
508
a=[]. We do this for lambda_2 in \barM_3,1::
509
510
sage: from admcycles import *
511
sage: from admcycles.GRRcomp import *
512
sage: reset_g_n(3, 1)
513
sage: l = 1; d = [0]; a = []
514
sage: s = lambdaclass(2)
515
sage: t = generalized_lambda(2, l, d, a)
516
sage: (s-t).simplify()
517
<BLANKLINE>
518
"""
519
g, n = handle_g_n(g, n)
520
521
def chclass(m):
522
return generalized_hodge_chern_single(m,l,d,a,g,n)
523
524
chpoly = chern_char_to_poly(chclass,deg,g,n)
525
chpoly.simplify(g,n,deg)
526
return chpoly
527
528
def DR_phi(g,d):
529
r"""
530
Computes the double ramification cycle DR(g,d) in the case d=[0,...,\pm
531
1,...,\mp 1,...,0] as described in the paper [Pagani-Ricolfi-van Zelm].
532
533
Input:
534
535
g : integer
536
the genus
537
d : vector
538
the vector d
539
540
EXAMPLES::
541
542
sage: from admcycles import *
543
sage: from admcycles.GRRcomp import *
544
sage: DR_phi(1, [1,-1])
545
Graph : [1] [[1, 2]] []
546
Polynomial : (-1/12)*(kappa_1^1 )_0
547
<BLANKLINE>
548
Graph : [1] [[1, 2]] []
549
Polynomial : 13/12*psi_1^1
550
<BLANKLINE>
551
Graph : [1] [[1, 2]] []
552
Polynomial : 1/12*psi_2^1
553
<BLANKLINE>
554
Graph : [0, 1] [[1, 2, 4], [5]] [(4, 5)]
555
Polynomial : (-1/12)*
556
<BLANKLINE>
557
Graph : [0] [[4, 5, 1, 2]] [(4, 5)]
558
Polynomial : (-1/24)*
559
560
The different ways of computing the DR cycle coincide when d is of the form
561
[0,...,\pm 1,...,\mp 1,...,0]::
562
563
sage: from admcycles import *
564
sage: from admcycles.GRRcomp import *
565
sage: g = 2; d = [1,-1]
566
sage: (DR_phi(g,d) - DR_cycle(g,d)).is_zero()
567
True
568
569
But not for other values of d::
570
571
sage: from admcycles import *
572
sage: from admcycles.GRRcomp import *
573
sage: g = 1; d = [2,0]
574
sage: (DR_phi(g,d)-DR_cycle(g,d)).FZsimplify()
575
Graph : [1] [[1, 2]] []
576
Polynomial : (-1)*(kappa_1^1 )_0
577
<BLANKLINE>
578
Graph : [1] [[1, 2]] []
579
Polynomial : 4*psi_1^1
580
581
On the locus of compact type curves we have equality for all vectors d where
582
the entries sum to 0.::
583
584
sage: from admcycles import *
585
sage: from admcycles.GRRcomp import *
586
sage: g = 2; d = [2,-2]
587
sage: (DR_cycle(g,d) - DR_phi(g,d)).toTautbasis()
588
(12, -4, 14, 7, -40, -10, -14, -12, 28, -4, 6, -1, 4, 0)
589
sage: (DR_cycle(g,d) - DR_phi(g,d)).toTautbasis(moduli='ct')
590
(0, 0, 0, 0, 0)
591
"""
592
n=len(d)
593
a=twist_div_to_zero(0,d,g,n)
594
return chern_char_to_class(g,-generalized_hodge_chern(0,d,a,g,g,n))
595
596
597
def DR_phi1(g,d):
598
r"""
599
Alternative to DR_phi using chern_char_to_poly, but this takes a lot longer, kept here
600
only for testing purposes.
601
602
TESTS::
603
604
sage: from admcycles.GRRcomp import DR_phi, DR_phi1
605
sage: D1 = DR_phi(2, [1, -1])
606
sage: D2 = DR_phi1(2, [1, -1])
607
sage: (D1 - D2).toTautvect().is_zero()
608
True
609
"""
610
n=len(d)
611
a=twist_div_to_zero(0,d,g,n)
612
def chclass(m):
613
temp = generalized_hodge_chern_single(m,0,d,a,g,n)
614
temp.simplify()
615
return temp
616
617
chpoly = chern_char_to_poly(chclass,g,g,n)
618
chpoly.simplify(g,n,g)
619
return chpoly
620
621
622
def hodge_chern_class_matrix(char,p,q,g=None,n=None):
623
g, n = handle_g_n(g, n)
624
c = [chern_char_to_class(t,char,g,n) for t in range(q-p+1,q+p)]
625
return matrix([[c[i+p-1-j] for i in range(p)] for j in range(p)])
626
627
628
def generalized_brill_noether_class(r,deg,l,d,a,g=None,n=None):
629
g, n = handle_g_n(g, n)
630
p = r+1
631
q = g-deg+r
632
char = tautclass([]) + generalized_hodge_chern(l,d,a,q+p-1,g,n)
633
return hodge_chern_class_matrix(char,p,q,g,n).det()
634
635