numthy · NumberFieldElement¶
23 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.NumberFieldElement¶
One exact element of a concrete number field.
noether::numthy::NumberFieldElement · 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/NumberFieldElement@1 |
Executable usage: validation/unit/infra/test_discovery.py:36 · validation/unit/infra/test_public_api_index.py:113 · validation/unit/numthy/test_number_field_facade.py:10 · validation/unit/numthy/test_number_field_facade.py:60 · validation/bench/magma_release.py:2439 · validation/bench/magma_release.py:2862
numthy.NumberFieldElement.__add__¶
Add another compatible value to this value.
Detailed contract
Add another element of the same number field. Returns the argument unchanged.
noether::numthy::NumberFieldElement::add · 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/NumberFieldElement@1 |
Executable usage: validation/unit/infra/test_discovery.py:211 · validation/unit/infra/test_public_api_index.py:293
numthy.NumberFieldElement.__mul__¶
Multiply this value by another compatible value.
Detailed contract
Multiply by another element of the same number field.
noether::numthy::NumberFieldElement::mul · 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/NumberFieldElement@1 |
Executable usage: validation/unit/infra/test_public_api_index.py:214
numthy.NumberFieldElement.__neg__¶
Return the additive inverse of this value.
Detailed contract
Additive inverse.
noether::numthy::NumberFieldElement::neg · 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/NumberFieldElement@1 |
numthy.NumberFieldElement.__pow__¶
Raise this value to the supplied power.
noether::numthy::NumberFieldElement · Python projection
| 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/NumberFieldElement@1 |
numthy.NumberFieldElement.__radd__¶
Add this value to a compatible value on its left.
noether::numthy::NumberFieldElement · Python projection
| 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/NumberFieldElement@1 |
numthy.NumberFieldElement.__rmul__¶
Multiply this value by a compatible value on its left.
noether::numthy::NumberFieldElement · Python projection
| 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/NumberFieldElement@1 |
numthy.NumberFieldElement.__rsub__¶
Subtract this value from a compatible value on its left.
noether::numthy::NumberFieldElement · Python projection
| 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/NumberFieldElement@1 |
numthy.NumberFieldElement.__rtruediv__¶
Divide a compatible value on the left by this value.
noether::numthy::NumberFieldElement · Python projection
| 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/NumberFieldElement@1 |
numthy.NumberFieldElement.__sub__¶
Subtract another compatible value from this value.
Detailed contract
Subtract another element of the same number field.
noether::numthy::NumberFieldElement::sub · 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/NumberFieldElement@1 |
Executable usage: validation/unit/infra/test_discovery.py:212
numthy.NumberFieldElement.__truediv__¶
Divide this value by another compatible value.
noether::numthy::NumberFieldElement · Python projection
| 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/NumberFieldElement@1 |
numthy.NumberFieldElement.characteristic_polynomial¶
Characteristic polynomial over Q.
Detailed contract
Characteristic polynomial over Q, in the canonical variable t.
noether::numthy::NumberFieldElement::characteristic_polynomial · 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/NumberFieldElement@1 |
Executable usage: validation/unit/linalg/test_acceptance_workload.py:79 · validation/unit/linalg/test_acceptance_workload.py:80 · validation/unit/linalg/test_acceptance_workload.py:98 · validation/unit/linalg/test_acceptance_workload.py:99 · validation/unit/linalg/test_exact_linear_algebra_facade.py:129 · validation/unit/linalg/test_exact_linear_algebra_facade.py:130
numthy.NumberFieldElement.coefficients¶
Exact ascending power-basis coefficients as Fraction values.
Detailed contract
Exact ascending coordinates in the distinguished power basis.
noether::numthy::NumberFieldElement::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/NumberFieldElement@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.NumberFieldElement.conjugates¶
Certified values under every complex embedding.
Detailed contract
Certified complex values under every embedding of this field.
noether::numthy::NumberFieldElement::conjugates · 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/NumberFieldElement@1 |
Executable usage: validation/unit/numthy/test_number_field_facade.py:54 · validation/unit/numthy/test_number_field_facade.py:56 · validation/unit/numthy/test_number_field_facade.py:57 · validation/corpus/numthy/cubic-field-embeddings.py:23 · validation/corpus/numthy/cubic-field-embeddings.py:31
numthy.NumberFieldElement.field¶
Concrete number-field context.
Detailed contract
Concrete field context containing this element.
noether::numthy::NumberFieldElement::field · 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/NumberFieldElement@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
numthy.NumberFieldElement.from_json¶
Restore and validate an exact element representation.
Detailed contract
Restore and validate an exact element from canonical JSON.
noether::numthy::NumberFieldElement::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/NumberFieldElement@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.NumberFieldElement.inverse¶
Multiplicative inverse, failing on zero.
noether::numthy::NumberFieldElement::inverse · 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/NumberFieldElement@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
numthy.NumberFieldElement.is_one¶
Whether this element is one.
noether::numthy::NumberFieldElement::is_one · 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/NumberFieldElement@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
numthy.NumberFieldElement.is_zero¶
Whether this element is zero.
noether::numthy::NumberFieldElement::is_zero · 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/NumberFieldElement@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
numthy.NumberFieldElement.minimal_polynomial¶
Minimal polynomial over Q.
Detailed contract
Minimal polynomial over Q, in the canonical variable t.
noether::numthy::NumberFieldElement::minimal_polynomial · 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/NumberFieldElement@1 |
Executable usage: validation/unit/infra/test_discovery.py:247 · validation/unit/numthy/test_number_field_facade.py:51 · validation/unit/numthy/test_padic_local_field_facade.py:80 · validation/unit/numthy/test_padic_local_field_facade.py:82 · validation/bench/magma_release.py:1460 · validation/bench/magma_release.py:1468
numthy.NumberFieldElement.norm¶
Exact field norm to Q.
Detailed contract
Exact field norm to Q.
noether::numthy::NumberFieldElement::norm · 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/NumberFieldElement@1 |
Executable usage: examples/06_shortest_lattice_vectors.py:15 · examples/08_finite_field_extensions.py:13 · examples/08_finite_field_extensions.py:14 · examples/08_finite_field_extensions.py:3 · examples/12_number_field_ideals.py:16 · examples/12_number_field_ideals.py:18
numthy.NumberFieldElement.to_json¶
Canonical JSON representation.
Detailed contract
Serialize this exact element to canonical JSON.
noether::numthy::NumberFieldElement::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/NumberFieldElement@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.NumberFieldElement.trace¶
Exact field trace to Q.
Detailed contract
Exact field trace to Q.
noether::numthy::NumberFieldElement::trace · 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/NumberFieldElement@1 |
Executable usage: examples/08_finite_field_extensions.py:12 · examples/08_finite_field_extensions.py:14 · examples/08_finite_field_extensions.py:3 · validation/unit/commalg/test_acceptance_workload.py:41 · validation/unit/commalg/test_context_tower_workload.py:116 · validation/unit/commalg/test_context_tower_workload.py:96