RationalPoints2 is a package for enumerating rational points on a variety defined by an ideal of a polynomial ring. The main function is rationalPoints. Over a finite field it will list all the rational points. Over a number field it can find all points of a 0-dimensional ideal in its splitting field, and all points with bounded height for a positive dimensional ideal. The package also provides some utility functions related to field extensions, which allow the computation of rational points with prescribed coefficient field.
An example over a finite field.
i1 : ZZ/2[x,y,z]; rationalPoints(ideal(y^2*z+y*z^2-x^3-x*z^2), Projective=>true) o2 = {(1 : 0 : 1), (1 : 1 : 1), (0 : 1 : 0), (0 : 1 : 1), (0 : 0 : 1)} o2 : List |
An example over a number field: we enumerate the rational points on the unit circle with bounded height.
i3 : QQ[x,y]; rationalPoints(ideal(x^2+y^2-1), Bound=>5) 3 4 3 4 4 3 4 o4 = {{0, -1}, {1, 0}, {-1, 0}, {0, 1}, {-, - -}, {- -, - -}, {-, - -}, {- -, 5 5 5 5 5 5 5 ------------------------------------------------------------------------ 3 4 3 4 3 3 4 3 4 - -}, {-, -}, {- -, -}, {-, -}, {- -, -}} 5 5 5 5 5 5 5 5 5 o4 : List |
And an example of a 0-dimensional ideal.
i5 : QQ[x,y]; I = ideal(x^2+1,y^2-2); o6 : Ideal of QQ[x..y] |
i7 : rationalPoints(I, Verbose=>true) -- the following polynomials do not split -- x^2-2 o7 = {} o7 : List |
i8 : rationalPoints(I, Split=>true, Verbose=>true) -- base change to the field QQ[a]/(a^2-2) -- base change to the field QQ[a]/(a^4-2*a^2+9) 1 3 1 1 3 5 1 3 1 1 3 5 1 3 1 1 3 5 o8 = {{-a + -a, -a - -a}, {- -a - -a, -a - -a}, {-a + -a, - -a + -a}, 6 6 6 6 6 6 6 6 6 6 6 6 ------------------------------------------------------------------------ 1 3 1 1 3 5 {- -a - -a, - -a + -a}} 6 6 6 6 o8 : List |
Currently the functionality of positive dimensional ideals over number fields other than QQ depends on Sage (an algorithm by Doyle–Krumm for enumerating field elements with bounded height).
This documentation describes version 0.5 of RationalPoints2.
The source code from which this documentation is derived is in the file RationalPoints2.m2.
The object RationalPoints2 is a package.