From 85415915be7bf80ae7819e8ecdf3d0b66a2ce157 Mon Sep 17 00:00:00 2001 From: Grayson Jorgenson Date: Wed, 1 Jun 2016 17:38:09 -0400 Subject: [PATCH] 20697: Added documentation and made curve string labels match class names. --- src/sage/schemes/affine/affine_space.py | 4 +- src/sage/schemes/curves/affine_curve.py | 78 ++++++++++++++++-- src/sage/schemes/curves/constructor.py | 32 ++++---- src/sage/schemes/curves/curve.py | 23 +++++- src/sage/schemes/curves/projective_curve.py | 81 +++++++++++++++++-- src/sage/schemes/elliptic_curves/jacobian.py | 2 +- src/sage/schemes/generic/divisor.py | 2 +- src/sage/schemes/generic/scheme.py | 2 +- .../schemes/jacobians/abstract_jacobian.py | 14 ++-- .../schemes/projective/projective_morphism.py | 4 +- .../schemes/projective/projective_space.py | 4 +- 11 files changed, 199 insertions(+), 47 deletions(-) diff --git a/src/sage/schemes/affine/affine_space.py b/src/sage/schemes/affine/affine_space.py index 65b4c69d8b6..368ed456ea7 100644 --- a/src/sage/schemes/affine/affine_space.py +++ b/src/sage/schemes/affine/affine_space.py @@ -946,9 +946,9 @@ def curve(self,F): sage: A. = AffineSpace(QQ, 3) sage: A.curve([y - x^4, z - y^5]) - Affine Space Curve over Rational Field defined by -x^4 + y, -y^5 + z + Affine Curve over Rational Field defined by -x^4 + y, -y^5 + z """ - from sage.schemes.plane_curves.constructor import Curve + from sage.schemes.curves.constructor import Curve return Curve(F, self) class AffineSpace_finite_field(AffineSpace_field): diff --git a/src/sage/schemes/curves/affine_curve.py b/src/sage/schemes/curves/affine_curve.py index 5a46dc5bb5a..1cf6649536f 100644 --- a/src/sage/schemes/curves/affine_curve.py +++ b/src/sage/schemes/curves/affine_curve.py @@ -1,5 +1,19 @@ """ -Affine plane curves over a general ring +Affine curves over fields. + +EXAMPLES: + +We can construct curves in either an affine plane:: + + sage: A. = AffineSpace(QQ, 2) + sage: C = Curve([y - x^2], A); C + Affine Plane Curve over Rational Field defined by -x^2 + y + +or in higher dimensional affine space:: + + sage: A. = AffineSpace(QQ, 4) + sage: C = Curve([y - x^2, z - w^3, w - y^4], A); C + Affine Curve over Rational Field defined by -x^2 + y, -w^3 + z, -y^4 + w AUTHORS: @@ -36,9 +50,37 @@ class AffineCurve(Curve_generic, AlgebraicScheme_subscheme_affine): def _repr_type(self): - return "Affine Space" + r""" + Return a string representation of the type of this curve. + + EXAMPLES:: + + sage: A. = AffineSpace(QQ, 4) + sage: C = Curve([x - y, z - w, w - x], A) + sage: C._repr_type() + 'Affine' + """ + return "Affine" def __init__(self, A, X): + r""" + Initialization function. + + EXAMPLES:: + + sage: R. = QQ[] + sage: K. = NumberField(v^2 + 3) + sage: A. = AffineSpace(K, 3) + sage: C = Curve([z - u*x^2, y^2], A); C + Affine Curve over Number Field in u with defining polynomial v^2 + 3 + defined by (-u)*x^2 + z, y^2 + + :: + + sage: A. = AffineSpace(GF(7), 3) + sage: C = Curve([x^2 - z, z - 8*x], A); C + Affine Curve over Finite Field of size 7 defined by x^2 - z, -x + z + """ if not is_AffineSpace(A): raise TypeError("A (=%s) must be an affine space"%A) Curve_generic.__init__(self, A, X) @@ -48,12 +90,38 @@ def __init__(self, A, X): class AffinePlaneCurve(AffineCurve): def __init__(self, A, f): + r""" + Initialization function. + + EXAMPLES:: + + sage: A. = AffineSpace(QQ, 2) + sage: C = Curve([x^3 - y^2], A); C + Affine Plane Curve over Rational Field defined by x^3 - y^2 + + :: + + sage: A. = AffineSpace(CC, 2) + sage: C = Curve([y^2 + x^2], A); C + Affine Plane Curve over Complex Field with 53 bits of precision defined + by x^2 + y^2 + """ if not (is_AffineSpace(A) and A.dimension != 2): raise TypeError("Argument A (= %s) must be an affine plane."%A) Curve_generic.__init__(self, A, [f]) def _repr_type(self): - return "Affine" + r""" + Return a string representation of the type of this curve. + + EXAMPLES:: + + sage: A. = AffineSpace(QQ, 2) + sage: C = Curve([y - 7/2*x^5 + x - 3], A) + sage: C._repr_type() + 'Affine Plane' + """ + return "Affine Plane" def divisor_of_function(self, r): """ @@ -239,7 +307,7 @@ def rational_points(self, algorithm="enum"): sage: A. = AffineSpace(2,GF(9,'a')) sage: C = Curve(x^2 + y^2 - 1) sage: C - Affine Curve over Finite Field in a of size 3^2 defined by x^2 + y^2 - 1 + Affine Plane Curve over Finite Field in a of size 3^2 defined by x^2 + y^2 - 1 sage: C.rational_points() [(0, 1), (0, 2), (1, 0), (2, 0), (a + 1, a + 1), (a + 1, 2*a + 2), (2*a + 2, a + 1), (2*a + 2, 2*a + 2)] """ @@ -346,7 +414,7 @@ def rational_points(self, algorithm="enum"): sage: x, y = (GF(5)['x,y']).gens() sage: f = y^2 - x^9 - x sage: C = Curve(f); C - Affine Curve over Finite Field of size 5 defined by -x^9 + y^2 - x + Affine Plane Curve over Finite Field of size 5 defined by -x^9 + y^2 - x sage: C.rational_points(algorithm='bn') [(0, 0), (2, 2), (2, 3), (3, 1), (3, 4)] sage: C = Curve(x - y + 1) diff --git a/src/sage/schemes/curves/constructor.py b/src/sage/schemes/curves/constructor.py index cdf8ac3aeda..18fbc18db2d 100644 --- a/src/sage/schemes/curves/constructor.py +++ b/src/sage/schemes/curves/constructor.py @@ -1,5 +1,5 @@ """ -Plane curve constructors +General curve constructors. AUTHORS: @@ -78,7 +78,7 @@ def Curve(F, A=None): sage: x,y,z = QQ['x,y,z'].gens() sage: C = Curve(x^3 + y^3 + z^3); C - Projective Curve over Rational Field defined by x^3 + y^3 + z^3 + Projective Plane Curve over Rational Field defined by x^3 + y^3 + z^3 sage: C.genus() 1 @@ -88,12 +88,12 @@ def Curve(F, A=None): sage: x,y = GF(7)['x,y'].gens() sage: C = Curve(y^2 + x^3 + x^10); C - Affine Curve over Finite Field of size 7 defined by x^10 + x^3 + y^2 + Affine Plane Curve over Finite Field of size 7 defined by x^10 + x^3 + y^2 sage: C.genus() 0 sage: x, y = QQ['x,y'].gens() sage: Curve(x^3 + y^3 + 1) - Affine Curve over Rational Field defined by x^3 + y^3 + 1 + Affine Plane Curve over Rational Field defined by x^3 + y^3 + 1 EXAMPLE: A projective space curve @@ -101,7 +101,7 @@ def Curve(F, A=None): sage: x,y,z,w = QQ['x,y,z,w'].gens() sage: C = Curve([x^3 + y^3 - z^3 - w^3, x^5 - y*z^4]); C - Projective Space Curve over Rational Field defined by x^3 + y^3 - z^3 - w^3, x^5 - y*z^4 + Projective Curve over Rational Field defined by x^3 + y^3 - z^3 - w^3, x^5 - y*z^4 sage: C.genus() 13 @@ -111,7 +111,7 @@ def Curve(F, A=None): sage: x,y,z = QQ['x,y,z'].gens() sage: C = Curve([y^2 + x^3 + x^10 + z^7, x^2 + y^2]); C - Affine Space Curve over Rational Field defined by x^10 + z^7 + x^3 + y^2, x^2 + y^2 + Affine Curve over Rational Field defined by x^10 + z^7 + x^3 + y^2, x^2 + y^2 sage: C.genus() 47 @@ -123,7 +123,7 @@ def Curve(F, A=None): sage: Curve((x-y)*(x+y)) Projective Conic Curve over Rational Field defined by x^2 - y^2 sage: Curve((x-y)^2*(x+y)^2) - Projective Curve over Rational Field defined by x^4 - 2*x^2*y^2 + y^4 + Projective Plane Curve over Rational Field defined by x^4 - 2*x^2*y^2 + y^4 EXAMPLE: A union of curves is a curve. @@ -133,7 +133,7 @@ def Curve(F, A=None): sage: C = Curve(x^3 + y^3 + z^3) sage: D = Curve(x^4 + y^4 + z^4) sage: C.union(D) - Projective Curve over Rational Field defined by + Projective Plane Curve over Rational Field defined by x^7 + x^4*y^3 + x^3*y^4 + y^7 + x^4*z^3 + y^4*z^3 + x^3*z^4 + y^3*z^4 + z^7 The intersection is not a curve, though it is a scheme. @@ -203,24 +203,24 @@ def Curve(F, A=None): raise TypeError("F (=%s) must consist of a single nonconstant polynomial to define a plane curve"%(F,)) if is_AffineSpace(A): if n > 2: - return AffineSpaceCurve_generic(A, F) + return AffineCurve(A, F) k = A.base_ring() if is_FiniteField(k): if k.is_prime_field(): - return AffineCurve_prime_finite_field(A, F[0]) - return AffineCurve_finite_field(A, F[0]) - return AffineCurve_generic(A, F[0]) + return AffinePlaneCurve_prime_finite_field(A, F[0]) + return AffinePlaneCurve_finite_field(A, F[0]) + return AffinePlaneCurve(A, F[0]) elif is_ProjectiveSpace(A): if not all([f.is_homogeneous() for f in F]): raise TypeError("polynomials defining a curve in a projective space must be homogeneous") if n > 2: - return ProjectiveSpaceCurve_generic(A, F) + return ProjectiveCurve(A, F) k = A.base_ring() if is_FiniteField(k): if k.is_prime_field(): - return ProjectiveCurve_prime_finite_field(A, F[0]) - return ProjectiveCurve_finite_field(A, F[0]) - return ProjectiveCurve_generic(A, F[0]) + return ProjectivePlaneCurve_prime_finite_field(A, F[0]) + return ProjectivePlaneCurve_finite_field(A, F[0]) + return ProjectivePlaneCurve(A, F[0]) if is_AlgebraicScheme(F): return Curve(F.defining_polynomials(), F.ambient_space()) diff --git a/src/sage/schemes/curves/curve.py b/src/sage/schemes/curves/curve.py index 0e0e89e0ea8..3d2347df9c5 100644 --- a/src/sage/schemes/curves/curve.py +++ b/src/sage/schemes/curves/curve.py @@ -1,5 +1,5 @@ """ -Generic plane curves +Generic plane curves. """ from sage.misc.all import latex @@ -13,6 +13,8 @@ class Curve_generic(AlgebraicScheme_subscheme): r""" + Generic curve class. + EXAMPLES:: sage: A. = AffineSpace(QQ,3) @@ -23,26 +25,41 @@ class Curve_generic(AlgebraicScheme_subscheme): def _repr_(self): """ + Return a string representation of this curve. + EXAMPLES:: sage: A. = AffineSpace(QQ,3) sage: C = Curve([x-y,z-2]) sage: C - Affine Space Curve over Rational Field defined by x - y, z - 2 + Affine Curve over Rational Field defined by x - y, z - 2 sage: P. = ProjectiveSpace(QQ,2) sage: C = Curve(x-y) sage: C - Projective Curve over Rational Field defined by x - y + Projective Plane Curve over Rational Field defined by x - y """ return "%s Curve over %s defined by %s"%( self._repr_type(), self.base_ring(), ', '.join([str(x) for x in self.defining_polynomials()])) def _repr_type(self): + r""" + Return a string representation of the type of this curve. + + EXAMPLES:: + + sage: P. = ProjectiveSpace(QQ, 3) + sage: C = Curve([w^3 - z^3, w*x - x^2]) + sage: from sage.schemes.curves.curve import Curve_generic + sage: Curve_generic._repr_type(C) + 'Generic' + """ return "Generic" def _latex_(self): """ + Return a latex representation of this curve. + EXAMPLES:: sage: x,y,z = PolynomialRing(QQ, 3, names='x,y,z').gens() diff --git a/src/sage/schemes/curves/projective_curve.py b/src/sage/schemes/curves/projective_curve.py index f3f504e67e3..4ed8d1e439e 100644 --- a/src/sage/schemes/curves/projective_curve.py +++ b/src/sage/schemes/curves/projective_curve.py @@ -1,5 +1,19 @@ """ -Projective plane curves over a general ring +Projective curves over fields. + +EXAMPLES: + +We can construct curves in either a projective plane:: + + sage: P. = ProjectiveSpace(QQ, 2) + sage: C = Curve([y*z^2 - x^3], P); C + Projective Plane Curve over Rational Field defined by -x^3 + y*z^2 + +or in higher dimensional projective spaces:: + + sage: P. = ProjectiveSpace(QQ, 3) + sage: C = Curve([y*w^3 - x^4, z*w^3 - x^4], P); C + Projective Curve over Rational Field defined by -x^4 + y*w^3, -x^4 + z*w^3 AUTHORS: @@ -33,9 +47,37 @@ class ProjectiveCurve(Curve_generic, AlgebraicScheme_subscheme_projective): def _repr_type(self): - return "Projective Space" + r""" + Return a string representation of the type of this curve. + + EXAMPLES:: + + sage: P. = ProjectiveSpace(QQ, 3) + sage: C = Curve([y^3 - z^3 - w^3, z*x^3 - y^4]) + sage: C._repr_type() + 'Projective' + """ + return "Projective" def __init__(self, A, X): + r""" + Initialization function. + + EXMAPLES:: + + sage: P. = ProjectiveSpace(GF(7), 4) + sage: C = Curve([y*u^2 - x^3, z*u^2 - x^3, w*u^2 - x^3, y^3 - x^3], P); C + Projective Curve over Finite Field of size 7 defined by -x^3 + y*u^2, + -x^3 + z*u^2, -x^3 + w*u^2, -x^3 + y^3 + + :: + + sage: K. = CyclotomicField(11) + sage: P. = ProjectiveSpace(K, 3) + sage: C = Curve([y*w - u*z^2 - x^2, x*w - 3*u^2*z*w], P); C + Projective Curve over Cyclotomic Field of order 11 and degree 10 defined + by -x^2 + (-u)*z^2 + y*w, x*w + (-3*u^2)*z*w + """ if not is_ProjectiveSpace(A): raise TypeError("A (=%s) must be a projective space"%A) Curve_generic.__init__(self, A, X) @@ -45,12 +87,38 @@ def __init__(self, A, X): class ProjectivePlaneCurve(ProjectiveCurve): def __init__(self, A, f): + r""" + Initialization function. + + EXAMPLES:: + + sage: P. = ProjectiveSpace(QQbar, 2) + sage: C = Curve([y*z - x^2 - QQbar.gen()*z^2], P); C + Projective Plane Curve over Algebraic Field defined by + -x^2 + y*z + (-I)*z^2 + + :: + + sage: P. = ProjectiveSpace(GF(5^2, 'v'), 2) + sage: C = Curve([y^2*z - x*z^2 - z^3], P); C + Projective Plane Curve over Finite Field in v of size 5^2 defined by y^2*z - x*z^2 - z^3 + """ if not (is_ProjectiveSpace(A) and A.dimension != 2): raise TypeError("Argument A (= %s) must be a projective plane."%A) Curve_generic.__init__(self, A, [f]) def _repr_type(self): - return "Projective" + r""" + Return a string representation of the type of this curve. + + EXAMPLES:: + + sage: P. = ProjectiveSpace(QQ, 2) + sage: C = Curve([y*z^3 - 5/7*x^4 + 4*x^3*z - 9*z^4], P) + sage: C._repr_type() + 'Projective Plane' + """ + return "Projective Plane" def arithmetic_genus(self): r""" @@ -65,7 +133,7 @@ def arithmetic_genus(self): sage: x,y,z = PolynomialRing(GF(5), 3, 'xyz').gens() sage: C = Curve(y^2*z^7 - x^9 - x*z^8); C - Projective Curve over Finite Field of size 5 defined by -x^9 + y^2*z^7 - x*z^8 + Projective Plane Curve over Finite Field of size 5 defined by -x^9 + y^2*z^7 - x*z^8 sage: C.arithmetic_genus() 28 sage: C.genus() @@ -514,7 +582,7 @@ def _points_via_singular(self, sort=True): sage: x, y, z = PolynomialRing(GF(5), 3, 'xyz').gens() sage: f = y^2*z^7 - x^9 - x*z^8 sage: C = Curve(f); C - Projective Curve over Finite Field of size 5 defined by + Projective Plane Curve over Finite Field of size 5 defined by -x^9 + y^2*z^7 - x*z^8 sage: C._points_via_singular() [(0 : 0 : 1), (0 : 1 : 0), (2 : 2 : 1), (2 : 3 : 1), @@ -663,7 +731,7 @@ def rational_points(self, algorithm="enum", sort=True): sage: x, y, z = PolynomialRing(GF(5), 3, 'xyz').gens() sage: f = y^2*z^7 - x^9 - x*z^8 sage: C = Curve(f); C - Projective Curve over Finite Field of size 5 defined by + Projective Plane Curve over Finite Field of size 5 defined by -x^9 + y^2*z^7 - x*z^8 sage: C.rational_points() [(0 : 0 : 1), (0 : 1 : 0), (2 : 2 : 1), (2 : 3 : 1), @@ -736,4 +804,3 @@ def Hasse_bounds(q, genus=1): else: rq = (4*(genus**2)*q).isqrt() return (q+1-rq,q+1+rq) - diff --git a/src/sage/schemes/elliptic_curves/jacobian.py b/src/sage/schemes/elliptic_curves/jacobian.py index c40157d565e..cf406febd1c 100644 --- a/src/sage/schemes/elliptic_curves/jacobian.py +++ b/src/sage/schemes/elliptic_curves/jacobian.py @@ -192,7 +192,7 @@ def Jacobian_of_equation(polynomial, variables=None, curve=None): sage: h = Jacobian(f, curve=Curve(f)); h Scheme morphism: - From: Projective Curve over Rational Field defined by a^3 + b^3 + 60*c^3 + From: Projective Plane Curve over Rational Field defined by a^3 + b^3 + 60*c^3 To: Elliptic Curve defined by y^2 = x^3 - 24300 over Rational Field Defn: Defined on coordinates by sending (a : b : c) to (-216000*a^4*b^4*c - 12960000*a^4*b*c^4 - 12960000*a*b^4*c^4 : diff --git a/src/sage/schemes/generic/divisor.py b/src/sage/schemes/generic/divisor.py index 6457dcde5a5..5a30726a5f2 100644 --- a/src/sage/schemes/generic/divisor.py +++ b/src/sage/schemes/generic/divisor.py @@ -230,7 +230,7 @@ def scheme(self): sage: D = C.divisor(pts[0])*3 - C.divisor(pts[1]); D 3*(x, y) - (x - 2, y - 2) sage: D.scheme() - Affine Curve over Finite Field of size 5 defined by -x^9 + y^2 - x + Affine Plane Curve over Finite Field of size 5 defined by -x^9 + y^2 - x """ return self.parent().scheme() diff --git a/src/sage/schemes/generic/scheme.py b/src/sage/schemes/generic/scheme.py index aa15ecaf8c6..1eac63f2f48 100644 --- a/src/sage/schemes/generic/scheme.py +++ b/src/sage/schemes/generic/scheme.py @@ -1167,7 +1167,7 @@ def hom(self, x, Y=None): sage: A1.hom([2,r],A1_emb) Scheme morphism: From: Affine Space of dimension 1 over Rational Field - To: Affine Curve over Rational Field defined by p - 2 + To: Affine Plane Curve over Rational Field defined by p - 2 Defn: Defined on coordinates by sending (r) to (2, r) """ diff --git a/src/sage/schemes/jacobians/abstract_jacobian.py b/src/sage/schemes/jacobians/abstract_jacobian.py index 6393003edb5..03aa337c0f1 100644 --- a/src/sage/schemes/jacobians/abstract_jacobian.py +++ b/src/sage/schemes/jacobians/abstract_jacobian.py @@ -41,7 +41,7 @@ def Jacobian(C): sage: P2. = ProjectiveSpace(QQ, 2) sage: C = Curve(x^3 + y^3 + z^3) sage: Jacobian(C) - Jacobian of Projective Curve over Rational Field defined by x^3 + y^3 + z^3 + Jacobian of Projective Plane Curve over Rational Field defined by x^3 + y^3 + z^3 """ try: return C.jacobian() @@ -60,7 +60,7 @@ class Jacobian_generic(Scheme): sage: P2. = ProjectiveSpace(QQ, 2) sage: C = Curve(x^3 + y^3 + z^3) sage: J = Jacobian(C); J - Jacobian of Projective Curve over Rational Field defined by x^3 + y^3 + z^3 + Jacobian of Projective Plane Curve over Rational Field defined by x^3 + y^3 + z^3 """ def __init__(self, C): """ @@ -70,7 +70,7 @@ def __init__(self, C): sage: P2. = ProjectiveSpace(QQ, 2) sage: C = Curve(x^3 + y^3 + z^3) sage: J = Jacobian_generic(C); J - Jacobian of Projective Curve over Rational Field defined by x^3 + y^3 + z^3 + Jacobian of Projective Plane Curve over Rational Field defined by x^3 + y^3 + z^3 sage: type(J) @@ -99,7 +99,7 @@ def __init__(self, C): sage: Jacobian_generic(C) Traceback (most recent call last): ... - TypeError: C (=Projective Curve over Ring of integers modulo 6 defined by x + y + z) must be defined over a field. + TypeError: C (=Projective Plane Curve over Ring of integers modulo 6 defined by x + y + z) must be defined over a field. """ if not is_Scheme(C): raise TypeError("Argument (=%s) must be a scheme."%C) @@ -145,9 +145,9 @@ def _repr_(self): sage: from sage.schemes.jacobians.abstract_jacobian import Jacobian sage: P2. = ProjectiveSpace(QQ, 2) sage: J = Jacobian(Curve(x^3 + y^3 + z^3)); J - Jacobian of Projective Curve over Rational Field defined by x^3 + y^3 + z^3 + Jacobian of Projective Plane Curve over Rational Field defined by x^3 + y^3 + z^3 sage: J._repr_() - 'Jacobian of Projective Curve over Rational Field defined by x^3 + y^3 + z^3' + 'Jacobian of Projective Plane Curve over Rational Field defined by x^3 + y^3 + z^3' """ return "Jacobian of %s"%self.__curve @@ -182,7 +182,7 @@ def curve(self): sage: P2. = ProjectiveSpace(QQ, 2) sage: J = Jacobian(Curve(x^3 + y^3 + z^3)) sage: J.curve() - Projective Curve over Rational Field defined by x^3 + y^3 + z^3 + Projective Plane Curve over Rational Field defined by x^3 + y^3 + z^3 """ return self.__curve diff --git a/src/sage/schemes/projective/projective_morphism.py b/src/sage/schemes/projective/projective_morphism.py index a937db73351..be345484efa 100644 --- a/src/sage/schemes/projective/projective_morphism.py +++ b/src/sage/schemes/projective/projective_morphism.py @@ -108,8 +108,8 @@ class SchemeMorphism_polynomial_projective_space(SchemeMorphism_polynomial): sage: H = C.Hom(E) sage: H([zbar,xbar-ybar,-(xbar+ybar)/80]) Scheme morphism: - From: Projective Curve over Rational Field defined by x^3 + y^3 + 60*z^3 - To: Projective Curve over Rational Field defined by -x^3 + y^2*z + 6400/3*z^3 + From: Projective Plane Curve over Rational Field defined by x^3 + y^3 + 60*z^3 + To: Projective Plane Curve over Rational Field defined by -x^3 + y^2*z + 6400/3*z^3 Defn: Defined on coordinates by sending (x : y : z) to (z : x - y : -1/80*x - 1/80*y) diff --git a/src/sage/schemes/projective/projective_space.py b/src/sage/schemes/projective/projective_space.py index 8c3840fce0f..068f20fa5ce 100644 --- a/src/sage/schemes/projective/projective_space.py +++ b/src/sage/schemes/projective/projective_space.py @@ -1249,9 +1249,9 @@ def curve(self,F): sage: P. = ProjectiveSpace(QQ, 2) sage: P.curve([y^2 - x*z]) - Projective Curve over Rational Field defined by y^2 - x*z + Projective Plane Curve over Rational Field defined by y^2 - x*z """ - from sage.schemes.plane_curves.constructor import Curve + from sage.schemes.curves.constructor import Curve return Curve(F, self) class ProjectiveSpace_finite_field(ProjectiveSpace_field):