commalg · HilbertSeries¶
7 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.
commalg.HilbertSeries¶
Exact Hilbert series in a free-abelian grading group algebra.
noether::commalg::HilbertSeries · 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/HilbertSeries@1 |
Executable usage: validation/unit/commalg/test_monomial_ideal_facade.py:13 · validation/unit/commalg/test_monomial_ideal_facade.py:51 · validation/unit/homalg/test_module_facade.py:15 · validation/unit/homalg/test_module_facade.py:264
commalg.HilbertSeries.from_json¶
Deserialize and revalidate a HilbertSeries from typed JSON.
Detailed contract
Deserialize and independently revalidate an exact series.
noether::commalg::HilbertSeries::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/HilbertSeries@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.HilbertSeries.grading¶
Return the grading recorded by this HilbertSeries.
Detailed contract
Exact free-abelian grading, including ordered denominator degrees.
noether::commalg::HilbertSeries::grading · 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/HilbertSeries@1 |
Executable usage: examples/14_weighted_polynomials.py:10 · examples/14_weighted_polynomials.py:3 · validation/unit/commalg/test_base_change.py:23 · validation/unit/commalg/test_base_change.py:34 · validation/unit/commalg/test_construction_algebras.py:44 · validation/unit/commalg/test_context_tower_workload.py:42
commalg.HilbertSeries.numerator¶
Return the numerator recorded by this HilbertSeries.
Detailed contract
Canonical nonzero numerator terms in increasing degree order.
noether::commalg::HilbertSeries::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/HilbertSeries@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.HilbertSeries.standard_numerator¶
Compute standard numerator for this HilbertSeries.
Detailed contract
Dense K(t) coefficients when this is the standard grading.
noether::commalg::HilbertSeries::standard_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/HilbertSeries@1 |
Executable usage: validation/unit/commalg/test_monomial_ideal_facade.py:50 · validation/unit/commalg/test_polynomial_ideal_facade.py:205
commalg.HilbertSeries.to_json¶
Serialize this HilbertSeries to its canonical typed JSON representation.
Detailed contract
Serialize the complete exact series as typed JSON.
noether::commalg::HilbertSeries::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/HilbertSeries@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.HilbertSeries.verify¶
Replay and verify the mathematical evidence carried by this HilbertSeries.
Detailed contract
Independently recheck rank and canonicalization invariants.
noether::commalg::HilbertSeries::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/HilbertSeries@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