commalg · PowerSeries¶
28 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.PowerSeries¶
A sparse power series carrying its coefficient and truncation context.
noether::commalg::PowerSeries · 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/PowerSeries@1 |
Executable usage: validation/unit/commalg/test_acceptance_workload.py:14 · validation/unit/commalg/test_acceptance_workload.py:55 · validation/unit/commalg/test_context_tower_workload.py:80 · validation/unit/commalg/test_context_tower_workload.py:9 · validation/unit/commalg/test_power_series_facade.py:12 · validation/unit/commalg/test_power_series_facade.py:200
commalg.PowerSeries.__add__¶
Add another compatible value to this value.
Detailed contract
Returns the argument unchanged.
noether::commalg::PowerSeries::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 | released |
| Semantic ID | noether/commalg/PowerSeries@1 |
Executable usage: validation/unit/infra/test_discovery.py:211 · validation/unit/infra/test_public_api_index.py:293
commalg.PowerSeries.__mul__¶
Multiply this value by another compatible value.
noether::commalg::PowerSeries::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 | released |
| Semantic ID | noether/commalg/PowerSeries@1 |
Executable usage: validation/unit/infra/test_public_api_index.py:214
commalg.PowerSeries.__neg__¶
Return the additive inverse of this value.
noether::commalg::PowerSeries::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/PowerSeries@1 |
commalg.PowerSeries.__pow__¶
Raise this value to the supplied power.
noether::commalg::PowerSeries · 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/PowerSeries@1 |
commalg.PowerSeries.__radd__¶
Add this value to a compatible value on its left.
noether::commalg::PowerSeries · 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/PowerSeries@1 |
commalg.PowerSeries.__rmul__¶
Multiply this value by a compatible value on its left.
noether::commalg::PowerSeries · 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/PowerSeries@1 |
commalg.PowerSeries.__rsub__¶
Subtract this value from a compatible value on its left.
noether::commalg::PowerSeries · 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 | released |
| Semantic ID | noether/commalg/PowerSeries@1 |
commalg.PowerSeries.__sub__¶
Subtract another compatible value from this value.
noether::commalg::PowerSeries::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 | released |
| Semantic ID | noether/commalg/PowerSeries@1 |
Executable usage: validation/unit/infra/test_discovery.py:212
commalg.PowerSeries.coefficient¶
Compute coefficient for this PowerSeries.
Detailed contract
Coefficient at a retained exponent position. Asking beyond the context’s precision is an error, not a zero coefficient claim.
noether::commalg::PowerSeries::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/PowerSeries@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.PowerSeries.compose¶
Compose this PowerSeries with another compatible map.
Detailed contract
Substitute one image for each variable when the images preserve the truncation ideal.
noether::commalg::PowerSeries::compose · 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/PowerSeries@1 |
Executable usage: validation/unit/commalg/test_context_tower_workload.py:3 · validation/unit/commalg/test_polynomial_facade.py:200 · validation/unit/commalg/test_power_series_facade.py:151 · validation/unit/commalg/test_power_series_facade.py:245 · validation/unit/commalg/test_power_series_facade.py:248 · validation/unit/groups/test_permutation_group_facade.py:41
commalg.PowerSeries.constant_coefficient¶
Compute constant coefficient for this PowerSeries.
Detailed contract
Constant coefficient.
noether::commalg::PowerSeries::constant_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/PowerSeries@1 |
Executable usage: validation/unit/commalg/test_polynomial_facade.py:364 · validation/unit/commalg/test_polynomial_facade.py:371 · validation/unit/commalg/test_polynomial_ideal_facade.py:413 · validation/unit/commalg/test_power_series_facade.py:129 · validation/unit/commalg/test_power_series_facade.py:152 · validation/unit/commalg/test_power_series_facade.py:196
commalg.PowerSeries.derivative¶
Compute derivative for this PowerSeries.
Detailed contract
Formal derivative with respect to one variable.
noether::commalg::PowerSeries::derivative · 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/PowerSeries@1 |
Executable usage: validation/unit/commalg/test_polynomial_facade.py:216 · validation/unit/commalg/test_power_series_facade.py:134 · validation/unit/commalg/test_power_series_facade.py:135 · validation/unit/commalg/test_power_series_facade.py:136 · validation/unit/infra/test_macaulay2_benchmark_protocol.py:636 · validation/unit/numthy/test_padic_ring_facade.py:176
commalg.PowerSeries.exact_div¶
Compute exact div for this PowerSeries.
Detailed contract
Return the canonical exact quotient by a monomial times a unit series. Fixed truncation makes division by a nonunit nonunique: coefficients beyond the dividend’s retained region cannot be recovered. For a divisor x^a u, with u(0) a unit, this method chooses the unique quotient obtained by shifting the retained dividend by a, filling the newly unknown boundary coefficients with zero, and dividing by u. It verifies the result by multiplication in this exact quotient ring. More general divisors are rejected rather than choosing a hidden term order or quotient lift.
noether::commalg::PowerSeries::exact_div · 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/PowerSeries@1 |
Executable usage: validation/unit/commalg/test_polynomial_facade.py:451 · validation/unit/commalg/test_polynomial_facade.py:464 · validation/unit/commalg/test_polynomial_facade.py:483 · validation/unit/commalg/test_polynomial_facade.py:485 · validation/unit/commalg/test_polynomial_facade.py:497 · validation/unit/commalg/test_polynomial_facade.py:502
commalg.PowerSeries.frobenius_lift¶
Compute frobenius lift for this PowerSeries.
Detailed contract
Apply coefficient Frobenius and x_i -> x_i^(p^exponent) with early capping.
noether::commalg::PowerSeries::frobenius_lift · 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/PowerSeries@1 |
Executable usage: validation/unit/commalg/test_polynomial_facade.py:244 · validation/unit/commalg/test_power_series_facade.py:271 · validation/unit/commalg/test_power_series_facade.py:298 · validation/bench/sage_power_series.py:127
commalg.PowerSeries.from_json¶
Deserialize and revalidate a fixed-precision power series.
Detailed contract
Deserialize and revalidate the context, exponent region, and coefficients.
noether::commalg::PowerSeries::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/PowerSeries@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.PowerSeries.inverse¶
Compute inverse for this PowerSeries.
Detailed contract
Invert a series exactly when its constant coefficient is a unit.
noether::commalg::PowerSeries::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 | released |
| Semantic ID | noether/commalg/PowerSeries@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.PowerSeries.is_one¶
Test whether this PowerSeries is one.
Detailed contract
Whether this is the multiplicative identity in its context.
noether::commalg::PowerSeries::is_one · 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/PowerSeries@1 |
Executable usage: validation/unit/commalg/test_rational_function_facade.py:31 · validation/unit/commalg/test_residue_ring_facade.py:25 · validation/unit/numthy/test_number_field_facade.py:29 · validation/corpus/commalg/evolution-algebra-isomorphism.py:34 · validation/corpus/numthy/diagonal-quadric-local-density-sums.py:36
commalg.PowerSeries.is_zero¶
Test whether this PowerSeries is zero.
Detailed contract
Whether every retained coefficient is zero.
noether::commalg::PowerSeries::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/PowerSeries@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.PowerSeries.monomial_substitution¶
Compute monomial substitution for this PowerSeries.
Detailed contract
Substitute monomials and discard transformed terms outside the fixed cap.
noether::commalg::PowerSeries::monomial_substitution · 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/PowerSeries@1 |
Executable usage: validation/unit/commalg/test_polynomial_facade.py:247
commalg.PowerSeries.nonzero_term_count¶
Return the nonzero term count recorded by this PowerSeries.
Detailed contract
Number of stored nonzero coefficients.
noether::commalg::PowerSeries::nonzero_term_count · 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/PowerSeries@1 |
Executable usage: examples/27_weight_characters.py:26 · validation/unit/commalg/test_acceptance_workload.py:50 · validation/unit/commalg/test_acceptance_workload.py:52 · validation/unit/commalg/test_context_tower_workload.py:139 · validation/unit/commalg/test_context_tower_workload.py:142 · validation/unit/commalg/test_polynomial_facade.py:436
commalg.PowerSeries.pow¶
Raise a fixed-truncation series to a nonnegative integer power.
Detailed contract
Raise this series to a nonnegative power in its fixed context.
noether::commalg::PowerSeries::pow · 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 | released |
| Semantic ID | noether/commalg/PowerSeries@1 |
Executable usage: examples/17_weighted_power_series.py:18 · validation/unit/commalg/test_polynomial_ideal_facade.py:368 · validation/unit/commalg/test_polynomial_ideal_facade.py:369 · validation/unit/commalg/test_polynomial_ideal_facade.py:370 · validation/unit/commalg/test_polynomial_ideal_facade.py:373 · validation/unit/commalg/test_polynomial_ideal_facade.py:381
commalg.PowerSeries.restrict_truncation¶
Compute restrict truncation for this PowerSeries.
Detailed contract
Enter an explicitly coarser truncation context.
noether::commalg::PowerSeries::restrict_truncation · 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/PowerSeries@1 |
Executable usage: validation/unit/commalg/test_acceptance_workload.py:52 · validation/unit/commalg/test_context_tower_workload.py:142 · validation/unit/commalg/test_power_series_facade.py:138
commalg.PowerSeries.ring¶
Return the ring recorded by this PowerSeries.
Detailed contract
Exact power-series context carried by this value.
noether::commalg::PowerSeries::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/PowerSeries@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.PowerSeries.scalar_mul¶
Compute scalar mul for this PowerSeries.
Detailed contract
Multiply every coefficient by one value from the coefficient ring.
noether::commalg::PowerSeries::scalar_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/PowerSeries@1 |
Executable usage: validation/unit/commalg/test_intersection_theory.py:30 · validation/unit/commalg/test_intersection_theory.py:37 · validation/unit/commalg/test_intersection_theory.py:51 · validation/unit/commalg/test_power_series_facade.py:152 · validation/unit/numthy/test_elliptic_curve_facade.py:36 · validation/bench/macaulay2_derived.py:693
commalg.PowerSeries.semilinear_substitution¶
Compute semilinear substitution for this PowerSeries.
Detailed contract
Fuse monomial capping and coefficient mapping in one source-term stream. A transformed exponent is rejected before its coefficient map is applied.
noether::commalg::PowerSeries::semilinear_substitution · 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/PowerSeries@1 |
Executable usage: validation/unit/commalg/test_power_series_facade.py:278 · validation/unit/commalg/test_power_series_facade.py:285 · validation/unit/numthy/test_padic_local_field_facade.py:163 · validation/unit/numthy/test_padic_local_field_facade.py:166
commalg.PowerSeries.terms¶
Compute terms for this PowerSeries.
Detailed contract
Nonzero terms in deterministic lexicographic exponent order.
noether::commalg::PowerSeries::terms · 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/PowerSeries@1 |
Executable usage: examples/07_integer_factorization.py:14 · examples/40_exterior_algebra.py:43 · validation/unit/combin/test_acceptance_workload.py:45 · validation/unit/combin/test_acceptance_workload.py:81 · validation/unit/combinatorics/test_boundary.py:31 · validation/unit/combinatorics/test_boundary.py:44
commalg.PowerSeries.to_json¶
Serialize this series with its complete fixed-precision context.
Detailed contract
Serialize this series with its complete fixed-precision context and terms.
noether::commalg::PowerSeries::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/PowerSeries@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