numthy · EllipticCurve¶
16 accepted declarations. Python and Rust forms, contracts, evidence, failure boundaries, and checked usages are kept together below.
Worked example¶
The complete checked program Reproduce Fisher's order-five elliptic-function normalization uses this API directly.
# SPDX-License-Identifier: MIT
# Copyright (c) 2026 Benjamin Antieau and Deven Manam
"""Reproduce Fisher's order-five elliptic-function normalization."""
from noether import Q
from noether.commalg import RationalFunctionField, WeilDivisor
from noether.numthy import EllipticCurve, NthPowerClassGroup
def main() -> None:
coefficients = RationalFunctionField(Q, "lambda")
parameter = coefficients.generator()
curve = EllipticCurve(
coefficients,
[1 - parameter, -parameter, -parameter, 0, 0],
)
point = curve.point(0, 0)
point.verify_exact_order(5)
miller = curve.miller_function(point, 5)
divisor = WeilDivisor(
curve.underlying_curve,
[
(curve.origin().underlying_curve_point.as_closed_point(), 5),
(point.underlying_curve_point.as_closed_point(), -5),
],
)
function = divisor.riemann_roch_space().basis[0]
assert (function / miller.function).as_constant() is not None
evaluation_at_two = function.evaluate_at((2 * point).underlying_curve_point)
evaluation_at_four = function.evaluate_at((4 * point).underlying_curve_point)
assert evaluation_at_two.value is not None
assert evaluation_at_four.value is not None
classes = NthPowerClassGroup(coefficients, 5)
normalization = classes.class_of(evaluation_at_two.value) ** -2 * classes.class_of(
evaluation_at_four.value
)
assert normalization.is_identity()
print("order 5 verified; Riemann--Roch and Miller agree; normalization is trivial")
if __name__ == "__main__":
main()
Run it with .venv/bin/python examples/26_elliptic_descent_functions.py.
numthy.EllipticCurve¶
A nonsingular generalized Weierstrass elliptic curve.
noether::numthy::EllipticCurve · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core |
| GIL | attached / bounded |
| Semantic ID | noether/numthy/EllipticCurve@1 |
Executable usage: examples/26_elliptic_descent_functions.py:13 · examples/26_elliptic_descent_functions.py:7 · validation/unit/infra/test_public_api_index.py:180 · validation/unit/numthy/test_elliptic_curve_facade.py:19 · validation/unit/numthy/test_elliptic_curve_facade.py:26 · validation/unit/numthy/test_elliptic_curve_facade.py:34
numthy.EllipticCurve.base¶
Return the base recorded by this EllipticCurve.
Detailed contract
Exact base field context.
noether::numthy::EllipticCurve::base · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core |
| GIL | attached / bounded |
| Semantic ID | noether/numthy/EllipticCurve@1 |
Executable usage: validation/unit/commalg/test_acceptance_workload.py:59 · validation/unit/commalg/test_acceptance_workload.py:60 · validation/unit/commalg/test_base_change.py:112 · validation/unit/commalg/test_base_change.py:113 · validation/unit/commalg/test_polynomial_ideal_facade.py:398 · validation/unit/commalg/test_polynomial_ideal_facade.py:399
numthy.EllipticCurve.coefficients¶
Return the coefficients recorded by this EllipticCurve.
Detailed contract
Coefficients (a1,a2,a3,a4,a6).
noether::numthy::EllipticCurve::coefficients · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core |
| GIL | attached / bounded |
| Semantic ID | noether/numthy/EllipticCurve@1 |
Executable usage: examples/26_elliptic_descent_functions.py:11 · examples/26_elliptic_descent_functions.py:12 · examples/26_elliptic_descent_functions.py:14 · examples/26_elliptic_descent_functions.py:35 · examples/31_local_fields_and_precision.py:11 · examples/31_local_fields_and_precision.py:12
numthy.EllipticCurve.contains¶
Compute contains for this EllipticCurve.
Detailed contract
Whether a checked point belongs to this exact elliptic context.
noether::numthy::EllipticCurve::contains · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core |
| GIL | attached / bounded |
| Semantic ID | noether/numthy/EllipticCurve@1 |
Executable usage: examples/38_exact_linear_systems.py:73 · validation/unit/commalg/test_local_algebra.py:63 · validation/unit/commalg/test_prime_localization.py:50 · validation/unit/commalg/test_prime_localization.py:55 · validation/unit/groups/test_acceptance_workload.py:56 · validation/unit/groups/test_permutation_group_facade.py:81
numthy.EllipticCurve.discriminant¶
Return the discriminant recorded by this EllipticCurve.
Detailed contract
Exact nonzero Weierstrass discriminant.
noether::numthy::EllipticCurve::discriminant · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core |
| GIL | attached / bounded |
| Semantic ID | noether/numthy/EllipticCurve@1 |
Executable usage: examples/31_local_fields_and_precision.py:37 · validation/unit/numthy/test_acceptance_workload.py:53 · validation/unit/numthy/test_number_field_facade.py:101 · validation/unit/numthy/test_number_field_facade.py:126 · validation/unit/numthy/test_number_field_facade.py:143 · validation/unit/numthy/test_number_field_facade.py:144
numthy.EllipticCurve.from_json¶
Deserialize and revalidate a EllipticCurve from typed JSON.
Detailed contract
Restore the coefficient context and recheck nonsingularity.
noether::numthy::EllipticCurve::from_json · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core |
| GIL | attached / bounded |
| Semantic ID | noether/numthy/EllipticCurve@1 |
Executable usage: validation/unit/category/test_category.py:14 · validation/unit/combin/test_acceptance_workload.py:65 · validation/unit/combin/test_acceptance_workload.py:86 · validation/unit/combin/test_graph_facade.py:106 · validation/unit/combin/test_graph_facade.py:25 · validation/unit/combinatorics/test_kashiwara_crystal.py:32
numthy.EllipticCurve.line_function¶
Compute line function for this EllipticCurve.
Detailed contract
The chord, tangent, or vertical function through two affine points.
noether::numthy::EllipticCurve::line_function · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core |
| GIL | attached / bounded |
| Semantic ID | noether/numthy/EllipticCurve@1 |
numthy.EllipticCurve.miller_function¶
Compute Miller's function with divisor n(P) - (nP) - (n-1)(O).
Detailed contract
Compute Miller’s function with divisor n(P) - (nP) - (n-1)(O) for positive n.
noether::numthy::EllipticCurve::miller_function · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core |
| GIL | attached / bounded |
| Semantic ID | noether/numthy/EllipticCurve@1 |
Executable usage: examples/26_elliptic_descent_functions.py:20 · validation/unit/infra/test_public_api_index.py:180 · validation/unit/numthy/test_elliptic_curve_facade.py:68
numthy.EllipticCurve.origin¶
Compute origin for this EllipticCurve.
Detailed contract
Chosen origin, the point [0:1:0].
noether::numthy::EllipticCurve::origin · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core |
| GIL | attached / bounded |
| Semantic ID | noether/numthy/EllipticCurve@1 |
Executable usage: examples/26_elliptic_descent_functions.py:24 · validation/unit/numthy/test_elliptic_curve_facade.py:76 · validation/unit/topology/test_eilenberg_maclane.py:121 · validation/unit/topology/test_eilenberg_maclane.py:161 · validation/unit/topology/test_eilenberg_maclane.py:207 · validation/unit/topology/test_eilenberg_maclane.py:208
numthy.EllipticCurve.point¶
Compute point for this EllipticCurve.
Detailed contract
Construct and validate one affine point (x,y).
noether::numthy::EllipticCurve::point · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core |
| GIL | attached / bounded |
| Semantic ID | noether/numthy/EllipticCurve@1 |
Executable usage: examples/26_elliptic_descent_functions.py:17 · examples/26_elliptic_descent_functions.py:18 · examples/26_elliptic_descent_functions.py:20 · examples/26_elliptic_descent_functions.py:25 · examples/26_elliptic_descent_functions.py:31 · examples/26_elliptic_descent_functions.py:32
numthy.EllipticCurve.to_json¶
Serialize this EllipticCurve to its canonical typed JSON representation.
Detailed contract
Canonical typed JSON; nonsingularity is recomputed on restoration.
noether::numthy::EllipticCurve::to_json · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core |
| GIL | attached / bounded |
| Semantic ID | noether/numthy/EllipticCurve@1 |
Executable usage: validation/unit/category/test_category.py:14 · validation/unit/category/test_category.py:15 · validation/unit/combin/test_acceptance_workload.py:30 · validation/unit/combin/test_acceptance_workload.py:65 · validation/unit/combin/test_acceptance_workload.py:86 · validation/unit/combin/test_graph_facade.py:106
numthy.EllipticCurve.underlying_curve¶
Return the underlying curve recorded by this EllipticCurve.
Detailed contract
Checked underlying smooth projective curve.
noether::numthy::EllipticCurve::underlying_curve · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core |
| GIL | attached / bounded |
| Semantic ID | noether/numthy/EllipticCurve@1 |
Executable usage: examples/26_elliptic_descent_functions.py:22 · validation/unit/numthy/test_elliptic_curve_facade.py:37 · validation/unit/numthy/test_elliptic_curve_facade.py:74
numthy.EllipticCurve.verify¶
Replay and verify the mathematical evidence carried by this EllipticCurve.
Detailed contract
Reconstruct the curve, chosen origin, and nonzero discriminant.
noether::numthy::EllipticCurve::verify · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core |
| GIL | attached / bounded |
| Semantic ID | noether/numthy/EllipticCurve@1 |
Executable usage: examples/01_bezout_certificates.py:10 · examples/01_bezout_certificates.py:3 · examples/03_exact_linear_systems.py:13 · examples/03_exact_linear_systems.py:3 · examples/04_smith_normal_form.py:12 · examples/06_shortest_lattice_vectors.py:12
numthy.EllipticCurve.vertical_line_function¶
Compute vertical line function for this EllipticCurve.
Detailed contract
The vertical-line function x-x(P) through an affine point.
noether::numthy::EllipticCurve::vertical_line_function · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core |
| GIL | attached / bounded |
| Semantic ID | noether/numthy/EllipticCurve@1 |
numthy.EllipticCurve.x_function¶
Compute x function for this EllipticCurve.
Detailed contract
Distinguished x coordinate in the underlying curve function field.
noether::numthy::EllipticCurve::x_function · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core |
| GIL | attached / bounded |
| Semantic ID | noether/numthy/EllipticCurve@1 |
numthy.EllipticCurve.y_function¶
Compute y function for this EllipticCurve.
Detailed contract
Distinguished y coordinate in the underlying curve function field.
noether::numthy::EllipticCurve::y_function · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core |
| GIL | attached / bounded |
| Semantic ID | noether/numthy/EllipticCurve@1 |