homalg · PadicChainReduction¶
6 accepted declarations. Python and Rust forms, contracts, evidence, failure boundaries, and checked usages are kept together below.
Worked example¶
The complete checked program Reduce and specialize an exact rational function uses this API directly.
# SPDX-License-Identifier: MIT
# Copyright (c) 2026 Benjamin Antieau and Deven Manam
"""Reduce and specialize an exact rational function."""
from fractions import Fraction
from noether import Q
from noether.commalg import RationalFunctionField
def main() -> None:
functions = RationalFunctionField(Q, "x")
x = functions.polynomial_ring.generator("x")
reduced = functions.fraction(x**2 - 1, x - 1)
assert reduced == functions(x + 1)
assert (reduced + Fraction(1, 2)).specialize(2) == Fraction(7, 2)
print(f"(x^2-1)/(x-1) = {reduced}")
if __name__ == "__main__":
main()
Run it with .venv/bin/python examples/16_rational_functions.py.
homalg.PadicChainReduction¶
Replayable algebraic Morse reduction by certified p-adic units.
noether::homalg::PadicChainReduction · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core, groebner-kernel, m4rst, m4rste, module-core, resolution-kernel, sparla |
| GIL | attached / bounded |
Executable usage: validation/unit/homalg/test_padic_homology_facade.py:14 · validation/unit/homalg/test_padic_homology_facade.py:234
homalg.PadicChainReduction.cancellations¶
Return the cancellations recorded by this PadicChainReduction.
Detailed contract
P-adic-unit cancellations in replay order.
noether::homalg::PadicChainReduction::cancellations · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core, groebner-kernel, m4rst, m4rste, module-core, resolution-kernel, sparla |
| GIL | attached / bounded |
Executable usage: validation/unit/homalg/test_chain_complex.py:82 · validation/unit/homalg/test_chain_complex.py:83 · validation/unit/homalg/test_padic_homology_facade.py:238 · validation/unit/homalg/test_padic_homology_facade.py:239 · validation/unit/homalg/test_padic_homology_facade.py:240 · validation/unit/homalg/test_padic_homology_facade.py:270
homalg.PadicChainReduction.reduced¶
Return the reduced recorded by this PadicChainReduction.
Detailed contract
Chain-homotopy-equivalent reduced p-adic complex.
noether::homalg::PadicChainReduction::reduced · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core, groebner-kernel, m4rst, m4rste, module-core, resolution-kernel, sparla |
| GIL | attached / bounded |
Executable usage: examples/16_rational_functions.py:14 · examples/16_rational_functions.py:15 · examples/16_rational_functions.py:16 · examples/16_rational_functions.py:17 · examples/32_poset_core_and_morse.py:19 · examples/distributed/f2_linear_algebra.py:50
homalg.PadicChainReduction.removed_pairs¶
Return the removed pairs recorded by this PadicChainReduction.
Detailed contract
Number of contractible basis pairs removed.
noether::homalg::PadicChainReduction::removed_pairs · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core, groebner-kernel, m4rst, m4rste, module-core, resolution-kernel, sparla |
| GIL | attached / bounded |
Executable usage: validation/unit/homalg/test_chain_complex.py:79 · validation/unit/homalg/test_padic_homology_facade.py:231 · validation/unit/homalg/test_padic_homology_facade.py:236 · validation/unit/homalg/test_padic_homology_facade.py:254 · validation/unit/infra/test_concurrency.py:162 · validation/unit/topology/test_simplicial_set_facade.py:132
homalg.PadicChainReduction.source¶
Return the source recorded by this PadicChainReduction.
Detailed contract
Original based p-adic complex.
noether::homalg::PadicChainReduction::source · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core, groebner-kernel, m4rst, m4rste, module-core, resolution-kernel, sparla |
| GIL | attached / bounded |
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
homalg.PadicChainReduction.verify¶
Replay and verify the mathematical evidence carried by this PadicChainReduction.
Detailed contract
Replay every unit cancellation and recheck the reduced complex.
noether::homalg::PadicChainReduction::verify · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core, groebner-kernel, m4rst, m4rste, module-core, resolution-kernel, sparla |
| GIL | attached / bounded |
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