Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

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

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

127

128

129

130

131

132

133

134

135

136

137

138

139

140

141

142

143

144

145

146

147

148

149

150

151

152

153

154

155

156

157

158

159

160

161

162

163

164

165

166

167

168

169

170

171

172

173

174

175

176

177

178

179

180

181

182

183

184

185

186

187

188

189

190

191

192

193

194

195

196

197

198

199

200

201

202

203

204

205

206

207

208

209

210

211

212

213

214

215

216

217

218

219

220

221

222

223

224

225

226

227

228

229

230

231

232

233

234

235

236

237

238

239

240

241

242

243

244

245

246

247

248

249

250

251

252

253

254

255

256

257

258

259

260

261

262

263

264

265

266

267

268

269

270

271

272

273

274

275

276

277

278

279

280

281

282

283

284

285

286

287

288

289

290

291

292

293

294

295

296

297

298

299

300

301

302

303

304

305

306

307

308

309

310

311

312

313

314

315

316

317

318

319

320

321

322

r""" 

Construct sheaves on toric varieties. 

 

A toric vector bundle (on a toric variety) is a vector bundle that is 

equivariant with respect to the algebraic torus action. 

""" 

from __future__ import absolute_import 

 

 

#***************************************************************************** 

# Copyright (C) 2013 Volker Braun <vbraun.name@gmail.com> 

# 

# Distributed under the terms of the GNU General Public License (GPL) 

# as published by the Free Software Foundation; either version 2 of 

# the License, or (at your option) any later version. 

# http://www.gnu.org/licenses/ 

#***************************************************************************** 

 

from sage.schemes.toric.variety import is_ToricVariety 

from sage.modules.filtered_vector_space import FilteredVectorSpace 

 

 

def TangentBundle(X): 

r""" 

Construct the tangent bundle of a toric variety. 

 

INPUT: 

 

- ``X`` -- a toric variety. The base space of the bundle. 

 

OUTPUT: 

 

The tangent bundle as a Klyachko bundle. 

 

EXAMPLES:: 

 

sage: dP7 = toric_varieties.dP7() 

sage: from sage.schemes.toric.sheaf.constructor import TangentBundle 

sage: TangentBundle(dP7) 

Rank 2 bundle on 2-d CPR-Fano toric variety covered by 5 affine patches. 

""" 

if not is_ToricVariety(X): 

raise ValueError('not a toric variety') 

base_ring = X.base_ring() 

fan = X.fan() 

filtrations = dict() 

from sage.modules.filtered_vector_space import FilteredVectorSpace 

for i, ray in enumerate(fan.rays()): 

F = FilteredVectorSpace(fan.rays(), {0:range(fan.nrays()), 1:[i]}) 

filtrations[ray] = F 

from . import klyachko 

return klyachko.Bundle(X, filtrations, check=True) 

 

 

def CotangentBundle(X): 

r""" 

Construct the cotangent bundle of a toric variety. 

 

INPUT: 

 

- ``X`` -- a toric variety. The base space of the bundle. 

 

OUTPUT: 

 

The cotangent bundle as a Klyachko bundle. 

 

EXAMPLES:: 

 

sage: dP7 = toric_varieties.dP7() 

sage: from sage.schemes.toric.sheaf.constructor import CotangentBundle 

sage: CotangentBundle(dP7) 

Rank 2 bundle on 2-d CPR-Fano toric variety covered by 5 affine patches. 

""" 

return TangentBundle(X).dual() 

 

 

def TrivialBundle(X, rank=1): 

r""" 

Return the trivial bundle of rank ``r``. 

 

INPUT: 

 

- ``X`` -- a toric variety. The base space of the bundle. 

 

- ``rank`` -- the rank of the bundle. 

 

OUTPUT: 

 

The trivial bundle as a Klyachko bundle. 

 

EXAMPLES:: 

 

sage: P2 = toric_varieties.P2() 

sage: from sage.schemes.toric.sheaf.constructor import TrivialBundle 

sage: I3 = TrivialBundle(P2, 3); I3 

Rank 3 bundle on 2-d CPR-Fano toric variety covered by 3 affine patches. 

sage: I3.cohomology(weight=(0,0), dim=True) 

(3, 0, 0) 

""" 

if not is_ToricVariety(X): 

raise ValueError('not a toric variety') 

from sage.modules.free_module import VectorSpace 

base_ring = X.base_ring() 

filtrations = dict([ray, FilteredVectorSpace(rank, 0, base_ring=base_ring)] 

for ray in X.fan().rays()) 

from . import klyachko 

return klyachko.Bundle(X, filtrations, check=True) 

 

 

def LineBundle(X, D): 

""" 

Construct the rank-1 bundle `O(D)`. 

 

INPUT: 

 

- ``X`` -- a toric variety. The base space of the bundle. 

 

- ``D`` -- a toric divisor. 

 

OUTPUT: 

 

The line bundle `O(D)` as a Klyachko bundle of rank 1. 

 

EXAMPLES:: 

 

sage: X = toric_varieties.dP8() 

sage: D = X.divisor(0) 

sage: from sage.schemes.toric.sheaf.constructor import LineBundle 

sage: O_D = LineBundle(X, D) 

sage: O_D.cohomology(dim=True, weight=(0,0)) 

(1, 0, 0) 

""" 

if not is_ToricVariety(X): 

raise ValueError('not a toric variety') 

from sage.modules.free_module import VectorSpace 

base_ring = X.base_ring() 

filtrations = dict([X.fan().ray(i), 

FilteredVectorSpace(1, D.function_value(i), base_ring=base_ring)] 

for i in range(X.fan().nrays())) 

from . import klyachko 

return klyachko.Bundle(X, filtrations, check=True) 

 

 

 

class SheafLibrary(object): 

 

def __init__(self, toric_variety): 

""" 

Utility object to construct sheaves on toric varieties. 

 

.. warning:: 

 

You should never construct instances manually. Can be 

accessed from a toric variety via the 

:attr:`sage.schemes.toric.variety.ToricVariety_field.sheaves` 

attribute. 

 

EXAMPLES:: 

 

sage: type(toric_varieties.P2().sheaves) 

<class 'sage.schemes.toric.sheaf.constructor.SheafLibrary'> 

""" 

self._variety = toric_variety 

 

def __repr__(self): 

""" 

Return a string representation. 

 

OUTPUT: 

 

String. 

 

EXAMPLES:: 

 

sage: toric_varieties.P2().sheaves # indirect doctest 

Sheaf constructor on 2-d CPR-Fano toric variety covered by 3 affine patches 

""" 

return 'Sheaf constructor on ' + repr(self._variety) 

 

def trivial_bundle(self, rank=1): 

r""" 

Return the trivial bundle of rank ``r``. 

 

INPUT: 

 

- ``rank`` -- integer (optional; default: `1`). The rank of 

the bundle. 

 

OUTPUT: 

 

The trivial bundle as a Klyachko bundle. 

 

EXAMPLES:: 

 

sage: P2 = toric_varieties.P2() 

sage: I3 = P2.sheaves.trivial_bundle(3); I3 

Rank 3 bundle on 2-d CPR-Fano toric variety covered by 3 affine patches. 

sage: I3.cohomology(weight=(0,0), dim=True) 

(3, 0, 0) 

""" 

return TrivialBundle(self._variety, rank) 

 

def line_bundle(self, divisor): 

""" 

Construct the rank-1 bundle `O(D)`. 

 

INPUT: 

 

- ``divisor`` -- a toric divisor. 

 

OUTPUT: 

 

The line bundle `O(D)` for the given divisor as a Klyachko 

bundle of rank 1. 

 

EXAMPLES:: 

 

sage: X = toric_varieties.dP8() 

sage: D = X.divisor(0) 

sage: O_D = X.sheaves.line_bundle(D) 

sage: O_D.cohomology(dim=True, weight=(0,0)) 

(1, 0, 0) 

""" 

return LineBundle(self._variety, divisor) 

 

def tangent_bundle(self): 

r""" 

Return the tangent bundle of the toric variety. 

 

OUTPUT: 

 

The tangent bundle as a Klyachko bundle. 

 

EXAMPLES:: 

 

sage: toric_varieties.dP6().sheaves.tangent_bundle() 

Rank 2 bundle on 2-d CPR-Fano toric variety covered by 6 affine patches. 

""" 

return TangentBundle(self._variety) 

 

def cotangent_bundle(self): 

r""" 

Return the cotangent bundle of the toric variety. 

 

OUTPUT: 

 

The cotangent bundle as a Klyachko bundle. 

 

EXAMPLES:: 

 

sage: dP6 = toric_varieties.dP6() 

sage: TX = dP6.sheaves.tangent_bundle() 

sage: TXdual = dP6.sheaves.cotangent_bundle() 

sage: TXdual == TX.dual() 

True 

""" 

return CotangentBundle(self._variety) 

 

def Klyachko(self, multi_filtration): 

""" 

Construct a Klyachko bundle (sheaf) from filtration data. 

 

INPUT: 

 

- ``multi_filtration`` -- a multi-filtered vectors space with 

multiple filtrations being indexed by the rays of the 

fan. Either an instance of 

:func:`~sage.modules.multi_filtered_vector_space.MultiFilteredVectorSpace` 

or something (like a dictionary of ordinary filtered vector 

spaces). 

 

OUTPUT: 

 

The Klyachko bundle defined by the filtrations, one for each 

ray, of a vector space. 

 

EXAMPLES:: 

 

sage: P1 = toric_varieties.P1() 

sage: v1, v2, v3 = [(1,0,0),(0,1,0),(0,0,1)] 

sage: F1 = FilteredVectorSpace({1:[v1, v2, v3], 3:[v1]}) 

sage: F2 = FilteredVectorSpace({0:[v1, v2, v3], 2:[v2, v3]}) 

sage: P1 = toric_varieties.P1() 

sage: r1, r2 = P1.fan().rays() 

sage: F = MultiFilteredVectorSpace({r1:F1, r2:F2}); F 

Filtrations 

N(-1): QQ^3 >= QQ^2 >= QQ^2 >= 0 >= 0 

N(1): QQ^3 >= QQ^3 >= QQ^1 >= QQ^1 >= 0 

sage: P1.sheaves.Klyachko(F) 

Rank 3 bundle on 1-d CPR-Fano toric variety covered by 2 affine patches. 

""" 

from .klyachko import Bundle 

return Bundle(self._variety, multi_filtration, check=True) 

 

def divisor(self, *args, **kwds): 

""" 

Return a toric divisor. 

 

INPUT: 

 

This is just an alias for 

:meth:`sage.schemes.toric.variety.ToricVariety_field.divisor`, 

see there for details. 

 

By abuse of notation, you can usually use the divisor `D` 

interchangeably with the line bundle `O(D)`. 

 

OUTPUT: 

 

A toric divisor. 

 

EXAMPLES:: 

 

sage: dP6 = toric_varieties.dP6() 

sage: dP6.inject_variables() 

Defining x, u, y, v, z, w 

sage: D = dP6.sheaves.divisor(x*u^3); D 

V(x) + 3*V(u) 

sage: D == dP6.divisor(x*u^3) 

True 

""" 

return self._variety.divisor(*args, **kwds)