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 e94d684
Show file tree
Hide file tree
Showing 12 changed files with 1,002 additions and 45 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
53 changes: 33 additions & 20 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 @@ -34,13 +26,11 @@
from sage.schemes.generic.morphism import SchemeMorphism_point, SchemeMorphism, is_SchemeMorphism
from sage.structure.sequence import Sequence

_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 @@ -211,7 +201,7 @@ def global_height(self, prec=None):
R = RealField(prec)
H = max([self[i].abs() for i in range(self.codomain().ambient_space().dimension_relative())])
return R(max(H,1)).log()
if self.domain().base_ring() in _NumberFields or isinstance(self.domain().base_ring(), sage.rings.abc.Order):
if self.domain().base_ring() in NumberFields() or isinstance(self.domain().base_ring(), sage.rings.abc.Order):
return max([self[i].global_height(prec) for i in range(self.codomain().ambient_space().dimension_relative())])
else:
raise NotImplementedError("must be over a number field or a number field Order")
Expand Down Expand Up @@ -410,6 +400,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
71 changes: 49 additions & 22 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 All @@ -34,7 +28,6 @@

from sage.categories.integral_domains import IntegralDomains
from sage.categories.number_fields import NumberFields
_NumberFields = NumberFields()
from sage.rings.fraction_field import FractionField
from sage.rings.number_field.order import is_NumberFieldOrder, Order as NumberFieldOrder
from sage.rings.qqbar import number_field_elements_from_algebraics
Expand All @@ -52,9 +45,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 @@ -752,7 +747,7 @@ def global_height(self, prec=None):
if prec is None:
prec = 53
K = self.codomain().base_ring()
if K in _NumberFields or is_NumberFieldOrder(K):
if K in NumberFields() or is_NumberFieldOrder(K):
P = self
else:
try:
Expand Down Expand Up @@ -807,7 +802,7 @@ def local_height(self, v, prec=None):
0.693147180559945
"""
K = FractionField(self.domain().base_ring())
if K not in _NumberFields:
if K not in NumberFields():
raise TypeError("must be over a number field or a number field order")
return max([K(c).local_height(v, prec=prec) for c in self])

Expand Down Expand Up @@ -842,7 +837,7 @@ def local_height_arch(self, i, prec=None):
3.401197381662155375413236691607
"""
K = FractionField(self.domain().base_ring())
if K not in _NumberFields:
if K not in NumberFields():
raise TypeError("must be over a number field or a number field order")
if K == QQ:
return max(K(c).local_height_arch(prec=prec) for c in self)
Expand Down Expand Up @@ -1054,6 +1049,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 +1397,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 +1463,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
Loading

0 comments on commit e94d684

Please sign in to comment.