numthy · PadicRing¶
18 accepted declarations. Python and Rust forms, contracts, evidence, failure boundaries, and checked usages are kept together below.
Worked example¶
The complete checked program Lift a simple square root from F_5 to fixed-precision Z_5 uses this API directly.
# SPDX-License-Identifier: MIT
# Copyright (c) 2026 Benjamin Antieau and Deven Manam
"""Lift a simple square root from F_5 to fixed-precision Z_5."""
from noether.commalg import PolynomialRing
from noether.numthy import PadicRing
def main() -> None:
integers = PadicRing(5, absolute_precision=6)
polynomials = PolynomialRing(integers, ["x"])
x = polynomials.generator("x")
equation = x**2 - 6
root = integers.hensel_lift(equation, integers.residue_field(1))
assert equation.evaluate([root]) == integers.zero()
print(f"sqrt(6) in Z_5 mod 5^6 is represented by {int(root)}")
if __name__ == "__main__":
main()
Run it with .venv/bin/python examples/10_padic_hensel_lifting.py.
numthy.PadicRing¶
Fixed-cap p-adic integers known modulo p^N.
noether::numthy::PadicRing · 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/PadicRing@1 |
Executable usage: examples/10_padic_hensel_lifting.py:10 · examples/10_padic_hensel_lifting.py:6 · validation/unit/commalg/test_acceptance_workload.py:21 · validation/unit/commalg/test_acceptance_workload.py:26 · validation/unit/commalg/test_context_tower_workload.py:24 · validation/unit/commalg/test_context_tower_workload.py:35
numthy.PadicRing.__call__¶
Coerce the supplied input through this context or mathematical map.
noether::numthy::PadicRing · 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/PadicRing@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.PadicRing.absolute_precision¶
Return the absolute precision recorded by this PadicRing.
Detailed contract
Immutable absolute precision cap N.
noether::numthy::PadicRing::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/PadicRing@1 |
Executable usage: examples/10_padic_hensel_lifting.py:10 · examples/11_qadic_witt_vectors.py:10 · examples/31_local_fields_and_precision.py:11 · validation/unit/commalg/test_acceptance_workload.py:26 · validation/unit/commalg/test_acceptance_workload.py:27 · validation/unit/commalg/test_context_tower_workload.py:111
numthy.PadicRing.coefficient_frobenius¶
Compute coefficient frobenius for this PadicRing.
Detailed contract
Checked coefficient Frobenius power, the identity on Z_p coefficients.
noether::numthy::PadicRing::coefficient_frobenius · 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/PadicRing@1 |
Executable usage: validation/unit/commalg/test_power_series_facade.py:279 · validation/unit/commalg/test_power_series_facade.py:286 · validation/unit/numthy/test_padic_field_facade.py:109 · validation/unit/numthy/test_padic_ring_facade.py:132 · validation/unit/numthy/test_padic_ring_facade.py:138 · validation/unit/numthy/test_qadic_field_facade.py:125
numthy.PadicRing.divide_uniformizer_exact¶
Compute divide uniformizer exact for this PadicRing.
Detailed contract
Divide by p^exponent, requiring the quotient to remain integral.
noether::numthy::PadicRing::divide_uniformizer_exact · 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/PadicRing@1 |
Executable usage: validation/unit/numthy/test_padic_field_facade.py:100 · validation/unit/numthy/test_padic_ring_facade.py:147 · validation/unit/numthy/test_padic_ring_facade.py:153 · validation/unit/numthy/test_qadic_field_facade.py:92 · validation/unit/numthy/test_qadic_ring_facade.py:84 · validation/unit/numthy/test_qadic_ring_facade.py:89
numthy.PadicRing.from_json¶
Deserialize and revalidate a fixed-precision p-adic ring context.
noether::numthy::PadicRing::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/PadicRing@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.PadicRing.hensel_lift¶
Lift a verified simple residue root to the full fixed precision.
Detailed contract
Lift a simple root modulo p to a root at this context’s full precision. The polynomial must be univariate over this exact PadicRing, the supplied value must be a root in its residue field, and the derivative must be nonzero there. The returned value is checked to annihilate the polynomial modulo p^N; unmet hypotheses fail closed.
noether::numthy::PadicRing::hensel_lift · 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/PadicRing@1 |
Executable usage: examples/10_padic_hensel_lifting.py:14 · validation/unit/commalg/test_context_tower_workload.py:107 · validation/unit/infra/test_public_api_index.py:163 · validation/unit/numthy/test_padic_ring_facade.py:162 · validation/unit/numthy/test_padic_ring_facade.py:175 · validation/unit/numthy/test_padic_ring_facade.py:177
numthy.PadicRing.inverse¶
Compute inverse for this PadicRing.
noether::numthy::PadicRing · 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/PadicRing@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.PadicRing.modulus¶
Return the modulus recorded by this PadicRing.
Detailed contract
Storage modulus p^N; every element has a representative in [0, p^N), giving the promised per-element coefficient bound.
noether::numthy::PadicRing::modulus · 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/PadicRing@1 |
Executable usage: validation/unit/commalg/test_context_tower_workload.py:87 · validation/unit/commalg/test_residue_ring_facade.py:101 · validation/unit/commalg/test_residue_ring_facade.py:105 · validation/unit/commalg/test_residue_ring_facade.py:110 · validation/unit/commalg/test_residue_ring_facade.py:128 · validation/unit/commalg/test_residue_ring_facade.py:141
numthy.PadicRing.one¶
Compute one for this PadicRing.
noether::numthy::PadicRing::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/PadicRing@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.PadicRing.precision_restriction¶
Compute precision restriction for this PadicRing.
Detailed contract
Construct a first-class restriction to a coarser fixed-cap ring.
noether::numthy::PadicRing::precision_restriction · 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/PadicRing@1 |
Executable usage: examples/31_local_fields_and_precision.py:30 · validation/unit/commalg/test_power_series_facade.py:319 · validation/unit/homalg/test_padic_homology_facade.py:204 · validation/unit/numthy/test_padic_field_facade.py:58 · validation/unit/numthy/test_padic_field_facade.py:78 · validation/unit/numthy/test_padic_local_field_facade.py:101
numthy.PadicRing.prime¶
Return the prime recorded by this PadicRing.
Detailed contract
Residue characteristic p.
noether::numthy::PadicRing::prime · 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/PadicRing@1 |
Executable usage: examples/07_integer_factorization.py:12 · examples/12_number_field_ideals.py:16 · examples/12_number_field_ideals.py:19 · examples/18_finite_field_schemes.py:10 · examples/24_homology_and_persistence.py:22 · examples/33_simplicial_cohomology_operations.py:24
numthy.PadicRing.residue¶
Compute residue for this PadicRing.
Detailed contract
Reduce a p-adic integer to its prime residue field.
noether::numthy::PadicRing::residue · 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/PadicRing@1 |
Executable usage: examples/11_qadic_witt_vectors.py:11 · examples/11_qadic_witt_vectors.py:12 · examples/11_qadic_witt_vectors.py:13 · examples/11_qadic_witt_vectors.py:15 · examples/13_chinese_remainder_theorem.py:3 · examples/31_local_fields_and_precision.py:10
numthy.PadicRing.residue_field¶
Return the residue field recorded by this PadicRing.
Detailed contract
Prime residue field F_p.
noether::numthy::PadicRing::residue_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/PadicRing@1 |
Executable usage: examples/10_padic_hensel_lifting.py:14 · examples/11_qadic_witt_vectors.py:10 · examples/11_qadic_witt_vectors.py:11 · examples/11_qadic_witt_vectors.py:14 · examples/11_qadic_witt_vectors.py:9 · validation/unit/commalg/test_acceptance_workload.py:25
numthy.PadicRing.restrict¶
Compute restrict for this PadicRing.
Detailed contract
Discard high p-adic digits explicitly, producing a value in the distinct context (p, requested_absolute_precision).
noether::numthy::PadicRing::restrict · 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/PadicRing@1 |
Executable usage: validation/unit/commalg/test_local_algebra.py:93 · validation/unit/groups/test_weight_characters.py:48 · validation/unit/numthy/test_padic_local_field_facade.py:100 · validation/unit/numthy/test_padic_ring_facade.py:62 · validation/unit/numthy/test_qadic_ring_facade.py:48
numthy.PadicRing.teichmuller¶
Compute teichmuller for this PadicRing.
Detailed contract
Lift a residue-field element to its Teichmüller representative modulo p^N, characterized by [a]^p = [a] and [a] mod p = a.
noether::numthy::PadicRing::teichmuller · 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/PadicRing@1 |
Executable usage: examples/11_qadic_witt_vectors.py:12 · validation/unit/commalg/test_acceptance_workload.py:33 · validation/unit/commalg/test_acceptance_workload.py:38 · validation/unit/commalg/test_context_tower_workload.py:101 · validation/unit/commalg/test_context_tower_workload.py:113 · validation/unit/infra/test_public_api_index.py:164
numthy.PadicRing.to_json¶
Serialize the fixed prime and absolute precision as canonical typed JSON.
noether::numthy::PadicRing::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/PadicRing@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.PadicRing.zero¶
Compute zero for this PadicRing.
noether::numthy::PadicRing::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/PadicRing@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