mo: 57037

450 days ago by wstein

R.<x,y,z> = QQ[] 
       
P.<x,y,z> = ProjectiveSpace(R) 
       
F = x^3 - 8*x^2 + 5*x + 1 + 7*y^2*(x-1)*x 
       
G = F.homogenize(z); G 
       
7*x^2*y^2 + x^3*z - 7*x*y^2*z - 8*x^2*z^2 + 5*x*z^3 + z^4
7*x^2*y^2 + x^3*z - 7*x*y^2*z - 8*x^2*z^2 + 5*x*z^3 + z^4
C = Curve(G); C 
       
Projective Curve over Rational Field defined by 7*x^2*y^2 + x^3*z -
7*x*y^2*z - 8*x^2*z^2 + 5*x*z^3 + z^4
Projective Curve over Rational Field defined by 7*x^2*y^2 + x^3*z - 7*x*y^2*z - 8*x^2*z^2 + 5*x*z^3 + z^4
C.genus() 
       
2
2
C.arithmetic_genus() 
       
3
3
C.is_singular() 
       
True
True
C.affine_patch(2) 
       
Closed subscheme of Affine Space of dimension 2 over Rational Field
defined by:
  7*x0^2*x1^2 + x0^3 - 7*x0*x1^2 - 8*x0^2 + 5*x0 + 1
Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
  7*x0^2*x1^2 + x0^3 - 7*x0*x1^2 - 8*x0^2 + 5*x0 + 1
R.<x,y> = QQ[] F0 = x^3 - 8*x^2 + 5*x + 1 + 7*y^2*(x-1)*x 
       
I = ideal([F0, F0.derivative(x), F0.derivative(y)]) 
       
I.groebner_basis() 
       
[1]
[1]
A = C.affine_patch(2); A 
       
Closed subscheme of Affine Space of dimension 2 over Rational Field
defined by:
  7*x0^2*x1^2 + x0^3 - 7*x0*x1^2 - 8*x0^2 + 5*x0 + 1
Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
  7*x0^2*x1^2 + x0^3 - 7*x0*x1^2 - 8*x0^2 + 5*x0 + 1
R.<x0,x1> = QQ[] A = C.affine_patch(1); A F0 = R(A.defining_polynomials()[0]) I = ideal([F0, F0.derivative(x0), F0.derivative(x1)]) I.groebner_basis() 
       
[x0, x1]
[x0, x1]
       
Ideal (x0^3*x1 - 8*x0^2*x1^2 + 5*x0*x1^3 + x1^4 + 7*x0^2 - 7*x0*x1,
3*x0^2*x1 - 16*x0*x1^2 + 5*x1^3 + 14*x0 - 7*x1, x0^3 - 16*x0^2*x1 +
15*x0*x1^2 + 4*x1^3 - 7*x0) of Multivariate Polynomial Ring in x0, x1
over Rational Field
Ideal (x0^3*x1 - 8*x0^2*x1^2 + 5*x0*x1^3 + x1^4 + 7*x0^2 - 7*x0*x1, 3*x0^2*x1 - 16*x0*x1^2 + 5*x1^3 + 14*x0 - 7*x1, x0^3 - 16*x0^2*x1 + 15*x0*x1^2 + 4*x1^3 - 7*x0) of Multivariate Polynomial Ring in x0, x1 over Rational Field
implicit_plot(F0, (x0,-1,1), (x1,-1,1)) 
       
%cython def point_search(int B): cdef long long x, y, z for x in range(-B, B): for y in range(-B, B): for z in range(1,B): if 7*x*x*y*y + x*x*x*z - 7*x*y*y*z - 8*x*x*z*z + 5*x*z*z*z + z*z*z*z == 0: print (x,y,z) 
time point_search(1000) 
       
Time: CPU 13.44 s, Wall: 13.46 s
Time: CPU 13.44 s, Wall: 13.46 s
time point_search(10000)