Skip to content

numthy · PadicRingFrobenius

8 accepted declarations. Python and Rust forms, contracts, evidence, failure boundaries, and checked usages are kept together below.

Worked example

The complete checked program Apply and multiply canonical sparse exact operators uses this API directly.

# SPDX-License-Identifier: MIT
# Copyright (c) 2026 Benjamin Antieau and Deven Manam
"""Apply and multiply canonical sparse exact operators."""

from noether import Z
from noether.linalg import SparseMatrix, Vector


def main() -> None:
    operator = SparseMatrix.from_triplets(
        Z,
        (3, 3),
        [(0, 0, 2), (0, 2, -1), (1, 1, 3), (2, 0, 4)],
    )
    vector = Vector.from_values(Z, [5, 7, 11])
    image = operator.apply(vector)
    assert image.to_values() == [-1, 21, 20]
    assert (operator @ operator).nnz == 4
    print(f"A v = {image.to_values()}; nnz(A^2) = {(operator @ operator).nnz}")


if __name__ == "__main__":
    main()

Run it with .venv/bin/python examples/05_sparse_exact_operators.py.

numthy.PadicRingFrobenius

Coefficient Frobenius on a fixed-precision p-adic integer ring.

class PadicRingFrobenius

noether::numthy::PadicRingFrobenius · Direct Rust declaration

pub struct PadicRingFrobenius { /* private fields */ }
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core
GIL attached / bounded

Executable usage: validation/unit/numthy/test_padic_ring_facade.py:134 · validation/unit/numthy/test_padic_ring_facade.py:139 · validation/unit/numthy/test_padic_ring_facade.py:16

numthy.PadicRingFrobenius.__call__

Coerce the supplied input through this context or mathematical map.

(self, value: PadicElement) -> PadicElement

noether::numthy::PadicRingFrobenius · 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

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.PadicRingFrobenius.apply

Apply this PadicRingFrobenius to the supplied value.

Detailed contract

Apply coefficient Frobenius after checking the exact context.

(self, value: PadicElement) -> PadicElement

noether::numthy::PadicRingFrobenius::apply · Direct Rust declaration

pub fn apply( &self, value: &PadicElement, ) -> Result<PadicElement, CoefficientFrobeniusError>
fn apply(&self, value: &PadicElement) -> Result<PadicElement, Self::Error>
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core
GIL attached / bounded

Executable usage: examples/05_sparse_exact_operators.py:16 · validation/unit/commalg/test_local_algebra.py:94 · validation/unit/commalg/test_local_algebra.py:97 · validation/unit/commalg/test_polynomial_facade.py:199 · validation/unit/commalg/test_quotient_facade.py:186 · validation/unit/groups/test_weight_characters.py:39

numthy.PadicRingFrobenius.compose

Compose this PadicRingFrobenius with another compatible map.

Detailed contract

Compose self after inner, adding the recorded exponents.

(self, inner: PadicRingFrobenius) -> PadicRingFrobenius

noether::numthy::PadicRingFrobenius::compose · Direct Rust declaration

pub fn compose(&self, inner: &Self) -> Result<Self, CoefficientFrobeniusError>
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core
GIL attached / bounded

Executable usage: validation/unit/commalg/test_context_tower_workload.py:3 · validation/unit/commalg/test_polynomial_facade.py:200 · validation/unit/commalg/test_power_series_facade.py:151 · validation/unit/commalg/test_power_series_facade.py:245 · validation/unit/commalg/test_power_series_facade.py:248 · validation/unit/groups/test_permutation_group_facade.py:41

numthy.PadicRingFrobenius.context

Return the context recorded by this PadicRingFrobenius.

Detailed contract

Exact source and target context of this endomorphism.

(self) -> PadicRing

noether::numthy::PadicRingFrobenius::context · Direct Rust declaration

pub fn context(&self) -> &PadicRing
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core
GIL attached / bounded

Executable usage: validation/unit/commalg/test_acceptance_workload.py:71 · validation/unit/commalg/test_base_change.py:79 · validation/unit/commalg/test_base_change.py:81 · validation/unit/commalg/test_context_tower_workload.py:63 · validation/unit/commalg/test_context_tower_workload.py:64 · validation/unit/commalg/test_kahler_differentials.py:136

numthy.PadicRingFrobenius.exponent

Return the exponent recorded by this PadicRingFrobenius.

Detailed contract

Unreduced nonnegative Frobenius exponent recorded by this map.

(self) -> int

noether::numthy::PadicRingFrobenius::exponent · Direct Rust declaration

pub fn exponent(&self) -> u64
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core
GIL attached / bounded

Executable usage: examples/31_local_fields_and_precision.py:38 · validation/unit/commalg/test_base_change.py:93 · validation/unit/commalg/test_groebner_verification_budget.py:32 · validation/unit/commalg/test_groebner_verification_budget.py:33 · validation/unit/commalg/test_groebner_verification_budget.py:34 · validation/unit/commalg/test_groebner_verification_budget.py:35

numthy.PadicRingFrobenius.from_json

Deserialize and revalidate a PadicRingFrobenius from typed JSON.

Detailed contract

Deserialize and revalidate the complete context presentation.

(cls, value: str) -> PadicRingFrobenius

noether::numthy::PadicRingFrobenius::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

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.PadicRingFrobenius.to_json

Serialize this PadicRingFrobenius to its canonical typed JSON representation.

Detailed contract

Canonical JSON containing the context presentation and exponent.

(self) -> str

noether::numthy::PadicRingFrobenius::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

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