-
-
Notifications
You must be signed in to change notification settings - Fork 528
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add sheaf cohomology for projective schemes
- Loading branch information
Showing
12 changed files
with
1,002 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
@@ -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): | ||
""" | ||
|
@@ -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") | ||
|
@@ -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): | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
@@ -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 | ||
|
@@ -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. | ||
|
@@ -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: | ||
|
@@ -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]) | ||
|
||
|
@@ -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) | ||
|
@@ -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. | ||
|
@@ -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): | ||
|
@@ -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. | ||
|
Oops, something went wrong.