Skip to content

Commit

Permalink
Add sheaf cohomology for projective schemes
Browse files Browse the repository at this point in the history
  • Loading branch information
kwankyu committed Feb 26, 2024
1 parent acbe15d commit c8996fb
Show file tree
Hide file tree
Showing 12 changed files with 998 additions and 38 deletions.
4 changes: 4 additions & 0 deletions src/doc/en/reference/references/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4049,6 +4049,10 @@ REFERENCES:
293-311 (1987).
:doi:`10.1007/BF00337892`
.. [Kudo2017] Momonari Kudo, "Analysis of an algorithm to compute the cohomology
groups of coherent sheaves and its applications", Japan Journal of
Industrial and Applied Mathematics 34 (2017), 1--40.
.. [Kuh1987] \W. Kühnel, "Minimal triangulations of Kummer varieties",
Abh. Math. Sem. Univ. Hamburg 57 (1987), 7-20.
Expand Down
12 changes: 12 additions & 0 deletions src/doc/en/reference/schemes/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ Projective Schemes
sage/schemes/projective/projective_rational_point
sage/schemes/projective/projective_homset

Coherent Sheaves
----------------

.. toctree::
:maxdepth: 1

sage/schemes/sheaves/sheaf
sage/schemes/sheaves/cohomology

Products of Projective Spaces
-----------------------------

Expand All @@ -61,6 +70,7 @@ Products of Projective Spaces

Toric Varieties
---------------

.. toctree::
:maxdepth: 1

Expand All @@ -85,6 +95,7 @@ Toric Varieties

Cyclic Covers
---------------

.. toctree::
:maxdepth: 1

Expand All @@ -95,6 +106,7 @@ Cyclic Covers

Berkovich Analytic Space
------------------------

.. toctree::
:maxdepth: 1

Expand Down
4 changes: 4 additions & 0 deletions src/sage/misc/latex.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,10 @@ def latex_extra_preamble():
\newcommand{\PSL}{\mathrm{PSL}}
\newcommand{\lcm}{\mathop{\operatorname{lcm}}}
\newcommand{\dist}{\mathrm{dist}}
\newcommand{\im}{\mathop{\operatorname{im}}}
\newcommand{\rank}{\mathop{\operatorname{rank}}}
\newcommand{\PP}{\mathbf{P}}
\newcommand{\OO}{\mathcal{O}}
\newcommand{\Bold}[1]{\mathbf{#1}}
<BLANKLINE>
"""
Expand Down
7 changes: 6 additions & 1 deletion src/sage/misc/latex_macros.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,12 @@ def convert_latex_macro_to_mathjax(macro):
latex_macros = [r"\newcommand{\SL}{\mathrm{SL}}",
r"\newcommand{\PSL}{\mathrm{PSL}}",
r"\newcommand{\lcm}{\mathop{\operatorname{lcm}}}",
r"\newcommand{\dist}{\mathrm{dist}}"]
r"\newcommand{\dist}{\mathrm{dist}}",
r"\newcommand{\im}{\mathop{\operatorname{im}}}",
r"\newcommand{\rank}{\mathop{\operatorname{rank}}}",
r"\newcommand{\PP}{\mathbf{P}}",
r"\newcommand{\OO}{\mathcal{O}}",
]

# The following is to allow customization of typesetting of rings:
# mathbf vs mathbb. See latex.py for more information.
Expand Down
49 changes: 32 additions & 17 deletions src/sage/schemes/affine/affine_point.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,19 @@
r"""
Points on affine varieties
Scheme morphism for points on affine varieties.
This module implements scheme morphism for points on affine varieties.
AUTHORS:
- David Kohel, William Stein
- Volker Braun (2011-08-08): Renamed classes, more documentation, misc
cleanups.
- Ben Hutz (2013)
- David Kohel, William Stein (2006): initial version
- Volker Braun (2011-08-08): renamed classes, more documentation, misc cleanups
- Ben Hutz (2013): many improvements
"""

# Historical note: in trac #11599, V.B. renamed
# * _point_morphism_class -> _morphism
# * _homset_class -> _point_homset

# ****************************************************************************
# Copyright (C) 2011 Volker Braun <[email protected]>
# Copyright (C) 2006 David Kohel <[email protected]>
# Copyright (C) 2006 William Stein <[email protected]>
# Copyright (C) 2011 Volker Braun <[email protected]>
#
# Distributed under the terms of the GNU General Public License (GPL)
# as published by the Free Software Foundation; either version 2 of
Expand All @@ -37,10 +29,10 @@
_NumberFields = NumberFields()


############################################################################
# Rational points on schemes, which we view as morphisms determined
# by coordinates.
############################################################################
# --------------------------------------------------------------------
# Rational points on schemes, which we view as morphisms determined by
# coordinates.
# --------------------------------------------------------------------

class SchemeMorphism_point_affine(SchemeMorphism_point):
"""
Expand Down Expand Up @@ -410,6 +402,29 @@ def multiplicity(self):
raise TypeError("this point must be a point on an affine subscheme")
return self.codomain().multiplicity(self)

def as_subscheme(self):
r"""
Return the subscheme associated with this rational point.
EXAMPLES::
sage: A2.<x,y> = AffineSpace(QQ, 2)
sage: p1 = A2.point([0,0]).as_subscheme(); p1
Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
x, y
sage: p2 = A2.point([1,1]).as_subscheme(); p2
Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
x - 1, y - 1
sage: p1 + p2
Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
x - y, y^2 - y
"""
A = self.codomain().ambient_space()
g = A.gens()
v = self._coords
n = len(v)
return A.subscheme([g[i] - v[i] for i in range(n)])


class SchemeMorphism_point_affine_finite_field(SchemeMorphism_point_affine_field):

Expand Down
2 changes: 1 addition & 1 deletion src/sage/schemes/affine/affine_space.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Affine `n` space over a ring
Affine `n`-space over a ring
"""

# ****************************************************************************
Expand Down
64 changes: 46 additions & 18 deletions src/sage/schemes/projective/projective_point.py
Original file line number Diff line number Diff line change
@@ -1,29 +1,23 @@
r"""
Points on projective varieties
Scheme morphism for points on projective varieties
This module implements scheme morphism for points on projective varieties.
AUTHORS:
- David Kohel, William Stein
- William Stein (2006-02-11): fixed bug where P(0,0,0) was allowed as
a projective point.
- Volker Braun (2011-08-08): Renamed classes, more documentation, misc
cleanups.
- Ben Hutz (June 2012) added support for projective ring;
(March 2013) iteration functionality and new directory structure
- David Kohel, William Stein (2006): initial version
- William Stein (2006-02-11): fixed bug where P(0,0,0) was allowed as a
projective point
- Volker Braun (2011-08-08): Renamed classes, more documentation, misc cleanups
- Ben Hutz (2012-06): added support for projective ring
- Ben Hutz (2013-03): added iteration functionality and new directory structure
for affine/projective, height functionality
"""

# ****************************************************************************
# Copyright (C) 2011 Volker Braun <[email protected]>
# Copyright (C) 2006 David Kohel <[email protected]>
# Copyright (C) 2006 William Stein <[email protected]>
# Copyright (C) 2011 Volker Braun <[email protected]>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -52,9 +46,11 @@
from sage.structure.sequence import Sequence
from sage.structure.richcmp import richcmp, op_EQ, op_NE

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

# --------------------
# Projective varieties
#*******************************************************************
# --------------------

class SchemeMorphism_point_projective_ring(SchemeMorphism_point):
"""
A rational point of projective space over a ring.
Expand Down Expand Up @@ -1054,6 +1050,7 @@ def is_preperiodic(self, f, err=0.1, return_period=False):
except AttributeError:
raise TypeError("map must be a dynamical system")


class SchemeMorphism_point_projective_field(SchemeMorphism_point_projective_ring):
"""
A rational point of projective space over a field.
Expand Down Expand Up @@ -1401,6 +1398,35 @@ def multiplicity(self):
raise TypeError("this point must be a point on a projective subscheme")
return self.codomain().multiplicity(self)

def as_subscheme(self):
r"""
Return the subscheme associated with this rational point.
EXAMPLES::
sage: P2.<x,y,z> = ProjectiveSpace(QQ,2)
sage: p1 = P2.point([0,0,1]).as_subscheme(); p1
Closed subscheme of Projective Space of dimension 2 over Rational Field defined by:
x, y
sage: p2 = P2.point([1,1,1]).as_subscheme(); p2
Closed subscheme of Projective Space of dimension 2 over Rational Field defined by:
x - z, y - z
sage: p1 + p2
Closed subscheme of Projective Space of dimension 2 over Rational Field defined by:
x - y, y^2 - y*z
"""
P = self.codomain().ambient_space()
g = P.gens()
v = self._coords
n = len(v)
for i in range(n - 1, -1, -1):
if v[i]:
break
a = v[i]
x = g[i]
return P.subscheme([a*g[j] - v[j]*x for j in range(n) if j != i])


class SchemeMorphism_point_projective_finite_field(SchemeMorphism_point_projective_field):

def __hash__(self):
Expand Down Expand Up @@ -1438,9 +1464,11 @@ def __hash__(self):
N = self.codomain().ambient_space().dimension_relative()
return hash(sum(hash(self[i]) * p**i for i in range(N + 1)))

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

# -----------------
# Abelian varieties
#*******************************************************************
# -----------------

class SchemeMorphism_point_abelian_variety_field(AdditiveGroupElement, SchemeMorphism_point_projective_field):
"""
A rational point of an abelian variety over a field.
Expand Down
68 changes: 67 additions & 1 deletion src/sage/schemes/projective/projective_space.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
r"""
Projective `n` space over a ring
Projective `n`-space over a ring
EXAMPLES:
Expand Down Expand Up @@ -110,6 +110,7 @@
from sage.combinat.tuple import UnorderedTuples
from sage.combinat.subset import Subsets
from sage.matrix.constructor import matrix
from sage.modules.free_module import FreeModule
from sage.modules.free_module_element import prepare
from sage.schemes.generic.ambient_space import AmbientSpace
from sage.schemes.projective.projective_homset import (SchemeHomset_points_projective_ring,
Expand Down Expand Up @@ -2266,6 +2267,71 @@ def line_through(self, p, q):
m = matrix(3, list(self.gens()) + list(p) + list(q))
return Curve([f for f in m.minors(3) if f])

def coherent_sheaf(self, module, twist=0):
r"""
Return the sheaf defined by the graded ``module``.
If ``twist`` is a non-zero integer `n`, the sheaf twisted by
`\OO_{\PP^r}(n)` is returned.
INPUT:
- ``module`` -- a free module or a quotient module over the coordinate
ring of this space
- ``twist`` -- (default: `0`) an integer
EXAMPLES::
sage: P2 = ProjectiveSpace(QQ, 2, 'x')
sage: S = P2.coordinate_ring()
sage: SS = FreeModule(S, 2)
sage: P2.coherent_sheaf(SS, twist=2)
Twisted Sheaf on Projective Space of dimension 2 over Rational Field
"""
from sage.schemes.sheaves.sheaf import Sheaf_on_projective_space
return Sheaf_on_projective_space(self, module, twist=twist)

def structure_sheaf(self, twist=0):
r"""
Return the structure sheaf `\OO_{\PP^r}` of this projective space.
If ``twist`` is a non-zero integer `n`, the sheaf twisted by
`\OO_{\PP^r}(n)` is returned.
INPUT:
- ``twist`` -- (default: `0`) an integer
EXAMPLES::
sage: P3.<x0,x1,x2,x3> = ProjectiveSpace(QQ, 3)
sage: P3.structure_sheaf()
Sheaf on Projective Space of dimension 3 over Rational Field
"""
M = FreeModule(self.coordinate_ring(), rank=1)
return self.coherent_sheaf(M, twist=twist)

def arithmetic_genus(self):
r"""
Return the arithmetic genus of this projective space.
This is known to be zero. This method simply checks the fact.
EXAMPLES::
sage: P1 = ProjectiveSpace(QQ, 1)
sage: P1.arithmetic_genus()
0
sage: P2 = ProjectiveSpace(QQ, 2)
sage: P2.arithmetic_genus()
0
"""
p = self.structure_sheaf().euler_characteristic() - 1
if self.dimension() % 2:
p = -p
return p


class ProjectiveSpace_finite_field(ProjectiveSpace_field):
def _point(self, *args, **kwds):
Expand Down
Loading

0 comments on commit c8996fb

Please sign in to comment.