Skip to content

Commit 2d16a83

Browse files
committed
Add doctest
1 parent 6202836 commit 2d16a83

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/sage/schemes/hyperelliptic_curves/constructor.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,21 @@ def _parse_multivariate_defining_equation(g):
3636
or a constant multiple of that.
3737
3838
OUTPUT: tuple (f, h), each of them given as a list of coefficients.
39+
40+
TESTS::
41+
42+
sage: from sage.schemes.hyperelliptic_curves.constructor import _parse_multivariate_defining_equation
43+
sage: R.<x,y> = QQ[]
44+
sage: _parse_multivariate_defining_equation(y^2 + 3*x^2*y - (x^5 + x + 1))
45+
([1, 1, 0, 0, 0, 1], [0, 0, 3])
46+
sage: _parse_multivariate_defining_equation(2*y^2 + 3*x^2*y - (x^5 + x + 1))
47+
([1/2, 1/2, 0, 0, 0, 1/2], [0, 0, 3/2])
48+
49+
The variable names are arbitrary::
50+
51+
sage: S.<z,t> = GF(13)[]
52+
sage: _parse_multivariate_defining_equation(2*t^2 + 3*z^2*t - (z^5 + z + 1))
53+
([7, 7, 0, 0, 0, 7], [0, 0, 8])
3954
"""
4055
from sage.rings.polynomial.multi_polynomial import MPolynomial
4156
if not isinstance(g, MPolynomial):

0 commit comments

Comments
 (0)