commalg · CurveFunction¶
24 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.
commalg.CurveFunction¶
One canonical rational function on a checked curve.
noether::commalg::CurveFunction · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel |
| GIL | attached / bounded |
| Semantic ID | noether/commalg/CurveFunction@1 |
Executable usage: validation/unit/commalg/test_curve_facade.py:31 · validation/unit/commalg/test_curve_facade.py:85 · validation/unit/commalg/test_curve_facade.py:9 · validation/unit/commalg/test_curve_facade.py:98
commalg.CurveFunction.__add__¶
Add another compatible value to this value.
Detailed contract
Returns the argument unchanged.
noether::commalg::CurveFunction::add · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel |
| GIL | attached / bounded |
| Semantic ID | noether/commalg/CurveFunction@1 |
Executable usage: validation/unit/infra/test_discovery.py:211 · validation/unit/infra/test_public_api_index.py:293
commalg.CurveFunction.__mul__¶
Multiply this value by another compatible value.
noether::commalg::CurveFunction::mul · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel |
| GIL | attached / bounded |
| Semantic ID | noether/commalg/CurveFunction@1 |
Executable usage: validation/unit/infra/test_public_api_index.py:214
commalg.CurveFunction.__neg__¶
Return the additive inverse of this value.
noether::commalg::CurveFunction::neg · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel |
| GIL | attached / bounded |
| Semantic ID | noether/commalg/CurveFunction@1 |
commalg.CurveFunction.__pow__¶
Raise this value to the supplied power.
noether::commalg::CurveFunction · Python projection
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel |
| GIL | attached / bounded |
| Semantic ID | noether/commalg/CurveFunction@1 |
commalg.CurveFunction.__radd__¶
Add this value to a compatible value on its left.
noether::commalg::CurveFunction · Python projection
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel |
| GIL | attached / bounded |
| Semantic ID | noether/commalg/CurveFunction@1 |
commalg.CurveFunction.__rmul__¶
Multiply this value by a compatible value on its left.
noether::commalg::CurveFunction · Python projection
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel |
| GIL | attached / bounded |
| Semantic ID | noether/commalg/CurveFunction@1 |
commalg.CurveFunction.__rsub__¶
Subtract this value from a compatible value on its left.
noether::commalg::CurveFunction · Python projection
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel |
| GIL | attached / bounded |
| Semantic ID | noether/commalg/CurveFunction@1 |
commalg.CurveFunction.__rtruediv__¶
Divide a compatible value on the left by this value.
noether::commalg::CurveFunction · Python projection
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel |
| GIL | attached / bounded |
| Semantic ID | noether/commalg/CurveFunction@1 |
commalg.CurveFunction.__sub__¶
Subtract another compatible value from this value.
noether::commalg::CurveFunction::sub · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel |
| GIL | attached / bounded |
| Semantic ID | noether/commalg/CurveFunction@1 |
Executable usage: validation/unit/infra/test_discovery.py:212
commalg.CurveFunction.__truediv__¶
Divide this value by another compatible value.
noether::commalg::CurveFunction · Python projection
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel |
| GIL | attached / bounded |
| Semantic ID | noether/commalg/CurveFunction@1 |
commalg.CurveFunction.as_constant¶
View this CurveFunction as constant.
Detailed contract
Recover the constant-field value when this function is constant.
noether::commalg::CurveFunction::as_constant · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel |
| GIL | attached / bounded |
| Semantic ID | noether/commalg/CurveFunction@1 |
Executable usage: examples/26_elliptic_descent_functions.py:29 · validation/unit/commalg/test_curve_facade.py:124 · validation/unit/numthy/test_elliptic_curve_facade.py:82
commalg.CurveFunction.evaluate_at¶
Compute evaluate at for this CurveFunction.
Detailed contract
Evaluate at a rational point with distinct regular, zero, and pole results.
noether::commalg::CurveFunction::evaluate_at · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel |
| GIL | attached / bounded |
| Semantic ID | noether/commalg/CurveFunction@1 |
Executable usage: examples/26_elliptic_descent_functions.py:31 · examples/26_elliptic_descent_functions.py:32 · validation/unit/commalg/test_curve_facade.py:137 · validation/unit/commalg/test_curve_facade.py:39 · validation/unit/commalg/test_curve_facade.py:40 · validation/unit/commalg/test_curve_facade.py:41
commalg.CurveFunction.field¶
Return the field recorded by this CurveFunction.
Detailed contract
Owning curve function field.
noether::commalg::CurveFunction::field · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel |
| GIL | attached / bounded |
| Semantic ID | noether/commalg/CurveFunction@1 |
Executable usage: examples/08_finite_field_extensions.py:10 · examples/08_finite_field_extensions.py:11 · examples/08_finite_field_extensions.py:12 · examples/08_finite_field_extensions.py:13 · examples/08_finite_field_extensions.py:14 · examples/08_finite_field_extensions.py:3
commalg.CurveFunction.from_json¶
Deserialize and revalidate a CurveFunction from typed JSON.
Detailed contract
Restore, reduce, and reject a noncanonical homogeneous presentation.
noether::commalg::CurveFunction::from_json · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel |
| GIL | attached / bounded |
| Semantic ID | noether/commalg/CurveFunction@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
commalg.CurveFunction.homogeneous_representation¶
Compute homogeneous representation for this CurveFunction.
Detailed contract
Canonical equal-degree homogeneous numerator and denominator sections. The zero function is represented by (0,1). Every nonzero function is first reduced in the admitted K(x)[y] presentation and then cleared of coefficient denominators deterministically.
noether::commalg::CurveFunction::homogeneous_representation · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel |
| GIL | attached / bounded |
| Semantic ID | noether/commalg/CurveFunction@1 |
Executable usage: validation/unit/commalg/test_curve_facade.py:51 · validation/unit/commalg/test_curve_facade.py:93
commalg.CurveFunction.inverse¶
Compute inverse for this CurveFunction.
noether::commalg::CurveFunction · Python projection
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel |
| GIL | attached / bounded |
| Semantic ID | noether/commalg/CurveFunction@1 |
Executable usage: examples/distributed/f2_linear_algebra.py:37 · examples/distributed/f2_linear_algebra.py:39 · validation/unit/commalg/test_context_tower_workload.py:121 · validation/unit/commalg/test_context_tower_workload.py:122 · validation/unit/commalg/test_context_tower_workload.py:75 · validation/unit/commalg/test_context_tower_workload.py:77
commalg.CurveFunction.is_one¶
Test whether this CurveFunction is one.
Detailed contract
Whether this function is one.
noether::commalg::CurveFunction::is_one · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel |
| GIL | attached / bounded |
| Semantic ID | noether/commalg/CurveFunction@1 |
Executable usage: validation/unit/commalg/test_rational_function_facade.py:31 · validation/unit/commalg/test_residue_ring_facade.py:25 · validation/unit/numthy/test_number_field_facade.py:29 · validation/corpus/commalg/evolution-algebra-isomorphism.py:34 · validation/corpus/numthy/diagonal-quadric-local-density-sums.py:36
commalg.CurveFunction.is_zero¶
Test whether this CurveFunction is zero.
Detailed contract
Whether this function is zero.
noether::commalg::CurveFunction::is_zero · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel |
| GIL | attached / bounded |
| Semantic ID | noether/commalg/CurveFunction@1 |
Executable usage: examples/17_weighted_power_series.py:16 · examples/17_weighted_power_series.py:17 · examples/39_kahler_differentials.py:20 · validation/unit/commalg/test_graded_commutative_facade.py:26 · validation/unit/commalg/test_kahler_differentials.py:113 · validation/unit/commalg/test_kahler_differentials.py:38
commalg.CurveFunction.order_at¶
Compute order at for this CurveFunction.
Detailed contract
Exact discrete-valuation order at a checked rational point. The local implicit-function expansion is deliberately bounded. Use order_at_with_limit when a larger order is expected.
noether::commalg::CurveFunction::order_at · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel |
| GIL | attached / bounded |
| Semantic ID | noether/commalg/CurveFunction@1 |
Executable usage: validation/unit/commalg/test_curve_facade.py:47
commalg.CurveFunction.principal_divisor¶
Compute principal divisor for this CurveFunction.
Detailed contract
Complete principal Weil divisor over Q, including non-rational closed points. Complete principal Weil divisor over a finite field, with residue-field places retained.
noether::commalg::CurveFunction::principal_divisor · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel |
| GIL | attached / bounded |
| Semantic ID | noether/commalg/CurveFunction@1 |
Executable usage: validation/unit/commalg/test_curve_facade.py:135 · validation/unit/commalg/test_curve_facade.py:55
commalg.CurveFunction.to_json¶
Serialize this CurveFunction to its canonical typed JSON representation.
Detailed contract
Serialize a canonical equal-degree homogeneous fraction on its curve.
noether::commalg::CurveFunction::to_json · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel |
| GIL | attached / bounded |
| Semantic ID | noether/commalg/CurveFunction@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
commalg.CurveFunction.verify¶
Replay and verify the mathematical evidence carried by this CurveFunction.
Detailed contract
Recompute reduction modulo the defining equation.
noether::commalg::CurveFunction::verify · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel |
| GIL | attached / bounded |
| Semantic ID | noether/commalg/CurveFunction@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
commalg.CurveFunction.verify_principal_divisor¶
Compute verify principal divisor for this CurveFunction.
Detailed contract
Independently recompute and compare a proposed principal divisor.
noether::commalg::CurveFunction::verify_principal_divisor · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel |
| GIL | attached / bounded |
| Semantic ID | noether/commalg/CurveFunction@1 |
Executable usage: validation/unit/commalg/test_curve_facade.py:141 · validation/unit/commalg/test_curve_facade.py:63