numthy · QadicField¶
22 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.QadicField¶
A fixed-precision unramified p-adic model, with inversion but without exact-field claims.
noether::numthy::QadicField · 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/QadicField@1 |
Executable usage: validation/unit/commalg/test_context_tower_workload.py:120 · validation/unit/commalg/test_context_tower_workload.py:26 · validation/unit/commalg/test_context_tower_workload.py:38 · validation/unit/commalg/test_context_tower_workload.py:58 · validation/unit/commalg/test_polynomial_facade.py:28 · validation/unit/commalg/test_polynomial_facade.py:355
numthy.QadicField.__call__¶
Coerce the supplied input through this context or mathematical map.
noether::numthy::QadicField · 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/QadicField@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.QadicField.absolute_precision¶
Return the absolute precision recorded by this QadicField.
Detailed contract
Immutable absolute precision cap N.
noether::numthy::QadicField::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/QadicField@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.QadicField.coefficient_field¶
Return the coefficient field recorded by this QadicField.
Detailed contract
Base field Q_p supplying the power-basis coefficients.
noether::numthy::QadicField::coefficient_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/QadicField@1 |
Executable usage: validation/unit/linalg/test_semilinear_facade.py:53 · validation/unit/numthy/test_padic_local_field_facade.py:49 · validation/unit/numthy/test_padic_local_field_facade.py:78 · validation/unit/numthy/test_qadic_field_facade.py:145 · validation/unit/numthy/test_qadic_field_facade.py:146 · validation/unit/numthy/test_qadic_field_facade.py:31
numthy.QadicField.coefficient_frobenius¶
Compute coefficient frobenius for this QadicField.
Detailed contract
Checked lift of residue-field Frobenius on this unramified field.
noether::numthy::QadicField::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/QadicField@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.QadicField.divide_uniformizer_exact¶
Compute divide uniformizer exact for this QadicField.
Detailed contract
Divide by p^exponent and lower absolute precision by exponent.
noether::numthy::QadicField::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/QadicField@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.QadicField.element_from_coefficients¶
Compute element from coefficients for this QadicField.
Detailed contract
Construct an element from ascending Q_p coordinates in the declared q-adic power basis. Missing high coordinates are zero, and at most residue_degree coordinates may be supplied. Every coordinate must belong to this context’s exact coefficient field.
noether::numthy::QadicField::element_from_coefficients · 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/QadicField@1 |
Executable usage: examples/09_finite_field_isomorphisms.py:13 · validation/unit/commalg/test_base_change.py:92 · validation/unit/commalg/test_context_tower_workload.py:157 · validation/unit/linalg/test_semilinear_facade.py:37 · validation/unit/numthy/test_finite_field_facade.py:111 · validation/unit/numthy/test_finite_field_facade.py:144
numthy.QadicField.from_json¶
Deserialize and revalidate an unramified fixed-precision field context.
noether::numthy::QadicField::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/QadicField@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.QadicField.generator¶
Compute generator for this QadicField.
Detailed contract
Distinguished Teichmüller lift of the residue-field generator.
noether::numthy::QadicField::generator · 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/QadicField@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/10_padic_hensel_lifting.py:12
numthy.QadicField.integral_embedding¶
Compute integral embedding for this QadicField.
Detailed contract
Canonical embedding of this field’s fixed-cap Witt ring.
noether::numthy::QadicField::integral_embedding · 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/QadicField@1 |
Executable usage: validation/unit/commalg/test_power_series_facade.py:308 · validation/unit/numthy/test_padic_field_facade.py:59 · validation/unit/numthy/test_padic_field_facade.py:77 · validation/unit/numthy/test_qadic_field_facade.py:102 · validation/unit/numthy/test_qadic_field_facade.py:78
numthy.QadicField.integral_ring¶
Return the integral ring recorded by this QadicField.
Detailed contract
Fixed-cap Witt ring canonically embedded in this field context.
noether::numthy::QadicField::integral_ring · 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/QadicField@1 |
Executable usage: validation/unit/numthy/test_padic_field_facade.py:66 · validation/unit/numthy/test_qadic_field_facade.py:85
numthy.QadicField.inverse¶
Compute inverse for this QadicField.
Detailed contract
Invert a value that is nonzero at the available precision. This is finite-precision arithmetic, not a proof that the represented value is nonzero in the complete unramified field. Consequently QadicField deliberately does not implement the exact crate::Field trait.
noether::numthy::QadicField::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/QadicField@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.QadicField.one¶
Compute one for this QadicField.
noether::numthy::QadicField::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/QadicField@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.QadicField.precision_restriction¶
Compute precision restriction for this QadicField.
Detailed contract
Construct a first-class restriction to a coarser fixed-cap field.
noether::numthy::QadicField::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/QadicField@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.QadicField.prime¶
Return the prime recorded by this QadicField.
Detailed contract
Residue characteristic p.
noether::numthy::QadicField::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/QadicField@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.QadicField.residue¶
Compute residue for this QadicField.
Detailed contract
Reduce an integral value to F_q; nonintegral values have no residue.
noether::numthy::QadicField::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/QadicField@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.QadicField.residue_degree¶
Return the residue degree recorded by this QadicField.
Detailed contract
Residue degree [F_q : F_p].
noether::numthy::QadicField::residue_degree · 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/QadicField@1 |
Executable usage: validation/unit/numthy/test_acceptance_workload.py:59 · validation/unit/numthy/test_acceptance_workload.py:68 · validation/unit/numthy/test_acceptance_workload.py:69 · validation/unit/numthy/test_acceptance_workload.py:72 · validation/unit/numthy/test_number_field_facade.py:213 · validation/unit/numthy/test_number_field_facade.py:234
numthy.QadicField.residue_field¶
Return the residue field recorded by this QadicField.
Detailed contract
Residue field F_q, including its normalized defining presentation.
noether::numthy::QadicField::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/QadicField@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.QadicField.restrict¶
Compute restrict for this QadicField.
Detailed contract
Explicitly discard high p-adic digits into a distinct field context.
noether::numthy::QadicField::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/QadicField@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.QadicField.teichmuller¶
Compute teichmuller for this QadicField.
Detailed contract
Lift a residue-field value to its Teichmüller representative.
noether::numthy::QadicField::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/QadicField@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.QadicField.to_json¶
Serialize the verified residue-field presentation and precision.
Detailed contract
Serialize the residue-field presentation and absolute precision as typed JSON.
noether::numthy::QadicField::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/QadicField@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.QadicField.zero¶
Compute zero for this QadicField.
noether::numthy::QadicField::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/QadicField@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