Skip to content

numthy · FiniteFieldIsomorphism

11 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.FiniteFieldIsomorphism

A checked isomorphism between two explicit finite-field presentations.

class FiniteFieldIsomorphism

noether::numthy::FiniteFieldIsomorphism · Direct Rust declaration

pub struct FiniteFieldIsomorphism { /* 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/FiniteFieldIsomorphism@1

Executable usage: validation/unit/commalg/test_context_tower_workload.py:161 · validation/unit/commalg/test_context_tower_workload.py:21 · validation/unit/numthy/test_finite_field_facade.py:135 · validation/unit/numthy/test_finite_field_facade.py:15 · validation/unit/numthy/test_finite_field_facade.py:152

numthy.FiniteFieldIsomorphism.__call__

Coerce the supplied input through this context or mathematical map.

(self, value: FiniteFieldElement) -> FiniteFieldElement

noether::numthy::FiniteFieldIsomorphism · 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/FiniteFieldIsomorphism@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.FiniteFieldIsomorphism.apply

Apply this FiniteFieldIsomorphism to the supplied value.

Detailed contract

Apply the checked source-to-target map.

(self, value: FiniteFieldElement) -> FiniteFieldElement

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

pub fn apply( &self, value: &FiniteFieldElement, ) -> Result<FiniteFieldElement, FiniteFieldIsomorphismError>
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/FiniteFieldIsomorphism@1

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.FiniteFieldIsomorphism.apply_inverse

Compute apply inverse for this FiniteFieldIsomorphism.

Detailed contract

Apply the checked target-to-source inverse map.

(self, value: FiniteFieldElement) -> FiniteFieldElement

noether::numthy::FiniteFieldIsomorphism::apply_inverse · Direct Rust declaration

pub fn apply_inverse( &self, value: &FiniteFieldElement, ) -> Result<FiniteFieldElement, FiniteFieldIsomorphismError>
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/FiniteFieldIsomorphism@1

Executable usage: examples/09_finite_field_isomorphisms.py:14 · validation/unit/commalg/test_context_tower_workload.py:160 · validation/unit/numthy/test_finite_field_facade.py:139 · validation/unit/numthy/test_finite_field_facade.py:150 · validation/corpus/numthy/finite-field-isomorphism-f25.py:45 · validation/corpus/numthy/finite-field-isomorphism-f25.py:47

numthy.FiniteFieldIsomorphism.from_json

Deserialize and revalidate a FiniteFieldIsomorphism from typed JSON.

Detailed contract

Deserialize and reverify the complete map witness.

(cls, value: str) -> FiniteFieldIsomorphism

noether::numthy::FiniteFieldIsomorphism::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/FiniteFieldIsomorphism@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.FiniteFieldIsomorphism.generator_image

Return the generator image recorded by this FiniteFieldIsomorphism.

Detailed contract

Image in the target of the source’s distinguished generator.

(self) -> FiniteFieldElement

noether::numthy::FiniteFieldIsomorphism::generator_image · Direct Rust declaration

pub fn generator_image(&self) -> &FiniteFieldElement
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/FiniteFieldIsomorphism@1

Executable usage: examples/09_finite_field_isomorphisms.py:15 · validation/unit/numthy/test_finite_field_facade.py:138 · validation/unit/numthy/test_finite_field_facade.py:178 · validation/corpus/numthy/finite-field-isomorphism-f25.py:24 · validation/corpus/numthy/finite-field-isomorphism-f25.py:54

numthy.FiniteFieldIsomorphism.inverse_generator_image

Return the inverse generator image recorded by this FiniteFieldIsomorphism.

Detailed contract

Image in the source of the target’s distinguished generator.

(self) -> FiniteFieldElement

noether::numthy::FiniteFieldIsomorphism::inverse_generator_image · Direct Rust declaration

pub fn inverse_generator_image(&self) -> &FiniteFieldElement
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/FiniteFieldIsomorphism@1

Executable usage: validation/unit/numthy/test_finite_field_facade.py:139 · validation/corpus/numthy/finite-field-isomorphism-f25.py:25 · validation/corpus/numthy/finite-field-isomorphism-f25.py:57

numthy.FiniteFieldIsomorphism.source

Return the source recorded by this FiniteFieldIsomorphism.

Detailed contract

Source presentation.

(self) -> FiniteField

noether::numthy::FiniteFieldIsomorphism::source · Direct Rust declaration

pub fn source(&self) -> &FiniteField
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/FiniteFieldIsomorphism@1

Executable usage: examples/09_finite_field_isomorphisms.py:11 · examples/09_finite_field_isomorphisms.py:13 · examples/09_finite_field_isomorphisms.py:9 · examples/30_modules_and_resolutions.py:34 · examples/30_modules_and_resolutions.py:37 · validation/unit/category/test_acceptance_workload.py:25

numthy.FiniteFieldIsomorphism.target

Return the target recorded by this FiniteFieldIsomorphism.

Detailed contract

Target presentation.

(self) -> FiniteField

noether::numthy::FiniteFieldIsomorphism::target · Direct Rust declaration

pub fn target(&self) -> &FiniteField
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/FiniteFieldIsomorphism@1

Executable usage: examples/09_finite_field_isomorphisms.py:10 · examples/09_finite_field_isomorphisms.py:11 · examples/30_modules_and_resolutions.py:33 · examples/30_modules_and_resolutions.py:38 · examples/31_local_fields_and_precision.py:27 · examples/36_affine_normalization.py:16

numthy.FiniteFieldIsomorphism.to_json

Serialize this FiniteFieldIsomorphism to its canonical typed JSON representation.

Detailed contract

Serialize both contexts and the two checked generator images.

(self) -> str

noether::numthy::FiniteFieldIsomorphism::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/FiniteFieldIsomorphism@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.FiniteFieldIsomorphism.verify

Replay and verify the mathematical evidence carried by this FiniteFieldIsomorphism.

Detailed contract

Recheck endpoints, defining-polynomial roots and both generator identities.

(self) -> None

noether::numthy::FiniteFieldIsomorphism::verify · Direct Rust declaration

pub fn verify(&self) -> Result<(), FiniteFieldIsomorphismError>
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/FiniteFieldIsomorphism@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