Divisor groups#
AUTHORS:
David Kohel (2006): Initial version
Volker Braun (2010-07-16): Documentation, doctests, coercion fixes, bugfixes.
- sage.schemes.generic.divisor_group.DivisorGroup(scheme, base_ring=None)[source]#
Return the group of divisors on the scheme.
INPUT:
scheme
– a scheme.base_ring
– usually either \(\ZZ\) (default) or \(\QQ\). The coefficient ring of the divisors. Not to be confused with the base ring of the scheme!
OUTPUT:
An instance of
DivisorGroup_generic
.EXAMPLES:
sage: from sage.schemes.generic.divisor_group import DivisorGroup sage: DivisorGroup(Spec(ZZ)) Group of ZZ-Divisors on Spectrum of Integer Ring sage: DivisorGroup(Spec(ZZ), base_ring=QQ) Group of QQ-Divisors on Spectrum of Integer Ring
>>> from sage.all import * >>> from sage.schemes.generic.divisor_group import DivisorGroup >>> DivisorGroup(Spec(ZZ)) Group of ZZ-Divisors on Spectrum of Integer Ring >>> DivisorGroup(Spec(ZZ), base_ring=QQ) Group of QQ-Divisors on Spectrum of Integer Ring
- class sage.schemes.generic.divisor_group.DivisorGroup_curve(scheme, base_ring)[source]#
Bases:
DivisorGroup_generic
Special case of the group of divisors on a curve.
- class sage.schemes.generic.divisor_group.DivisorGroup_generic(scheme, base_ring)[source]#
Bases:
FormalSums
The divisor group on a variety.
- base_extend(R)[source]#
EXAMPLES:
sage: from sage.schemes.generic.divisor_group import DivisorGroup sage: DivisorGroup(Spec(ZZ), ZZ).base_extend(QQ) Group of QQ-Divisors on Spectrum of Integer Ring sage: DivisorGroup(Spec(ZZ), ZZ).base_extend(GF(7)) Group of (Finite Field of size 7)-Divisors on Spectrum of Integer Ring
>>> from sage.all import * >>> from sage.schemes.generic.divisor_group import DivisorGroup >>> DivisorGroup(Spec(ZZ), ZZ).base_extend(QQ) Group of QQ-Divisors on Spectrum of Integer Ring >>> DivisorGroup(Spec(ZZ), ZZ).base_extend(GF(Integer(7))) Group of (Finite Field of size 7)-Divisors on Spectrum of Integer Ring
Divisor groups are unique:
sage: A.<x, y> = AffineSpace(2, CC) # needs sage.rings.real_mpfr sage: C = Curve(y^2 - x^9 - x) # needs sage.rings.real_mpfr sage.schemes sage: DivisorGroup(C, ZZ).base_extend(QQ) is DivisorGroup(C, QQ) # needs sage.rings.real_mpfr sage.schemes True
>>> from sage.all import * >>> A = AffineSpace(Integer(2), CC, names=('x', 'y',)); (x, y,) = A._first_ngens(2)# needs sage.rings.real_mpfr >>> C = Curve(y**Integer(2) - x**Integer(9) - x) # needs sage.rings.real_mpfr sage.schemes >>> DivisorGroup(C, ZZ).base_extend(QQ) is DivisorGroup(C, QQ) # needs sage.rings.real_mpfr sage.schemes True
- scheme()[source]#
Return the scheme supporting the divisors.
EXAMPLES:
sage: from sage.schemes.generic.divisor_group import DivisorGroup sage: Div = DivisorGroup(Spec(ZZ)) # indirect test sage: Div.scheme() Spectrum of Integer Ring
>>> from sage.all import * >>> from sage.schemes.generic.divisor_group import DivisorGroup >>> Div = DivisorGroup(Spec(ZZ)) # indirect test >>> Div.scheme() Spectrum of Integer Ring
- sage.schemes.generic.divisor_group.is_DivisorGroup(x)[source]#
Return whether
x
is aDivisorGroup_generic
.INPUT:
x
– anything.
OUTPUT:
True
orFalse
.EXAMPLES:
sage: from sage.schemes.generic.divisor_group import is_DivisorGroup, DivisorGroup sage: Div = DivisorGroup(Spec(ZZ), base_ring=QQ) sage: is_DivisorGroup(Div) doctest:warning... DeprecationWarning: The function is_DivisorGroup is deprecated; use 'isinstance(..., DivisorGroup_generic)' instead. See https://github.com/sagemath/sage/issues/38022 for details. True sage: is_DivisorGroup('not a divisor') False
>>> from sage.all import * >>> from sage.schemes.generic.divisor_group import is_DivisorGroup, DivisorGroup >>> Div = DivisorGroup(Spec(ZZ), base_ring=QQ) >>> is_DivisorGroup(Div) doctest:warning... DeprecationWarning: The function is_DivisorGroup is deprecated; use 'isinstance(..., DivisorGroup_generic)' instead. See https://github.com/sagemath/sage/issues/38022 for details. True >>> is_DivisorGroup('not a divisor') False