Basics
Creation
elliptic_curve — Function
elliptic_curve([K::Field], x::Vector; check::Bool = true) -> EllipticCurveConstruct an elliptic curve with Weierstrass equation specified by the coefficients in x, which must have either length 2 or 5.
Per default, it is checked whether the discriminant is non-zero. This can be disabled by setting check = false.
Examples
julia> elliptic_curve(QQ, [1, 2, 3, 4, 5])
Elliptic curve
over rational field
with equation
y^2 + x*y + 3*y = x^3 + 2*x^2 + 4*x + 5
julia> elliptic_curve(GF(3), [1, 1])
Elliptic curve
over prime field of characteristic 3
with equation
y^2 = x^3 + x + 1sourceelliptic_curve_from_j_invariant — Function
elliptic_curve_from_j_invariant(j::FieldElem) -> EllipticCurveReturn an elliptic curve with the given $j$-invariant.
Examples
julia> K = GF(3)
Prime field of characteristic 3
julia> elliptic_curve_from_j_invariant(K(2))
Elliptic curve
over prime field of characteristic 3
with equation
y^2 + x*y = x^3 + 1sourceBasic properties
base_field — Method
base_change — Method
base_change(K::Field, E::EllipticCurve) -> EllipticCurveReturn the base change of the elliptic curve $E$ over $K$ if coercion is possible.
sourcebase_change — Method
base_change(f, E::EllipticCurve) -> EllipticCurveReturn the base change of the elliptic curve $E$ using the map $f$.
sourcecoefficients — Method
coefficients(E::EllipticCurve{T}) -> Tuple{T, T, T, T, T}Return the Weierstrass coefficients of $E$ as a tuple (a1, a2, a3, a4, a6) such that $E$ is given by y^2 + a1xy + a3y = x^3 + a2x^2 + a4x + a6.
sourcea_invariants — Method
a_invariants(E::EllipticCurve{T}) -> Tuple{T, T, T, T, T}Return the Weierstrass coefficients of $E$ as a tuple $(a_1, a_2, a_3, a_4, a_6)$ such that $E$ is given by $y^2 + a_1xy + a_3y = x^3 + a_2x^2 + a_4x + a_6$.
sourceb_invariants — Method
b_invariants(E::EllipticCurve{T}) -> Tuple{T, T, T, T}Return the b-invariants of $E$ as a tuple $(b_2, b_4, b_6, b_8)$.
sourcec_invariants — Method
c_invariants(E::EllipticCurve{T}) -> Tuple{T, T}Return the c-invariants of $E as a tuple $(c_4, c_6)$.
sourcediscriminant — Method
j_invariant — Method
equation — Method
equation([R::MPolyRing,] E::EllipticCurve) -> MPolyRingElemReturn the equation defining the elliptic curve $E$ as a bivariate polynomial. If the polynomial ring $R$ is specified, it must by a bivariate polynomial ring.
Examples
julia> E = elliptic_curve(QQ, [1, 2, 3, 4, 5]);
julia> equation(E)
-x^3 - 2*x^2 + x*y - 4*x + y^2 + 3*y - 5sourcehyperelliptic_polynomials — Method
hyperelliptic_polynomials([R::PolyRing,] E::EllipticCurve) -> PolyRingElem, PolyRingElemReturn univariate polynomials $f, h$ such that $E$ is given by $y^2 + h*y = f$.
Examples
julia> E = elliptic_curve(QQ, [1, 2, 3, 4, 5]);
julia> hyperelliptic_polynomials(E)
(x^3 + 2*x^2 + 4*x + 5, x + 3)sourcePoints
(E::EllipticCurve)(coords::Vector; check::Bool = true)Return the point $P$ of $E$ with coordinates specified by coords, which can be either affine coordinates (length(coords) == 2) or projective coordinates (length(coords) == 3).
Per default, it is checked whether the point lies on $E$. This can be disabled by setting check = false.
Examples
julia> E = elliptic_curve(QQ, [1, 2]);
julia> E([1, -2])
(1 : -2 : 1)
julia> E([2, -4, 2])
(1 : -2 : 1)is_on_curve — Method
is_on_curve(E::EllipticCurve, coords::Vector) -> BoolReturn true if coords defines a point on $E$ and false otherwise. The array coords must have length 2.
Examples
julia> E = elliptic_curve(QQ, [1, 2]);
julia> is_on_curve(E, [1, -2])
true
julia> is_on_curve(E, [1, -1])
falsesourcedivision_points — Method
division_points(P::EllipticCurvePoint, m::Int) -> EllipticCurvePointCompute the set of points $Q$ defined over the base field such that $mQ = P$. Returns the empty list if no such points exist.
Examples
julia> E = elliptic_curve(QQ, [1, 2]);
julia> division_points(infinity(E), 2)
2-element Vector{EllipticCurvePoint{QQFieldElem}}:
(0 : 1 : 0)
(-1 : 0 : 1)source