homalg · PadicChainCancellation¶
5 accepted declarations. Python and Rust forms, contracts, evidence, failure boundaries, and checked usages are kept together below.
Worked example¶
The complete checked program Decompose a polynomial by a nonstandard positive grading uses this API directly.
# SPDX-License-Identifier: MIT
# Copyright (c) 2026 Benjamin Antieau and Deven Manam
"""Decompose a polynomial by a nonstandard positive grading."""
from noether import Z
from noether.commalg import PolynomialRing, WeightedGrading
def main() -> None:
ring = PolynomialRing(Z, ["x", "y", "z"], grading=WeightedGrading([1, 2, 3]))
x, y, z = ring.generators()
sparse = ring.from_terms([([0, 0, 0], 1), ([2, 0, 0], 1), ([0, 1, 0], 1)])
polynomial = sparse + z
assert sparse * (x + y) == (1 + x**2 + y) * (x + y)
components = polynomial.homogeneous_components()
assert [degree for degree, _ in components] == [0, 2, 3]
assert x**2 + y == components[1][1]
print(f"weighted homogeneous degrees: {[degree for degree, _ in components]}")
if __name__ == "__main__":
main()
Run it with .venv/bin/python examples/14_weighted_polynomials.py.
homalg.PadicChainCancellation¶
One certified p-adic-unit pivot removed from a based complex.
noether::homalg::PadicChainCancellation · 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:13 · validation/unit/homalg/test_padic_homology_facade.py:238
homalg.PadicChainCancellation.column¶
Return the column recorded by this PadicChainCancellation.
Detailed contract
Current matrix column of the pivot.
noether::homalg::PadicChainCancellation::column · 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:85 · validation/unit/homalg/test_chain_complex.py:88 · validation/unit/homalg/test_exterior_algebra.py:464 · validation/unit/infra/test_concurrency.py:150 · validation/unit/infra/test_concurrency.py:71 · validation/unit/infra/test_macaulay2_benchmark_protocol.py:434
homalg.PadicChainCancellation.degree¶
Return the degree recorded by this PadicChainCancellation.
Detailed contract
Displayed differential degree at the time of cancellation.
noether::homalg::PadicChainCancellation::degree · 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/14_weighted_polynomials.py:16 · examples/14_weighted_polynomials.py:18 · examples/15_groebner_twisted_cubic.py:15 · examples/15_groebner_twisted_cubic.py:28 · examples/31_local_fields_and_precision.py:37 · examples/33_simplicial_cohomology_operations.py:26
homalg.PadicChainCancellation.pivot¶
Return the pivot recorded by this PadicChainCancellation.
Detailed contract
Valuation-zero coefficient used as the contractible pivot.
noether::homalg::PadicChainCancellation::pivot · 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:239 · validation/unit/homalg/test_padic_homology_facade.py:240 · validation/bench/macaulay2_derived.py:625 · validation/bench/macaulay2_derived.py:626 · validation/bench/macaulay2_derived.py:628 · validation/bench/macaulay2_normalization.py:328
homalg.PadicChainCancellation.row¶
Return the row recorded by this PadicChainCancellation.
Detailed contract
Current matrix row of the pivot.
noether::homalg::PadicChainCancellation::row · 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/commalg/test_residue_ring_facade.py:64 · validation/unit/groups/test_acceptance_workload.py:152 · validation/unit/homalg/test_chain_complex.py:85 · validation/unit/homalg/test_chain_complex.py:88 · validation/unit/homalg/test_exterior_algebra.py:464 · validation/unit/homalg/test_finite_group_cohomology.py:245