Skip to content

numthy · PadicLocalFieldOrder

19 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.PadicLocalFieldOrder

A full-rank Z_p-order certified in one p-adic local field presentation.

PadicLocalFieldOrder(field: PadicLocalField, basis: list[PadicLocalFieldElement])

noether::numthy::PadicLocalFieldOrder · Direct Rust declaration

pub struct PadicLocalFieldOrder { /* private fields */ }
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/PadicLocalFieldOrder@1

Executable usage: validation/unit/infra/test_discovery.py:245 · validation/unit/numthy/test_padic_local_field_facade.py:16 · validation/unit/numthy/test_padic_local_field_facade.py:175 · validation/unit/numthy/test_padic_local_field_facade.py:183 · validation/unit/numthy/test_padic_local_field_facade.py:212

numthy.PadicLocalFieldOrder.__call__

Coerce the supplied input through this context or mathematical map.

(self, value: PadicLocalFieldElement) -> PadicLocalFieldElement

noether::numthy::PadicLocalFieldOrder · Python projection

Python projection convenience over this Rust mathematical type
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/PadicLocalFieldOrder@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.PadicLocalFieldOrder.__contains__

Test whether the supplied value belongs to this object.

Detailed contract

Whether an ambient field value belongs to this certified lattice.

(self, value: object) -> bool

noether::numthy::PadicLocalFieldOrder::contains · Direct Rust declaration

pub fn contains(&self, value: &PadicLocalFieldElement) -> bool
fn contains(&self, value: &Self::Element) -> bool
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/PadicLocalFieldOrder@1

Executable usage: validation/unit/infra/test_discovery.py:200

numthy.PadicLocalFieldOrder.basis

Return the basis recorded by this PadicLocalFieldOrder.

Detailed contract

Canonical certified Z_p-basis in the ambient local field.

(self) -> list[PadicLocalFieldElement]

noether::numthy::PadicLocalFieldOrder::basis · Direct Rust declaration

pub fn basis(&self) -> &[PadicLocalFieldElement]
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/PadicLocalFieldOrder@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.PadicLocalFieldOrder.certified_precision

Return the certified precision recorded by this PadicLocalFieldOrder.

Detailed contract

Uniform p-adic coefficient cap at which the lattice was certified.

(self) -> int

noether::numthy::PadicLocalFieldOrder::certified_precision · Direct Rust declaration

pub const fn certified_precision(&self) -> u64
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/PadicLocalFieldOrder@1

Executable usage: validation/unit/numthy/test_padic_local_field_facade.py:179 · validation/unit/numthy/test_padic_local_field_facade.py:238

numthy.PadicLocalFieldOrder.different_valuation

Compute different valuation for this PadicLocalFieldOrder.

Detailed contract

Uniformizer valuation of the different of the maximal local order.

(self) -> int

noether::numthy::PadicLocalFieldOrder::different_valuation · Direct Rust declaration

pub fn different_valuation(&self) -> Result<u64, PadicLocalOrderError>
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/PadicLocalFieldOrder@1

Executable usage: validation/unit/numthy/test_padic_local_field_facade.py:180 · validation/unit/numthy/test_padic_local_field_facade.py:194

numthy.PadicLocalFieldOrder.discriminant_valuation

Compute discriminant valuation for this PadicLocalFieldOrder.

Detailed contract

Certified p-valuation of the order discriminant.

(self) -> int

noether::numthy::PadicLocalFieldOrder::discriminant_valuation · Direct Rust declaration

pub fn discriminant_valuation(&self) -> Result<u64, PadicLocalOrderError>
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/PadicLocalFieldOrder@1

Executable usage: examples/31_local_fields_and_precision.py:37 · validation/unit/numthy/test_padic_local_field_facade.py:181

numthy.PadicLocalFieldOrder.field

Return the field recorded by this PadicLocalFieldOrder.

Detailed contract

Ambient p-adic local field.

(self) -> PadicLocalField

noether::numthy::PadicLocalFieldOrder::field · Direct Rust declaration

pub fn field(&self) -> &PadicLocalField
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/PadicLocalFieldOrder@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.PadicLocalFieldOrder.fractional_ideal

Compute fractional ideal for this PadicLocalFieldOrder.

Detailed contract

Construct the nonzero fractional ideal generated by ambient field values.

(self, generators: list[PadicLocalFieldElement]) -> PadicLocalFractionalIdeal

noether::numthy::PadicLocalFieldOrder::fractional_ideal · Direct Rust declaration

pub fn fractional_ideal( &self, generators: &[PadicLocalFieldElement], ) -> Result<PadicLocalFractionalIdeal, PadicLocalIdealError>
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/PadicLocalFieldOrder@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.PadicLocalFieldOrder.from_json

Deserialize and revalidate a PadicLocalFieldOrder from typed JSON.

Detailed contract

Deserialize and revalidate the order lattice and multiplication closure.

(cls, value: str) -> PadicLocalFieldOrder

noether::numthy::PadicLocalFieldOrder::from_json · Direct Rust declaration

pub fn from_json(value: &str) -> Result<Self, NoetherError>
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/PadicLocalFieldOrder@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.PadicLocalFieldOrder.index_in_maximal_order_valuation

Return the index in maximal order valuation recorded by this PadicLocalFieldOrder.

Detailed contract

Certified p-valuation of [O_K : self].

(self) -> int

noether::numthy::PadicLocalFieldOrder::index_in_maximal_order_valuation · Direct Rust declaration

pub const fn index_in_maximal_order_valuation(&self) -> u64
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/PadicLocalFieldOrder@1

Executable usage: validation/unit/numthy/test_padic_local_field_facade.py:178 · validation/unit/numthy/test_padic_local_field_facade.py:189

numthy.PadicLocalFieldOrder.index_valuation

Compute index valuation for this PadicLocalFieldOrder.

Detailed contract

Certified p-valuation of [super_order : self].

(self, super_order: PadicLocalFieldOrder) -> int

noether::numthy::PadicLocalFieldOrder::index_valuation · Direct Rust declaration

pub fn index_valuation( &self, super_order: &Self, ) -> Result<u64, PadicLocalOrderError>
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/PadicLocalFieldOrder@1

Executable usage: validation/unit/numthy/test_padic_local_field_facade.py:190

numthy.PadicLocalFieldOrder.inverse_unit

Compute inverse unit for this PadicLocalFieldOrder.

(self, value: PadicLocalFieldElement) -> PadicLocalFieldElement

noether::numthy::PadicLocalFieldOrder::inverse_unit · Direct Rust declaration

fn inverse_unit( &self, value: &Self::Element, ) -> Result<Self::Element, UnitError>
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/PadicLocalFieldOrder@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.PadicLocalFieldOrder.is_maximal

Test whether this PadicLocalFieldOrder is maximal.

Detailed contract

Whether this certified order equals the explicit ring of integers.

(self) -> bool

noether::numthy::PadicLocalFieldOrder::is_maximal · Direct Rust declaration

pub const fn is_maximal(&self) -> bool
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/PadicLocalFieldOrder@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.PadicLocalFieldOrder.maximal_ideal

Compute maximal ideal for this PadicLocalFieldOrder.

Detailed contract

The unique maximal ideal (pi) of the certified maximal order.

(self) -> PadicLocalFractionalIdeal

noether::numthy::PadicLocalFieldOrder::maximal_ideal · Direct Rust declaration

pub fn maximal_ideal( &self, ) -> Result<PadicLocalFractionalIdeal, PadicLocalIdealError>
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/PadicLocalFieldOrder@1

Executable usage: validation/unit/numthy/test_padic_local_field_facade.py:222 · validation/unit/numthy/test_padic_local_field_facade.py:250

numthy.PadicLocalFieldOrder.maximal_overorder

Compute maximal overorder for this PadicLocalFieldOrder.

Detailed contract

The explicit maximal overorder O_K at the same certified cap.

(self) -> PadicLocalFieldOrder

noether::numthy::PadicLocalFieldOrder::maximal_overorder · Direct Rust declaration

pub fn maximal_overorder(&self) -> Result<Self, PadicLocalOrderError>
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/PadicLocalFieldOrder@1

Executable usage: validation/unit/numthy/test_padic_local_field_facade.py:191

numthy.PadicLocalFieldOrder.one

Compute one for this PadicLocalFieldOrder.

(self) -> PadicLocalFieldElement

noether::numthy::PadicLocalFieldOrder::one · Direct Rust declaration

fn one(&self) -> Self::Element
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/PadicLocalFieldOrder@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.PadicLocalFieldOrder.to_json

Serialize this PadicLocalFieldOrder to its canonical typed JSON representation.

Detailed contract

Canonical typed JSON carrying the field, basis, and certification cap.

(self) -> str

noether::numthy::PadicLocalFieldOrder::to_json · Direct Rust declaration

pub fn to_json(&self) -> Result<String, NoetherError>
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/PadicLocalFieldOrder@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.PadicLocalFieldOrder.zero

Compute zero for this PadicLocalFieldOrder.

(self) -> PadicLocalFieldElement

noether::numthy::PadicLocalFieldOrder::zero · Direct Rust declaration

fn zero(&self) -> Self::Element
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/PadicLocalFieldOrder@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