Points of bounded height in projective spaces

This module defines functions to compute points of bounded height of a given number field with height less than a specified bound in projective spaces.

Sage functions to list all elements of a given number field with height less than a specified bound.

AUTHORS:

  • Jing Guo (2022): initial version based on David Krumm’s code

REFERENCES:

  • [Krumm2016]

sage.schemes.projective.proj_bdd_height.IQ_points_of_bounded_height(PS, K, dim, bound)[source]

Return an iterator of the points in self of absolute multiplicative height of at most bound in the imaginary quadratic field K.

INPUT:

  • PS – a projective space

  • K – a number field

  • dim – a positive integer

  • bound – a real number

OUTPUT: an iterator of points of bounded height

EXAMPLES:

sage: # needs sage.rings.number_field sage: from sage.schemes.projective.proj_bdd_height import IQ_points_of_bounded_height sage: CF.<a> = CyclotomicField(3) sage: P.<x,y,z> = ProjectiveSpace(CF, 2) sage: len(list(IQ_points_of_bounded_height(P, CF, 2, -1))) 0 sage: len(list(IQ_points_of_bounded_height(P, CF, 2, 1))) 57

sage.schemes.projective.proj_bdd_height.QQ_points_of_bounded_height(PS, dim, bound, normalize=False)[source]

Return an iterator of the points in self of absolute multiplicative height of at most bound in the rational field.

INPUT:

  • PS – a projective space

  • dim – positive integer

  • bound – a real number

  • normalize – boolean (default: False); whether to normalize the coordinates of returned points

OUTPUT: an iterator of points of bounded height

EXAMPLES:

sage: from sage.schemes.projective.proj_bdd_height import QQ_points_of_bounded_height
sage: PS = ProjectiveSpace(QQ, 1)
sage: sorted(list(QQ_points_of_bounded_height(PS, 1, 1)))
[(-1 : 1), (0 : 1), (1 : 0), (1 : 1)]
sage: len(list(QQ_points_of_bounded_height(PS, 1, 5)))
40
sage: sorted(list(QQ_points_of_bounded_height(PS, 1, 2)))
[(-2 : 1), (-1 : 1), (-1/2 : 1), (0 : 1),
 (1/2 : 1), (1 : 0), (1 : 1), (2 : 1)]
sage: sorted(list(QQ_points_of_bounded_height(PS, 1, 2, normalize=True)))
[(-2 : 1), (-1 : 1), (-1 : 2), (0 : 1),
 (1 : 0), (1 : 1), (1 : 2), (2 : 1)]
>>> from sage.all import *
>>> from sage.schemes.projective.proj_bdd_height import QQ_points_of_bounded_height
>>> PS = ProjectiveSpace(QQ, Integer(1))
>>> sorted(list(QQ_points_of_bounded_height(PS, Integer(1), Integer(1))))
[(-1 : 1), (0 : 1), (1 : 0), (1 : 1)]
>>> len(list(QQ_points_of_bounded_height(PS, Integer(1), Integer(5))))
40
>>> sorted(list(QQ_points_of_bounded_height(PS, Integer(1), Integer(2))))
[(-2 : 1), (-1 : 1), (-1/2 : 1), (0 : 1),
 (1/2 : 1), (1 : 0), (1 : 1), (2 : 1)]
>>> sorted(list(QQ_points_of_bounded_height(PS, Integer(1), Integer(2), normalize=True)))
[(-2 : 1), (-1 : 1), (-1 : 2), (0 : 1),
 (1 : 0), (1 : 1), (1 : 2), (2 : 1)]

There are no points of negative height:

sage: from sage.schemes.projective.proj_bdd_height import QQ_points_of_bounded_height
sage: PS = ProjectiveSpace(QQ, 1)
sage: list(QQ_points_of_bounded_height(PS, 1, -3))
[]
>>> from sage.all import *
>>> from sage.schemes.projective.proj_bdd_height import QQ_points_of_bounded_height
>>> PS = ProjectiveSpace(QQ, Integer(1))
>>> list(QQ_points_of_bounded_height(PS, Integer(1), -Integer(3)))
[]
sage.schemes.projective.proj_bdd_height.ZZ_points_of_bounded_height(PS, dim, bound)[source]

Return an iterator of the points in self of absolute multiplicative height of at most bound in the rational field.

INPUT:

  • PS – a projective space

  • dim – positive integer

  • bound – positive integer

OUTPUT: an iterator of points of bounded height

EXAMPLES:

sage: from sage.schemes.projective.proj_bdd_height import ZZ_points_of_bounded_height
sage: PS = ProjectiveSpace(ZZ, 1)
sage: sorted(list(ZZ_points_of_bounded_height(PS, 1, 1)))
[(-1 : -1), (-1 : 0), (-1 : 1), (0 : -1)]
sage: len(list(ZZ_points_of_bounded_height(PS, 1, 5)))
40
sage: sorted(list(ZZ_points_of_bounded_height(PS, 1, 2)))
[(-2 : -1), (-2 : 1), (-1 : -2), (-1 : -1),
 (-1 : 0), (-1 : 1), (-1 : 2), (0 : -1)]
sage: PS = ProjectiveSpace(ZZ, 2)
sage: sorted(list(ZZ_points_of_bounded_height(PS, 2, 1)))
[(-1 : -1 : -1), (-1 : -1 : 0), (-1 : -1 : 1), (-1 : 0 : -1),
 (-1 : 0 : 0), (-1 : 0 : 1), (-1 : 1 : -1), (-1 : 1 : 0),
 (-1 : 1 : 1), (0 : -1 : -1), (0 : -1 : 0), (0 : -1 : 1),
 (0 : 0 : -1)]
>>> from sage.all import *
>>> from sage.schemes.projective.proj_bdd_height import ZZ_points_of_bounded_height
>>> PS = ProjectiveSpace(ZZ, Integer(1))
>>> sorted(list(ZZ_points_of_bounded_height(PS, Integer(1), Integer(1))))
[(-1 : -1), (-1 : 0), (-1 : 1), (0 : -1)]
>>> len(list(ZZ_points_of_bounded_height(PS, Integer(1), Integer(5))))
40
>>> sorted(list(ZZ_points_of_bounded_height(PS, Integer(1), Integer(2))))
[(-2 : -1), (-2 : 1), (-1 : -2), (-1 : -1),
 (-1 : 0), (-1 : 1), (-1 : 2), (0 : -1)]
>>> PS = ProjectiveSpace(ZZ, Integer(2))
>>> sorted(list(ZZ_points_of_bounded_height(PS, Integer(2), Integer(1))))
[(-1 : -1 : -1), (-1 : -1 : 0), (-1 : -1 : 1), (-1 : 0 : -1),
 (-1 : 0 : 0), (-1 : 0 : 1), (-1 : 1 : -1), (-1 : 1 : 0),
 (-1 : 1 : 1), (0 : -1 : -1), (0 : -1 : 0), (0 : -1 : 1),
 (0 : 0 : -1)]

There are no points of negative height:

sage: from sage.schemes.projective.proj_bdd_height import ZZ_points_of_bounded_height
sage: PS = ProjectiveSpace(ZZ, 1)
sage: list(ZZ_points_of_bounded_height(PS, 1, -3))
[]
>>> from sage.all import *
>>> from sage.schemes.projective.proj_bdd_height import ZZ_points_of_bounded_height
>>> PS = ProjectiveSpace(ZZ, Integer(1))
>>> list(ZZ_points_of_bounded_height(PS, Integer(1), -Integer(3)))
[]
sage.schemes.projective.proj_bdd_height.points_of_bounded_height(PS, K, dim, bound, prec=53)[source]

Return an iterator of the points in K with dimension dim of absolute multiplicative height of at most bound.

ALGORITHM:

This is an implementation of Algorithm 6 in [Krumm2016].

INPUT:

  • PS – a projective space

  • K – a number field

  • dim – positive integer

  • bound – a real number

  • prec – (default: 53) a positive integer

OUTPUT: an iterator of points of bounded height

EXAMPLES:

sage: from sage.schemes.projective.proj_bdd_height import points_of_bounded_height
sage: x = polygen(ZZ, 'x')

sage: # needs sage.geometry.polyhedron sage.libs.pari sage.rings.number_field
sage: K.<a> = NumberField(x^3 - 7)
sage: P.<x,y,z> = ProjectiveSpace(K, 2)
sage: sorted(list(points_of_bounded_height(P, K, 2, 1)))
[(0 : 0 : 1), (0 : 1 : 0), (1 : 0 : 0), (0 : -1 : 1), (0 : 1 : 1),
 (-1 : 0 : 1), (1 : 0 : 1), (1 : 1 : 0), (-1 : 1 : 0), (-1 : -1 : 1),
 (-1 : 1 : 1), (1 : -1 : 1), (1 : 1 : 1)]
>>> from sage.all import *
>>> from sage.schemes.projective.proj_bdd_height import points_of_bounded_height
>>> x = polygen(ZZ, 'x')

>>> # needs sage.geometry.polyhedron sage.libs.pari sage.rings.number_field
>>> K = NumberField(x**Integer(3) - Integer(7), names=('a',)); (a,) = K._first_ngens(1)
>>> P = ProjectiveSpace(K, Integer(2), names=('x', 'y', 'z',)); (x, y, z,) = P._first_ngens(3)
>>> sorted(list(points_of_bounded_height(P, K, Integer(2), Integer(1))))
[(0 : 0 : 1), (0 : 1 : 0), (1 : 0 : 0), (0 : -1 : 1), (0 : 1 : 1),
 (-1 : 0 : 1), (1 : 0 : 1), (1 : 1 : 0), (-1 : 1 : 0), (-1 : -1 : 1),
 (-1 : 1 : 1), (1 : -1 : 1), (1 : 1 : 1)]

sage: # needs sage.geometry.polyhedron sage.libs.pari sage.rings.number_field
sage: R.<x> = QQ[]
sage: K.<a> = NumberField(3*x^2 + 1)
sage: O = K.maximal_order()
sage: P.<z,w> = ProjectiveSpace(O, 1)
sage: len(list(P.points_of_bounded_height(bound=2)))
44
>>> from sage.all import *
>>> # needs sage.geometry.polyhedron sage.libs.pari sage.rings.number_field
>>> R = QQ['x']; (x,) = R._first_ngens(1)
>>> K = NumberField(Integer(3)*x**Integer(2) + Integer(1), names=('a',)); (a,) = K._first_ngens(1)
>>> O = K.maximal_order()
>>> P = ProjectiveSpace(O, Integer(1), names=('z', 'w',)); (z, w,) = P._first_ngens(2)
>>> len(list(P.points_of_bounded_height(bound=Integer(2))))
44

sage: # needs sage.geometry.polyhedron sage.libs.pari sage.rings.number_field
sage: R.<x> = QQ[]
sage: K.<a> = NumberField(3*x^2 + 1)
sage: O = K.maximal_order()
sage: P.<z,w> = ProjectiveSpace(O, 1)
sage: sorted(list(P.points_of_bounded_height(bound=1)))
[(-1 : 1), (-3/2*a - 1/2 : 1), (3/2*a - 1/2 : 1), (0 : 1),
 (-3/2*a + 1/2 : 0), (-3/2*a + 1/2 : 1), (3/2*a + 1/2 : 1), (1 : 1)]
>>> from sage.all import *
>>> # needs sage.geometry.polyhedron sage.libs.pari sage.rings.number_field
>>> R = QQ['x']; (x,) = R._first_ngens(1)
>>> K = NumberField(Integer(3)*x**Integer(2) + Integer(1), names=('a',)); (a,) = K._first_ngens(1)
>>> O = K.maximal_order()
>>> P = ProjectiveSpace(O, Integer(1), names=('z', 'w',)); (z, w,) = P._first_ngens(2)
>>> sorted(list(P.points_of_bounded_height(bound=Integer(1))))
[(-1 : 1), (-3/2*a - 1/2 : 1), (3/2*a - 1/2 : 1), (0 : 1),
 (-3/2*a + 1/2 : 0), (-3/2*a + 1/2 : 1), (3/2*a + 1/2 : 1), (1 : 1)]

sage: # needs sage.geometry.polyhedron sage.libs.pari sage.rings.number_field
sage: R.<x> = QQ[]
sage: K.<z> = NumberField(x^2 - 2)
sage: R2.<y> = K[]
sage: L.<w> = K.extension(y^2 - 3)
sage: P.<a,b> = ProjectiveSpace(L, 1)
sage: len(list(P.points_of_bounded_height(bound=2)))
256
>>> from sage.all import *
>>> # needs sage.geometry.polyhedron sage.libs.pari sage.rings.number_field
>>> R = QQ['x']; (x,) = R._first_ngens(1)
>>> K = NumberField(x**Integer(2) - Integer(2), names=('z',)); (z,) = K._first_ngens(1)
>>> R2 = K['y']; (y,) = R2._first_ngens(1)
>>> L = K.extension(y**Integer(2) - Integer(3), names=('w',)); (w,) = L._first_ngens(1)
>>> P = ProjectiveSpace(L, Integer(1), names=('a', 'b',)); (a, b,) = P._first_ngens(2)
>>> len(list(P.points_of_bounded_height(bound=Integer(2))))
256