numthy · PadicLocalFieldElement¶
20 accepted declarations. Python and Rust forms, contracts, evidence, failure boundaries, and checked usages are kept together below.
Worked example¶
The complete checked program Calculate trace and norm in a concrete quadratic finite field uses this API directly.
# SPDX-License-Identifier: MIT
# Copyright (c) 2026 Benjamin Antieau and Deven Manam
"""Calculate trace and norm in a concrete quadratic finite field."""
from noether.numthy import FiniteField
def main() -> None:
field = FiniteField.extension(5, 2)
generator = field.generator()
assert generator**2 + field(4) * generator + field(2) == field.zero()
assert generator.trace() == field(1)
assert generator.norm() == field(2)
print(f"{field}: Tr(a)={generator.trace()}, Nm(a)={generator.norm()}")
if __name__ == "__main__":
main()
Run it with .venv/bin/python examples/08_finite_field_extensions.py.
numthy.PadicLocalFieldElement¶
One normalized finite-precision value in a PadicLocalField.
noether::numthy::PadicLocalFieldElement · 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/PadicLocalFieldElement@1 |
Executable usage: validation/unit/infra/test_discovery.py:247 · validation/unit/infra/test_discovery.py:38 · validation/unit/infra/test_public_api_index.py:115 · validation/unit/numthy/test_padic_local_field_facade.py:15 · validation/unit/numthy/test_padic_local_field_facade.py:65 · validation/unit/numthy/test_padic_local_field_facade.py:83
numthy.PadicLocalFieldElement.__add__¶
Add another compatible value to this value.
noether::numthy::PadicLocalFieldElement · 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/PadicLocalFieldElement@1 |
Executable usage: validation/unit/infra/test_discovery.py:211 · validation/unit/infra/test_public_api_index.py:293
numthy.PadicLocalFieldElement.__mul__¶
Multiply this value by another compatible value.
noether::numthy::PadicLocalFieldElement · 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/PadicLocalFieldElement@1 |
Executable usage: validation/unit/infra/test_public_api_index.py:214
numthy.PadicLocalFieldElement.__neg__¶
Return the additive inverse of this value.
noether::numthy::PadicLocalFieldElement · 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/PadicLocalFieldElement@1 |
numthy.PadicLocalFieldElement.__pow__¶
Raise this value to the supplied power.
noether::numthy::PadicLocalFieldElement · 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/PadicLocalFieldElement@1 |
numthy.PadicLocalFieldElement.__sub__¶
Subtract another compatible value from this value.
noether::numthy::PadicLocalFieldElement · 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/PadicLocalFieldElement@1 |
Executable usage: validation/unit/infra/test_discovery.py:212
numthy.PadicLocalFieldElement.characteristic_polynomial¶
Compute characteristic polynomial for this PadicLocalFieldElement.
Detailed contract
Characteristic polynomial over Q_p of multiplication by this value.
noether::numthy::PadicLocalFieldElement::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/PadicLocalFieldElement@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.PadicLocalFieldElement.field¶
Return the field recorded by this PadicLocalFieldElement.
Detailed contract
Concrete local field presentation.
noether::numthy::PadicLocalFieldElement::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/PadicLocalFieldElement@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.PadicLocalFieldElement.from_json¶
Deserialize and revalidate a PadicLocalFieldElement from typed JSON.
Detailed contract
Deserialize and revalidate staggered coordinate contexts.
noether::numthy::PadicLocalFieldElement::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/PadicLocalFieldElement@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.PadicLocalFieldElement.inverse¶
Compute inverse for this PadicLocalFieldElement.
Detailed contract
Multiplicative inverse, preserving relative rather than absolute precision.
noether::numthy::PadicLocalFieldElement::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/PadicLocalFieldElement@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.PadicLocalFieldElement.is_zero¶
Test whether this PadicLocalFieldElement is zero.
Detailed contract
Whether the value vanishes at its honest absolute precision.
noether::numthy::PadicLocalFieldElement::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/PadicLocalFieldElement@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.PadicLocalFieldElement.known_absolute_precision¶
Return the known absolute precision recorded by this PadicLocalFieldElement.
Detailed contract
Known absolute precision in powers of the distinguished uniformizer.
noether::numthy::PadicLocalFieldElement::known_absolute_precision · 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/PadicLocalFieldElement@1 |
Executable usage: validation/unit/numthy/test_acceptance_workload.py:106 · validation/unit/numthy/test_padic_local_field_facade.py:67 · validation/unit/numthy/test_padic_local_field_facade.py:96 · validation/unit/numthy/test_padic_ring_facade.py:68 · validation/unit/numthy/test_qadic_ring_facade.py:55 · validation/corpus/numthy/padic-newton-cube-root.py:23
numthy.PadicLocalFieldElement.minimal_polynomial¶
Compute minimal polynomial for this PadicLocalFieldElement.
Detailed contract
Minimal polynomial over Q_p when a full power basis is certified. A nonzero determinant for 1, a, ..., a^(n-1) proves that a generates the degree-n extension, in which case its minimal and characteristic polynomials agree. If that determinant vanishes at the available cap, this operation fails rather than infer a smaller degree from finite-precision zeros.
noether::numthy::PadicLocalFieldElement::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/PadicLocalFieldElement@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.PadicLocalFieldElement.norm¶
Compute norm for this PadicLocalFieldElement.
Detailed contract
Field norm to Q_p at the largest uniformly justified coefficient cap.
noether::numthy::PadicLocalFieldElement::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/PadicLocalFieldElement@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.PadicLocalFieldElement.normalized_coordinates¶
Return the normalized coordinates recorded by this PadicLocalFieldElement.
Detailed contract
Staggered power-basis coordinates of the normalized integral unit. Zero has no normalized unit and therefore returns only absent coordinates. For a nonzero value, a missing coordinate means that its required relative cap is zero.
noether::numthy::PadicLocalFieldElement::normalized_coordinates · 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/PadicLocalFieldElement@1 |
numthy.PadicLocalFieldElement.pow¶
Compute pow for this PadicLocalFieldElement.
Detailed contract
Raise this value to a nonnegative word-sized power.
noether::numthy::PadicLocalFieldElement::pow · 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/PadicLocalFieldElement@1 |
Executable usage: examples/17_weighted_power_series.py:18 · validation/unit/commalg/test_polynomial_ideal_facade.py:368 · validation/unit/commalg/test_polynomial_ideal_facade.py:369 · validation/unit/commalg/test_polynomial_ideal_facade.py:370 · validation/unit/commalg/test_polynomial_ideal_facade.py:373 · validation/unit/commalg/test_polynomial_ideal_facade.py:381
numthy.PadicLocalFieldElement.relative_precision¶
Return the relative precision recorded by this PadicLocalFieldElement.
Detailed contract
Precision relative to the exact valuation of a nonzero value.
noether::numthy::PadicLocalFieldElement::relative_precision · 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/PadicLocalFieldElement@1 |
numthy.PadicLocalFieldElement.to_json¶
Serialize this PadicLocalFieldElement to its canonical typed JSON representation.
Detailed contract
Canonical typed JSON.
noether::numthy::PadicLocalFieldElement::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/PadicLocalFieldElement@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.PadicLocalFieldElement.trace¶
Compute trace for this PadicLocalFieldElement.
Detailed contract
Field trace to Q_p at the largest uniformly justified coefficient cap.
noether::numthy::PadicLocalFieldElement::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/PadicLocalFieldElement@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
numthy.PadicLocalFieldElement.valuation¶
Compute valuation for this PadicLocalFieldElement.
Detailed contract
Exact valuation, or a lower bound for a value zero at available precision.
noether::numthy::PadicLocalFieldElement::valuation · 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/PadicLocalFieldElement@1 |
Executable usage: examples/31_local_fields_and_precision.py:37 · validation/unit/commalg/test_context_tower_workload.py:121 · validation/unit/commalg/test_context_tower_workload.py:122 · validation/unit/numthy/test_number_field_facade.py:244 · validation/unit/numthy/test_number_field_facade.py:245 · validation/unit/numthy/test_number_field_facade.py:255