# One point from infinity variety

Given an ideal, I want to compute a non-zero point in the variety of that ideal. This can be done with .variety() if the ideal has 0-dimension. How can I get a non-zero point in the variety if the ideal is not 0-dimensional?

Example:

R.<x,y> = PolynomialRing(QQ)
I = R.ideal([x^2-y^2])
I.variety()


yields an error. How can I get a point like (1,1) which lies in the variety?

Thanks!

edit retag close merge delete

Thank you! Two problems come into my mind with that approach: 1. If I intersect with hyperplanes I do not necessarily reduce the dimension by 1. Say I start with dimension 3, I might get the entire ring (so no solution at all) just by adding one hyperplane. 2. I am searching for elements in the variety which are (say) rational. By intersecting with a hyperplane I might get rid of possible rational solutions. However, I suppose mathematically this problem should be quite hard, as it is already very difficult to find rational points on some "easy" curves.

Sort by » oldest newest most voted

I tink that this is along the lines provided by FrédéricC :

sage: RR.<x,y>=PolynomialRing(QQ) ## R has some use already
sage: J=RR.ideal([x^2-y^2]) ## Similarly, I has an interesting use
sage: [J.random_element(u) for u in (1..5)]
[0,
-1/2*x^2 + 1/2*y^2,
-1/39*x^3 - 2/3*x^2*y + 1/39*x*y^2 + 2/3*y^3,
-x^3*y + x*y^3 - x^3 + x*y^2 + x^2 - y^2,
-4*x^2*y^3 + 4*y^5 + x^3 + 7/4*x^2*y - x*y^2 - 7/4*y^3 - x^2 + y^2]


HTH,

more

Thank you. I am probably missing something here. How do I get a random point in the variety from some random polynomials in the ideal?