numthy · NumberFieldOrder¶
15 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.NumberFieldOrder¶
A validated exact order in an absolute number field.
noether::numthy::NumberFieldOrder · 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/NumberFieldOrder@1 |
Executable usage: validation/unit/numthy/test_number_field_facade.py:10 · validation/unit/numthy/test_number_field_facade.py:115 · validation/unit/numthy/test_number_field_facade.py:125 · validation/unit/numthy/test_number_field_facade.py:98
numthy.NumberFieldOrder.__call__¶
Call self as a function.
noether::numthy::NumberFieldOrder · 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/NumberFieldOrder@1 |
Executable usage: validation/unit/infra/test_discovery.py:57 · validation/unit/infra/test_public_api_index.py:155 · validation/unit/infra/test_public_api_index.py:169
numthy.NumberFieldOrder.__contains__¶
Return bool(key in self).
Detailed contract
Whether an exact field element lies in this integral lattice.
noether::numthy::NumberFieldOrder::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/NumberFieldOrder@1 |
Executable usage: validation/unit/infra/test_discovery.py:200
numthy.NumberFieldOrder.basis¶
Canonical integral basis.
Detailed contract
Canonical integral basis as exact field elements.
noether::numthy::NumberFieldOrder::basis · 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/NumberFieldOrder@1 |
Executable usage: examples/26_elliptic_descent_functions.py:28 · examples/30_modules_and_resolutions.py:27 · examples/30_modules_and_resolutions.py:28 · examples/30_modules_and_resolutions.py:29 · examples/33_simplicial_cohomology_operations.py:26 · examples/33_simplicial_cohomology_operations.py:27
numthy.NumberFieldOrder.discriminant¶
Exact order discriminant.
Detailed contract
Exact discriminant of this order.
noether::numthy::NumberFieldOrder::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/NumberFieldOrder@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.NumberFieldOrder.field¶
Ambient exact number field.
Detailed contract
The ambient number field.
noether::numthy::NumberFieldOrder::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/NumberFieldOrder@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.NumberFieldOrder.fractional_ideal¶
Construct the nonzero fractional ideal generated by exact field elements.
Detailed contract
Construct the nonzero fractional ideal generated by generators.
noether::numthy::NumberFieldOrder::fractional_ideal · 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/NumberFieldOrder@1 |
Executable usage: examples/12_number_field_ideals.py:17 · validation/unit/numthy/test_acceptance_workload.py:78 · validation/unit/numthy/test_acceptance_workload.py:79 · validation/unit/numthy/test_number_field_facade.py:173 · validation/unit/numthy/test_number_field_facade.py:186 · validation/unit/numthy/test_number_field_facade.py:187
numthy.NumberFieldOrder.from_json¶
Restore and revalidate a canonical order representation.
Detailed contract
Restore and validate an exact order from canonical JSON.
noether::numthy::NumberFieldOrder::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/NumberFieldOrder@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.NumberFieldOrder.index¶
Index [super_order : self], requiring containment.
Detailed contract
Index [super_order : self] when self is contained in super_order.
noether::numthy::NumberFieldOrder::index · 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/NumberFieldOrder@1 |
Executable usage: examples/38_exact_linear_systems.py:79 · validation/unit/combinatorics/test_kashiwara_crystal.py:34 · validation/unit/combinatorics/test_kashiwara_crystal.py:35 · validation/unit/combinatorics/test_kashiwara_crystal.py:36 · validation/unit/commalg/test_base_change.py:90 · validation/unit/commalg/test_base_change.py:93
numthy.NumberFieldOrder.inverse_unit¶
Invert a unit of this order.
noether::numthy::NumberFieldOrder::inverse_unit · 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/NumberFieldOrder@1 |
Executable usage: validation/unit/numthy/test_number_field_facade.py:104 · validation/unit/numthy/test_number_field_facade.py:112 · validation/unit/numthy/test_padic_local_field_facade.py:199
numthy.NumberFieldOrder.is_maximal¶
Whether this is the maximal order of its ambient field.
Detailed contract
Whether this order is the maximal order of its ambient number field.
noether::numthy::NumberFieldOrder::is_maximal · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core |
| GIL | released |
| Semantic ID | noether/numthy/NumberFieldOrder@1 |
Executable usage: examples/31_local_fields_and_precision.py:25 · validation/unit/numthy/test_number_field_facade.py:145 · validation/unit/numthy/test_number_field_facade.py:161 · validation/unit/numthy/test_number_field_facade.py:162 · validation/unit/numthy/test_padic_local_field_facade.py:177 · validation/unit/numthy/test_padic_local_field_facade.py:188
numthy.NumberFieldOrder.one¶
Multiplicative identity.
noether::numthy::NumberFieldOrder::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/NumberFieldOrder@1 |
Executable usage: examples/02_ball_arithmetic.py:13 · examples/11_qadic_witt_vectors.py:11 · examples/24_homology_and_persistence.py:3 · examples/31_local_fields_and_precision.py:27 · validation/unit/combinatorics/test_poset.py:3 · validation/unit/commalg/test_acceptance_workload.py:37
numthy.NumberFieldOrder.prime_ideals_above¶
Checked prime ideals above a positive rational prime.
Detailed contract
Decompose (p) into checked prime ideals of this maximal order. Kummer–Dedekind factorization is the fast path when the distinguished equation order is p-maximal. Native residue-algebra splitting handles index primes and rational presentations. Every result is verified as a field quotient, and the product is checked to reconstruct (p).
noether::numthy::NumberFieldOrder::prime_ideals_above · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core |
| GIL | released |
| Semantic ID | noether/numthy/NumberFieldOrder@1 |
Executable usage: examples/12_number_field_ideals.py:14 · validation/unit/numthy/test_acceptance_workload.py:56 · validation/unit/numthy/test_acceptance_workload.py:66 · validation/unit/numthy/test_acceptance_workload.py:67 · validation/unit/numthy/test_number_field_facade.py:210 · validation/unit/numthy/test_number_field_facade.py:232
numthy.NumberFieldOrder.to_json¶
Canonical JSON representation.
Detailed contract
Serialize this exact order to canonical JSON.
noether::numthy::NumberFieldOrder::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/NumberFieldOrder@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.NumberFieldOrder.zero¶
Additive identity.
noether::numthy::NumberFieldOrder::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/NumberFieldOrder@1 |
Executable usage: examples/08_finite_field_extensions.py:11 · examples/10_padic_hensel_lifting.py:15 · examples/40_exterior_algebra.py:26 · examples/distributed/f2_linear_algebra.py:28 · examples/distributed/f2_linear_algebra.py:29 · examples/distributed/f2_linear_algebra.py:30