Weighted projective curves¶
Weighted projective curves in Sage are curves in a weighted projective space or a weighted projective plane.
EXAMPLES:
For now, only curves in weighted projective plane is supported:
sage: WP.<x, y, z> = WeightedProjectiveSpace([1, 3, 1], QQ)
sage: C1 = WP.curve(y^2 - x^5 * z - 3 * x^2 * z^4 - 2 * z^6); C1
Weighted Projective Curve over Rational Field defined by y^2 - x^5*z - 3*x^2*z^4 - 2*z^6
sage: C2 = Curve(y^2 - x^5 * z - 3 * x^2 * z^4 - 2 * z^6, WP); C2
Weighted Projective Curve over Rational Field defined by y^2 - x^5*z - 3*x^2*z^4 - 2*z^6
sage: C1 == C2
True
>>> from sage.all import *
>>> WP = WeightedProjectiveSpace([Integer(1), Integer(3), Integer(1)], QQ, names=('x', 'y', 'z',)); (x, y, z,) = WP._first_ngens(3)
>>> C1 = WP.curve(y**Integer(2) - x**Integer(5) * z - Integer(3) * x**Integer(2) * z**Integer(4) - Integer(2) * z**Integer(6)); C1
Weighted Projective Curve over Rational Field defined by y^2 - x^5*z - 3*x^2*z^4 - 2*z^6
>>> C2 = Curve(y**Integer(2) - x**Integer(5) * z - Integer(3) * x**Integer(2) * z**Integer(4) - Integer(2) * z**Integer(6), WP); C2
Weighted Projective Curve over Rational Field defined by y^2 - x^5*z - 3*x^2*z^4 - 2*z^6
>>> C1 == C2
True
AUTHORS:
Gareth Ma (2025)
- class sage.schemes.curves.weighted_projective_curve.WeightedProjectiveCurve(A, X, *kwargs)[source]¶
Bases:
Curve_genericCurves in weighted projective spaces.
EXAMPLES:
We construct a hyperelliptic curve manually:
sage: WP.<x, y, z> = WeightedProjectiveSpace([1, 3, 1], QQ) sage: C = Curve(y^2 - x^5 * z - 3 * x^2 * z^4 - 2 * z^6, WP); C Weighted Projective Curve over Rational Field defined by y^2 - x^5*z - 3*x^2*z^4 - 2*z^6
>>> from sage.all import * >>> WP = WeightedProjectiveSpace([Integer(1), Integer(3), Integer(1)], QQ, names=('x', 'y', 'z',)); (x, y, z,) = WP._first_ngens(3) >>> C = Curve(y**Integer(2) - x**Integer(5) * z - Integer(3) * x**Integer(2) * z**Integer(4) - Integer(2) * z**Integer(6), WP); C Weighted Projective Curve over Rational Field defined by y^2 - x^5*z - 3*x^2*z^4 - 2*z^6
- affine_patch(i, AA=None)[source]¶
Return the \(i\)-th affine patch of this projective curve.
INPUT:
i– affine coordinate chart of the projective ambient space of this curve to compute affine patch with respect toAA– (default:None) ambient affine space, this is constructed if it is not given
OUTPUT: a curve in affine space
EXAMPLES:
sage: WP.<x,y,z> = WeightedProjectiveSpace([1, 1, 1], QQ) sage: C = WP.curve(x^3 - x^2*y + y^3 - x^2*z) sage: C.affine_patch(1) Affine Plane Curve over Rational Field defined by x^3 - x^2*z - x^2 + 1
>>> from sage.all import * >>> WP = WeightedProjectiveSpace([Integer(1), Integer(1), Integer(1)], QQ, names=('x', 'y', 'z',)); (x, y, z,) = WP._first_ngens(3) >>> C = WP.curve(x**Integer(3) - x**Integer(2)*y + y**Integer(3) - x**Integer(2)*z) >>> C.affine_patch(Integer(1)) Affine Plane Curve over Rational Field defined by x^3 - x^2*z - x^2 + 1
- plot(*args, **kwds)[source]¶
Plot the real points of an affine patch of the associated projective plane curve.
INPUT:
self– an affine plane curvepatch– (optional) the affine patch to be plotted; if not specified, the patch corresponding to the last projective coordinate being nonzero*args– (optional) tuples (variable, minimum, maximum) for plotting dimensions**kwds– optional keyword arguments passed on toimplicit_plot
EXAMPLES:
A hyperelliptic curve:
sage: # needs sage.plot sage: P.<x> = QQ[] sage: f = 4*x^5 - 30*x^3 + 45*x - 22 sage: C = HyperellipticCurve(f) sage: C.plot() Graphics object consisting of 1 graphics primitive sage: C.plot(patch=0) Graphics object consisting of 1 graphics primitive sage: C.plot(patch=1) Graphics object consisting of 1 graphics primitive
>>> from sage.all import * >>> # needs sage.plot >>> P = QQ['x']; (x,) = P._first_ngens(1) >>> f = Integer(4)*x**Integer(5) - Integer(30)*x**Integer(3) + Integer(45)*x - Integer(22) >>> C = HyperellipticCurve(f) >>> C.plot() Graphics object consisting of 1 graphics primitive >>> C.plot(patch=Integer(0)) Graphics object consisting of 1 graphics primitive >>> C.plot(patch=Integer(1)) Graphics object consisting of 1 graphics primitive
- projective_curve()[source]¶
Return this weighted projective curve as a projective curve.
A weighted homogeneous polynomial \(f(x_1, \ldots, x_n)\), where \(x_i\) has weight \(w_i\), can be viewed as an unweighted homogeneous polynomial \(f(y_1^{w_1}, \ldots, y_n^{w_n})\). This correspondence extends to varieties.
EXAMPLES:
sage: WP = WeightedProjectiveSpace([1, 3, 1], QQ, "x, y, z") sage: x, y, z = WP.gens() sage: C = WP.curve(y^2 - (x^5*z + 3*x^2*z^4 - 2*x*z^5 + 4*z^6)); C Weighted Projective Curve over Rational Field defined by y^2 - x^5*z - 3*x^2*z^4 + 2*x*z^5 - 4*z^6 sage: C.projective_curve() Projective Plane Curve over Rational Field defined by y^6 - x^5*z - 3*x^2*z^4 + 2*x*z^5 - 4*z^6
>>> from sage.all import * >>> WP = WeightedProjectiveSpace([Integer(1), Integer(3), Integer(1)], QQ, "x, y, z") >>> x, y, z = WP.gens() >>> C = WP.curve(y**Integer(2) - (x**Integer(5)*z + Integer(3)*x**Integer(2)*z**Integer(4) - Integer(2)*x*z**Integer(5) + Integer(4)*z**Integer(6))); C Weighted Projective Curve over Rational Field defined by y^2 - x^5*z - 3*x^2*z^4 + 2*x*z^5 - 4*z^6 >>> C.projective_curve() Projective Plane Curve over Rational Field defined by y^6 - x^5*z - 3*x^2*z^4 + 2*x*z^5 - 4*z^6
- riemann_surface(**kwargs)[source]¶
Return the complex Riemann surface determined by this curve.
OUTPUT: a
RiemannSurfaceobjectEXAMPLES:
sage: WP.<x,y,z> = WeightedProjectiveSpace([1, 1, 1], QQ) sage: C = WP.curve(x^3 + 3*y^3 + 5*z^3) sage: C.riemann_surface() Riemann surface defined by polynomial f = x^3 + 3*y^3 + 5 = 0, with 53 bits of precision
>>> from sage.all import * >>> WP = WeightedProjectiveSpace([Integer(1), Integer(1), Integer(1)], QQ, names=('x', 'y', 'z',)); (x, y, z,) = WP._first_ngens(3) >>> C = WP.curve(x**Integer(3) + Integer(3)*y**Integer(3) + Integer(5)*z**Integer(3)) >>> C.riemann_surface() Riemann surface defined by polynomial f = x^3 + 3*y^3 + 5 = 0, with 53 bits of precision