commalg · SeriesTruncation¶
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.SeriesTruncation¶
One valid finite monomial region, fixed before series allocation.
noether::commalg::SeriesTruncation · 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/SeriesTruncation@1 |
Executable usage: examples/17_weighted_power_series.py:13 · examples/17_weighted_power_series.py:6 · validation/unit/commalg/test_acceptance_workload.py:118 · validation/unit/commalg/test_acceptance_workload.py:19 · validation/unit/commalg/test_acceptance_workload.py:28 · validation/unit/commalg/test_acceptance_workload.py:52
commalg.SeriesTruncation.bound¶
Return the bound recorded by this SeriesTruncation.
Detailed contract
Single strict bound for univariate, total-degree, or weighted-degree truncation; None for a box.
noether::commalg::SeriesTruncation::bound · 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/SeriesTruncation@1 |
Executable usage: validation/unit/commalg/test_power_series_facade.py:223 · validation/unit/commalg/test_power_series_facade.py:25 · validation/unit/commalg/test_power_series_facade.py:55 · validation/unit/commalg/test_scheme_facade.py:264 · validation/unit/groups/test_weight_characters.py:65 · validation/unit/infra/test_concurrency.py:83
commalg.SeriesTruncation.bounds¶
Return the bounds recorded by this SeriesTruncation.
Detailed contract
Per-variable strict bounds for a box truncation.
noether::commalg::SeriesTruncation::bounds · 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/SeriesTruncation@1 |
Executable usage: validation/unit/commalg/test_power_series_facade.py:36 · validation/unit/homalg/test_padic_homology_facade.py:72 · validation/bench/macaulay2_normalization.py:416 · validation/bench/macaulay2_normalization.py:430 · validation/bench/macaulay2_normalization.py:432 · validation/corpus/numthy/hodge-chern-orders.py:3
commalg.SeriesTruncation.box_bounds¶
Construct a SeriesTruncation using box bounds.
Detailed contract
Retain exponent vectors satisfying exponent[i] < bounds[i].
noether::commalg::SeriesTruncation::box_bounds · 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/SeriesTruncation@1 |
Executable usage: validation/unit/commalg/test_polynomial_facade.py:311 · validation/unit/commalg/test_power_series_facade.py:35 · validation/unit/commalg/test_power_series_facade.py:47 · validation/unit/commalg/test_power_series_facade.py:54
commalg.SeriesTruncation.contains_exponent¶
Compute contains exponent for this SeriesTruncation.
Detailed contract
Whether this truncation retains the supplied exponent vector.
noether::commalg::SeriesTruncation::contains_exponent · 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/SeriesTruncation@1 |
Executable usage: validation/unit/commalg/test_context_tower_workload.py:130 · validation/unit/commalg/test_power_series_facade.py:26 · validation/unit/commalg/test_power_series_facade.py:27 · validation/unit/commalg/test_power_series_facade.py:277 · validation/unit/commalg/test_power_series_facade.py:32 · validation/unit/commalg/test_power_series_facade.py:33
commalg.SeriesTruncation.from_json¶
Deserialize and revalidate a finite monomial region.
noether::commalg::SeriesTruncation::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/SeriesTruncation@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.SeriesTruncation.graded¶
Construct a SeriesTruncation using graded.
Detailed contract
Retain exponent vectors whose degree in grading is less than bound.
noether::commalg::SeriesTruncation::graded · 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/SeriesTruncation@1 |
Executable usage: validation/unit/commalg/test_construction_algebras.py:62 · validation/unit/commalg/test_construction_algebras.py:69 · validation/unit/commalg/test_construction_algebras.py:70 · validation/unit/commalg/test_construction_algebras.py:71 · validation/unit/commalg/test_construction_algebras.py:72 · validation/unit/commalg/test_construction_algebras.py:74
commalg.SeriesTruncation.mode¶
Return the mode recorded by this SeriesTruncation.
Detailed contract
Structural family of this truncation.
noether::commalg::SeriesTruncation::mode · 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/SeriesTruncation@1 |
Executable usage: validation/unit/commalg/test_power_series_facade.py:218 · validation/unit/commalg/test_power_series_facade.py:24 · validation/unit/infra/test_macaulay2_benchmark_protocol.py:346 · validation/unit/infra/test_macaulay2_benchmark_protocol.py:361 · validation/unit/infra/test_macaulay2_benchmark_protocol.py:370 · validation/unit/infra/test_macaulay2_benchmark_protocol.py:392
commalg.SeriesTruncation.refines¶
Compute refines for this SeriesTruncation.
Detailed contract
Whether self contains at least every coefficient position retained by reference. Policies of different structural families are deliberately incomparable.
noether::commalg::SeriesTruncation::refines · 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/SeriesTruncation@1 |
Executable usage: validation/unit/commalg/test_power_series_facade.py:28
commalg.SeriesTruncation.to_json¶
Serialize the exact finite monomial region as canonical typed JSON.
noether::commalg::SeriesTruncation::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/SeriesTruncation@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.SeriesTruncation.total_degree¶
Construct a SeriesTruncation using total degree.
Detailed contract
Retain exponent vectors whose total degree is less than bound.
noether::commalg::SeriesTruncation::total_degree · 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/SeriesTruncation@1 |
Executable usage: validation/unit/commalg/test_acceptance_workload.py:118 · validation/unit/commalg/test_power_series_facade.py:167 · validation/unit/commalg/test_power_series_facade.py:193 · validation/unit/commalg/test_power_series_facade.py:40 · validation/unit/commalg/test_power_series_facade.py:46 · validation/unit/commalg/test_scheme_facade.py:260
commalg.SeriesTruncation.univariate¶
Construct a SeriesTruncation using univariate.
Detailed contract
Retain one-variable powers x^e with e < precision.
noether::commalg::SeriesTruncation::univariate · 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/SeriesTruncation@1 |
Executable usage: validation/unit/commalg/test_polynomial_facade.py:292 · validation/unit/commalg/test_polynomial_facade.py:293 · validation/unit/commalg/test_polynomial_facade.py:294 · validation/unit/commalg/test_polynomial_facade.py:295 · validation/unit/commalg/test_power_series_facade.py:121 · validation/unit/commalg/test_power_series_facade.py:135
commalg.SeriesTruncation.weighted_degree¶
Construct a SeriesTruncation using weighted degree.
Detailed contract
Retain exponent vectors of weighted degree less than bound.
noether::commalg::SeriesTruncation::weighted_degree · 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/SeriesTruncation@1 |
Executable usage: examples/17_weighted_power_series.py:13 · validation/unit/commalg/test_acceptance_workload.py:28 · validation/unit/commalg/test_acceptance_workload.py:52 · validation/unit/commalg/test_context_tower_workload.py:124 · validation/unit/commalg/test_context_tower_workload.py:142 · validation/unit/commalg/test_context_tower_workload.py:48
commalg.SeriesTruncation.weights¶
Return the weights recorded by this SeriesTruncation.
Detailed contract
Per-variable weights for weighted-degree truncation.
noether::commalg::SeriesTruncation::weights · 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/SeriesTruncation@1 |
Executable usage: examples/23_kashiwara_crystals.py:16 · validation/unit/commalg/test_polynomial_facade.py:330 · validation/unit/commalg/test_polynomial_facade.py:435 · validation/unit/commalg/test_power_series_facade.py:111 · validation/unit/commalg/test_power_series_facade.py:115 · validation/unit/commalg/test_power_series_facade.py:221