Basics

Creation

elliptic_curveFunction
elliptic_curve([K::Field], x::Vector; check::Bool = true) -> EllipticCurve

Construct 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 + 1
source
elliptic_curve_from_j_invariantFunction
elliptic_curve_from_j_invariant(j::FieldElem) -> EllipticCurve

Return an elliptic curve with the given jj-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 + 1
source

Basic properties

base_fieldMethod
base_field(E::EllipticCurve) -> Field

Return the base field over which E is defined.

source
base_field(C::HypellCrv) -> Field

Return the base field over which C is defined.

source
base_changeMethod
base_change(K::Field, E::EllipticCurve) -> EllipticCurve

Return the base change of the elliptic curve EE over KK if coercion is possible.

source
base_changeMethod
base_change(f, E::EllipticCurve) -> EllipticCurve

Return the base change of the elliptic curve EE using the map ff.

source
coefficientsMethod
coefficients(E::EllipticCurve{T}) -> Tuple{T, T, T, T, T}

Return the Weierstrass coefficients of EE as a tuple (a1, a2, a3, a4, a6) such that EE is given by y^2 + a1xy + a3y = x^3 + a2x^2 + a4x + a6.

source
a_invariantsMethod
a_invariants(E::EllipticCurve{T}) -> Tuple{T, T, T, T, T}

Return the Weierstrass coefficients of EE as a tuple (a1,a2,a3,a4,a6)(a_1, a_2, a_3, a_4, a_6) such that EE is given by y2+a1xy+a3y=x3+a2x2+a4x+a6y^2 + a_1xy + a_3y = x^3 + a_2x^2 + a_4x + a_6.

source
b_invariantsMethod
b_invariants(E::EllipticCurve{T}) -> Tuple{T, T, T, T}

Return the b-invariants of EE as a tuple (b2,b4,b6,b8)(b_2, b_4, b_6, b_8).

source
c_invariantsMethod
c_invariants(E::EllipticCurve{T}) -> Tuple{T, T}

Return the c-invariants of EasatupleE as a tuple (c_4, c_6)$.

source
discriminantMethod
discriminant(E::EllipticCurve) -> FieldElem

Return the discriminant of EE.

source
discriminant(C::HypellCrv{T}) -> T

Compute the discriminant of CC.

source
discriminant(O::AlgssRelOrd)

Returns the discriminant of OO.

source
j_invariantMethod
j_invariant(E::EllipticCurve) -> FieldElem

Compute the j-invariant of EE.

source
equationMethod
equation([R::MPolyRing,] E::EllipticCurve) -> MPolyRingElem

Return the equation defining the elliptic curve EE as a bivariate polynomial. If the polynomial ring RR 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 - 5
source
hyperelliptic_polynomialsMethod
hyperelliptic_polynomials([R::PolyRing,] E::EllipticCurve) -> PolyRingElem, PolyRingElem

Return univariate polynomials f,hf, h such that EE is given by y2+hy=fy^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)
source

Points

    (E::EllipticCurve)(coords::Vector; check::Bool = true)

Return the point PP of EE 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 EE. 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)
infinityMethod
infinity(E::EllipticCurve) -> EllipticCurvePoint

Return the point at infinity with project coordinates [0:1:0][0 : 1 : 0].

source
parentMethod
parent(P::EllipticCurvePoint) -> EllipticCurve

Return the elliptic curve on which PP lies.

Examples

julia> E = elliptic_curve(QQ, [1, 2]);

julia> P = E([1, -2]);

julia> E == parent(P)
true
source
is_on_curveMethod
is_on_curve(E::EllipticCurve, coords::Vector) -> Bool

Return true if coords defines a point on EE 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])
false
source
+Method
+(P::EllipticCurvePoint, Q::EllipticCurvePoint) -> EllipticCurvePoint

Add two points on an elliptic curve.

Examples

julia> E = elliptic_curve(QQ, [1, 2]);

julia> P = E([1, -2]);

julia> P + P
(-1 : 0 : 1)
source
division_pointsMethod
division_points(P::EllipticCurvePoint, m::Int) -> EllipticCurvePoint

Compute the set of points QQ defined over the base field such that mQ=PmQ = 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