ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 15 Feb 2021 22:18:34 +0100Height of rational pointshttps://ask.sagemath.org/question/55698/height-of-rational-points/Hi, I'm looking at this example of enumeration of rational points from the documentation [*Enumeration of rational points on projective schemes*](https://doc.sagemath.org/html/en/reference/schemes/sage/schemes/projective/projective_rational_point.html). Here I'm considering the entire projective plane.
from sage.schemes.projective.projective_rational_point import enum_projective_number_field
u = QQ['u'].0
K = NumberField(u^3 - 5, 'v')
P.<x,y,z> = ProjectiveSpace(K, 2)
enum_projective_number_field(P, bound=RR(5^(1/3)), prec=2^10)
The returned result includes several points like `(v : 1/5*v^2 : 1)`. If I'm not mistaken, this point is of height 25^(1/3) instead of 5^(1/3): for the infinite place the first coordinate provides a 5^(1/3), and for the place 5 the second coordinate provides another 5^(1/3). Is this a bug?
**Edit.** I reviewed the code, it seems that the problem is in the file `schemes/projective/projective_space.py`, the method `points_of_bounded_height` of class `ProjectiveSpace_field`. When enumerating points with bounded height over a number field, it uses the method `elements_of_bounded_height`: this gives not just algebraic integers but all field elements with bounded height.Sat, 13 Feb 2021 20:57:44 +0100https://ask.sagemath.org/question/55698/height-of-rational-points/Comment by Max Alekseyev for <p>Hi, I'm looking at this example of enumeration of rational points from the documentation <a href="https://doc.sagemath.org/html/en/reference/schemes/sage/schemes/projective/projective_rational_point.html"><em>Enumeration of rational points on projective schemes</em></a>. Here I'm considering the entire projective plane.</p>
<pre><code>from sage.schemes.projective.projective_rational_point import enum_projective_number_field
u = QQ['u'].0
K = NumberField(u^3 - 5, 'v')
P.<x,y,z> = ProjectiveSpace(K, 2)
enum_projective_number_field(P, bound=RR(5^(1/3)), prec=2^10)
</code></pre>
<p>The returned result includes several points like <code>(v : 1/5*v^2 : 1)</code>. If I'm not mistaken, this point is of height 25^(1/3) instead of 5^(1/3): for the infinite place the first coordinate provides a 5^(1/3), and for the place 5 the second coordinate provides another 5^(1/3). Is this a bug?</p>
<p><strong>Edit.</strong> I reviewed the code, it seems that the problem is in the file <code>schemes/projective/projective_space.py</code>, the method <code>points_of_bounded_height</code> of class <code>ProjectiveSpace_field</code>. When enumerating points with bounded height over a number field, it uses the method <code>elements_of_bounded_height</code>: this gives not just algebraic integers but all field elements with bounded height.</p>
https://ask.sagemath.org/question/55698/height-of-rational-points/?comment=55708#post-id-55708I'm not an expert but
E = enum_projective_number_field(P, bound=RR(5^(1/3)), prec=2^10)
max( e.global_height() for e in E )
gives 0.536479304144700, which is smaller than 5^(1/3).Sun, 14 Feb 2021 18:22:19 +0100https://ask.sagemath.org/question/55698/height-of-rational-points/?comment=55708#post-id-55708Comment by 8d1h for <p>Hi, I'm looking at this example of enumeration of rational points from the documentation <a href="https://doc.sagemath.org/html/en/reference/schemes/sage/schemes/projective/projective_rational_point.html"><em>Enumeration of rational points on projective schemes</em></a>. Here I'm considering the entire projective plane.</p>
<pre><code>from sage.schemes.projective.projective_rational_point import enum_projective_number_field
u = QQ['u'].0
K = NumberField(u^3 - 5, 'v')
P.<x,y,z> = ProjectiveSpace(K, 2)
enum_projective_number_field(P, bound=RR(5^(1/3)), prec=2^10)
</code></pre>
<p>The returned result includes several points like <code>(v : 1/5*v^2 : 1)</code>. If I'm not mistaken, this point is of height 25^(1/3) instead of 5^(1/3): for the infinite place the first coordinate provides a 5^(1/3), and for the place 5 the second coordinate provides another 5^(1/3). Is this a bug?</p>
<p><strong>Edit.</strong> I reviewed the code, it seems that the problem is in the file <code>schemes/projective/projective_space.py</code>, the method <code>points_of_bounded_height</code> of class <code>ProjectiveSpace_field</code>. When enumerating points with bounded height over a number field, it uses the method <code>elements_of_bounded_height</code>: this gives not just algebraic integers but all field elements with bounded height.</p>
https://ask.sagemath.org/question/55698/height-of-rational-points/?comment=55710#post-id-55710Thanks for the comment! First of all, `global_height` gives the logarithm height, so one should consider exp(0.53...) which is actually equal to 5^(1/3).
But this only computes the maximal height among the three coordinates, instead of the height as a homogeneous coordinate. The former is not a well-defined function, for example for (1:1:1)=(2:2:2) it can give both 0=ln(1) and ln(2).Mon, 15 Feb 2021 01:47:32 +0100https://ask.sagemath.org/question/55698/height-of-rational-points/?comment=55710#post-id-55710Comment by 8d1h for <p>Hi, I'm looking at this example of enumeration of rational points from the documentation <a href="https://doc.sagemath.org/html/en/reference/schemes/sage/schemes/projective/projective_rational_point.html"><em>Enumeration of rational points on projective schemes</em></a>. Here I'm considering the entire projective plane.</p>
<pre><code>from sage.schemes.projective.projective_rational_point import enum_projective_number_field
u = QQ['u'].0
K = NumberField(u^3 - 5, 'v')
P.<x,y,z> = ProjectiveSpace(K, 2)
enum_projective_number_field(P, bound=RR(5^(1/3)), prec=2^10)
</code></pre>
<p>The returned result includes several points like <code>(v : 1/5*v^2 : 1)</code>. If I'm not mistaken, this point is of height 25^(1/3) instead of 5^(1/3): for the infinite place the first coordinate provides a 5^(1/3), and for the place 5 the second coordinate provides another 5^(1/3). Is this a bug?</p>
<p><strong>Edit.</strong> I reviewed the code, it seems that the problem is in the file <code>schemes/projective/projective_space.py</code>, the method <code>points_of_bounded_height</code> of class <code>ProjectiveSpace_field</code>. When enumerating points with bounded height over a number field, it uses the method <code>elements_of_bounded_height</code>: this gives not just algebraic integers but all field elements with bounded height.</p>
https://ask.sagemath.org/question/55698/height-of-rational-points/?comment=55722#post-id-55722My code for enumeration of points using elimination is [here](https://github.com/8d1h/RationalPoints) if anyone is interested. There is a hacked-up global height function for homogeneous coordinates.Mon, 15 Feb 2021 22:18:34 +0100https://ask.sagemath.org/question/55698/height-of-rational-points/?comment=55722#post-id-55722Answer by John Cremona for <p>Hi, I'm looking at this example of enumeration of rational points from the documentation <a href="https://doc.sagemath.org/html/en/reference/schemes/sage/schemes/projective/projective_rational_point.html"><em>Enumeration of rational points on projective schemes</em></a>. Here I'm considering the entire projective plane.</p>
<pre><code>from sage.schemes.projective.projective_rational_point import enum_projective_number_field
u = QQ['u'].0
K = NumberField(u^3 - 5, 'v')
P.<x,y,z> = ProjectiveSpace(K, 2)
enum_projective_number_field(P, bound=RR(5^(1/3)), prec=2^10)
</code></pre>
<p>The returned result includes several points like <code>(v : 1/5*v^2 : 1)</code>. If I'm not mistaken, this point is of height 25^(1/3) instead of 5^(1/3): for the infinite place the first coordinate provides a 5^(1/3), and for the place 5 the second coordinate provides another 5^(1/3). Is this a bug?</p>
<p><strong>Edit.</strong> I reviewed the code, it seems that the problem is in the file <code>schemes/projective/projective_space.py</code>, the method <code>points_of_bounded_height</code> of class <code>ProjectiveSpace_field</code>. When enumerating points with bounded height over a number field, it uses the method <code>elements_of_bounded_height</code>: this gives not just algebraic integers but all field elements with bounded height.</p>
https://ask.sagemath.org/question/55698/height-of-rational-points/?answer=55714#post-id-55714Looking at the code, it seems to me that the functions implementing local and global heights are wrong. The global height of an individual algebraic number is, I think, correct (and I seem to remember that I wrote it) but the height of a point is projective space is certainly not the max of the heights of the coordinates -- for a start that is not well-defined, as already remarked. I'll make a sage trac ticket for this, and may even fix it myself.
Mon, 15 Feb 2021 12:17:05 +0100https://ask.sagemath.org/question/55698/height-of-rational-points/?answer=55714#post-id-55714Comment by 8d1h for <p>Looking at the code, it seems to me that the functions implementing local and global heights are wrong. The global height of an individual algebraic number is, I think, correct (and I seem to remember that I wrote it) but the height of a point is projective space is certainly not the max of the heights of the coordinates -- for a start that is not well-defined, as already remarked. I'll make a sage trac ticket for this, and may even fix it myself.</p>
https://ask.sagemath.org/question/55698/height-of-rational-points/?comment=55715#post-id-55715That would be great, thanks a lot!
BTW the algorithm for the enumeration of points on projective varieties is not very efficient. I wrote a package in Macaulay2 using elimination, maybe I'll try to port it to Sage too.Mon, 15 Feb 2021 12:58:12 +0100https://ask.sagemath.org/question/55698/height-of-rational-points/?comment=55715#post-id-55715Comment by vdelecroix for <p>Looking at the code, it seems to me that the functions implementing local and global heights are wrong. The global height of an individual algebraic number is, I think, correct (and I seem to remember that I wrote it) but the height of a point is projective space is certainly not the max of the heights of the coordinates -- for a start that is not well-defined, as already remarked. I'll make a sage trac ticket for this, and may even fix it myself.</p>
https://ask.sagemath.org/question/55698/height-of-rational-points/?comment=55719#post-id-55719The ticket is http://trac.sagemath.org/ticket/31400Mon, 15 Feb 2021 19:23:37 +0100https://ask.sagemath.org/question/55698/height-of-rational-points/?comment=55719#post-id-55719