commalg · LocalPolynomial¶
14 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.LocalPolynomial¶
One exact fraction in a polynomial local ring.
noether::commalg::LocalPolynomial · 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/LocalPolynomial@1 |
Executable usage: validation/unit/commalg/test_local_algebra.py:11 · validation/unit/commalg/test_local_algebra.py:35
commalg.LocalPolynomial.__add__¶
Add another compatible value to this value.
Detailed contract
Returns the argument unchanged.
noether::commalg::LocalPolynomial::add · 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/LocalPolynomial@1 |
Executable usage: validation/unit/infra/test_discovery.py:211 · validation/unit/infra/test_public_api_index.py:293
commalg.LocalPolynomial.__mul__¶
Multiply this value by another compatible value.
noether::commalg::LocalPolynomial::mul · 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/LocalPolynomial@1 |
Executable usage: validation/unit/infra/test_public_api_index.py:214
commalg.LocalPolynomial.__neg__¶
Return the additive inverse of this value.
noether::commalg::LocalPolynomial::neg · 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/LocalPolynomial@1 |
commalg.LocalPolynomial.__sub__¶
Subtract another compatible value from this value.
noether::commalg::LocalPolynomial::sub · 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/LocalPolynomial@1 |
Executable usage: validation/unit/infra/test_discovery.py:212
commalg.LocalPolynomial.__truediv__¶
Divide this value by another compatible value.
noether::commalg::LocalPolynomial · Python projection
| 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/LocalPolynomial@1 |
commalg.LocalPolynomial.denominator¶
Return the denominator recorded by this LocalPolynomial.
Detailed contract
Canonical denominator, which has nonzero constant term.
noether::commalg::LocalPolynomial::denominator · 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/LocalPolynomial@1 |
Executable usage: validation/unit/commalg/test_curve_facade.py:51 · validation/unit/commalg/test_curve_facade.py:52 · validation/unit/commalg/test_curve_facade.py:93 · validation/unit/commalg/test_curve_facade.py:96 · validation/unit/commalg/test_local_algebra.py:30 · validation/unit/commalg/test_local_algebra.py:46
commalg.LocalPolynomial.from_json¶
Deserialize and revalidate a LocalPolynomial from typed JSON.
Detailed contract
Deserialize and revalidate a reduced local fraction.
noether::commalg::LocalPolynomial::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/LocalPolynomial@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.LocalPolynomial.inverse¶
Compute inverse for this LocalPolynomial.
Detailed contract
Invert a local unit.
noether::commalg::LocalPolynomial::inverse · 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/LocalPolynomial@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
commalg.LocalPolynomial.is_unit¶
Test whether this LocalPolynomial is unit.
Detailed contract
Whether this fraction is a unit in the local ring.
noether::commalg::LocalPolynomial::is_unit · 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/LocalPolynomial@1 |
Executable usage: validation/unit/commalg/test_local_algebra.py:44 · validation/unit/commalg/test_local_algebra.py:59 · validation/unit/commalg/test_prime_localization.py:25 · validation/unit/commalg/test_prime_localization.py:26 · validation/unit/commalg/test_prime_localization.py:47 · validation/unit/commalg/test_quotient_facade.py:51
commalg.LocalPolynomial.is_zero¶
Test whether this LocalPolynomial is zero.
Detailed contract
Whether this fraction is zero.
noether::commalg::LocalPolynomial::is_zero · 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/LocalPolynomial@1 |
Executable usage: examples/17_weighted_power_series.py:16 · examples/17_weighted_power_series.py:17 · examples/39_kahler_differentials.py:20 · validation/unit/commalg/test_graded_commutative_facade.py:26 · validation/unit/commalg/test_kahler_differentials.py:113 · validation/unit/commalg/test_kahler_differentials.py:38
commalg.LocalPolynomial.numerator¶
Return the numerator recorded by this LocalPolynomial.
Detailed contract
Canonical numerator in translated coordinates.
noether::commalg::LocalPolynomial::numerator · 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/LocalPolynomial@1 |
Executable usage: validation/unit/commalg/test_curve_facade.py:51 · validation/unit/commalg/test_curve_facade.py:52 · validation/unit/commalg/test_curve_facade.py:93 · validation/unit/commalg/test_curve_facade.py:95 · validation/unit/commalg/test_local_algebra.py:29 · validation/unit/commalg/test_monomial_ideal_facade.py:86
commalg.LocalPolynomial.ring¶
Return the ring recorded by this LocalPolynomial.
Detailed contract
Exact local-ring context.
noether::commalg::LocalPolynomial::ring · 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/LocalPolynomial@1 |
Executable usage: examples/11_qadic_witt_vectors.py:3 · examples/13_chinese_remainder_theorem.py:10 · examples/13_chinese_remainder_theorem.py:12 · examples/13_chinese_remainder_theorem.py:9 · examples/14_weighted_polynomials.py:10 · examples/14_weighted_polynomials.py:11
commalg.LocalPolynomial.to_json¶
Serialize this LocalPolynomial to its canonical typed JSON representation.
Detailed contract
Serialize a canonical reduced local fraction.
noether::commalg::LocalPolynomial::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/LocalPolynomial@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