commalg · PolynomialFactorization¶
8 accepted declarations. Python and Rust forms, contracts, evidence, failure boundaries, and checked usages are kept together below.
Worked example¶
The complete checked program Calculate in a fixed-cap multivariate weighted power-series ring uses this API directly.
# SPDX-License-Identifier: MIT
# Copyright (c) 2026 Benjamin Antieau and Deven Manam
"""Calculate in a fixed-cap multivariate weighted power-series ring."""
from noether import Z
from noether.commalg import PowerSeriesRing, SeriesTruncation
def main() -> None:
ring = PowerSeriesRing(
Z,
["x", "y", "z"],
SeriesTruncation.weighted_degree([1, 2, 3], 6),
)
x, y, z = ring.generators()
assert (x**6).is_zero()
assert not (x**2 * z + y * z).is_zero()
value = (1 + x + y).pow(4)
print(f"{value}; coefficient capacity <= {ring.coefficient_capacity_bound()}")
if __name__ == "__main__":
main()
Run it with .venv/bin/python examples/17_weighted_power_series.py.
commalg.PolynomialFactorization¶
Canonical complete factorization of one supported polynomial.
noether::commalg::PolynomialFactorization · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel |
| GIL | attached / bounded |
| Semantic ID | noether/commalg/PolynomialFactorization@1 |
Executable usage: validation/unit/commalg/test_polynomial_facade.py:122 · validation/unit/commalg/test_polynomial_facade.py:123 · validation/unit/commalg/test_polynomial_facade.py:129 · validation/unit/commalg/test_polynomial_facade.py:15 · validation/unit/commalg/test_polynomial_facade.py:161
commalg.PolynomialFactorization.coefficient¶
Return the coefficient recorded by this PolynomialFactorization.
Detailed contract
Signed content over Z, or normalized leading scalar over a field.
noether::commalg::PolynomialFactorization::coefficient · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel |
| GIL | attached / bounded |
| Semantic ID | noether/commalg/PolynomialFactorization@1 |
Executable usage: examples/17_weighted_power_series.py:19 · examples/22_matroids_and_tutte.py:11 · examples/22_matroids_and_tutte.py:12 · examples/22_matroids_and_tutte.py:13 · examples/33_simplicial_cohomology_operations.py:31 · validation/unit/combin/test_acceptance_workload.py:45
commalg.PolynomialFactorization.factors¶
Return the factors recorded by this PolynomialFactorization.
Detailed contract
Deterministically ordered irreducible factors and positive multiplicities.
noether::commalg::PolynomialFactorization::factors · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel |
| GIL | attached / bounded |
| Semantic ID | noether/commalg/PolynomialFactorization@1 |
Executable usage: examples/04_smith_normal_form.py:17 · examples/07_integer_factorization.py:12 · validation/unit/commalg/test_context_tower_workload.py:87 · validation/unit/commalg/test_polynomial_facade.py:126 · validation/unit/commalg/test_polynomial_facade.py:147 · validation/unit/commalg/test_polynomial_facade.py:158
commalg.PolynomialFactorization.from_json¶
Deserialize and revalidate a PolynomialFactorization from typed JSON.
Detailed contract
Deserialize and recompute the canonical integer-polynomial factorization. Deserialize and recompute the canonical rational-polynomial factorization. Deserialize and recompute the canonical finite-field factorization.
noether::commalg::PolynomialFactorization::from_json · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel |
| GIL | attached / bounded |
| Semantic ID | noether/commalg/PolynomialFactorization@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
commalg.PolynomialFactorization.source¶
Return the source recorded by this PolynomialFactorization.
Detailed contract
Polynomial whose canonical factorization is recorded.
noether::commalg::PolynomialFactorization::source · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel |
| GIL | attached / bounded |
| Semantic ID | noether/commalg/PolynomialFactorization@1 |
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
commalg.PolynomialFactorization.to_json¶
Serialize this PolynomialFactorization to its canonical typed JSON representation.
Detailed contract
Serialize the source and its canonical exact factors as typed JSON.
noether::commalg::PolynomialFactorization::to_json · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel |
| GIL | attached / bounded |
| Semantic ID | noether/commalg/PolynomialFactorization@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
commalg.PolynomialFactorization.value¶
Return the value recorded by this PolynomialFactorization.
Detailed contract
Reconstruct the exact represented polynomial.
noether::commalg::PolynomialFactorization::value · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel |
| GIL | attached / bounded |
| Semantic ID | noether/commalg/PolynomialFactorization@1 |
Executable usage: examples/09_finite_field_isomorphisms.py:13 · examples/09_finite_field_isomorphisms.py:14 · examples/13_chinese_remainder_theorem.py:12 · examples/13_chinese_remainder_theorem.py:13 · examples/13_chinese_remainder_theorem.py:14 · examples/17_weighted_power_series.py:18
commalg.PolynomialFactorization.verify¶
Replay and verify the mathematical evidence carried by this PolynomialFactorization.
Detailed contract
Verify exact reconstruction of the source polynomial.
noether::commalg::PolynomialFactorization::verify · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel |
| GIL | attached / bounded |
| Semantic ID | noether/commalg/PolynomialFactorization@1 |
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