commalg · GradedCommutativePolynomialRing¶
12 accepted declarations. Python and Rust forms, contracts, evidence, failure boundaries, and checked usages are kept together below.
Worked example¶
The complete checked program Calculate trace and norm in a concrete quadratic finite field uses this API directly.
# SPDX-License-Identifier: MIT
# Copyright (c) 2026 Benjamin Antieau and Deven Manam
"""Calculate trace and norm in a concrete quadratic finite field."""
from noether.numthy import FiniteField
def main() -> None:
field = FiniteField.extension(5, 2)
generator = field.generator()
assert generator**2 + field(4) * generator + field(2) == field.zero()
assert generator.trace() == field(1)
assert generator.norm() == field(2)
print(f"{field}: Tr(a)={generator.trace()}, Nm(a)={generator.norm()}")
if __name__ == "__main__":
main()
Run it with .venv/bin/python examples/08_finite_field_extensions.py.
commalg.GradedCommutativePolynomialRing¶
A free graded-commutative polynomial context over a finite field.
noether::commalg::GradedCommutativePolynomialRing · 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/GradedCommutativePolynomialRing@1 |
Executable usage: validation/unit/commalg/test_graded_commutative_facade.py:15 · validation/unit/commalg/test_graded_commutative_facade.py:36 · validation/unit/commalg/test_graded_commutative_facade.py:6
commalg.GradedCommutativePolynomialRing.arity¶
Return the arity recorded by this GradedCommutativePolynomialRing.
Detailed contract
Number of generators.
noether::commalg::GradedCommutativePolynomialRing::arity · 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/GradedCommutativePolynomialRing@1 |
Executable usage: validation/unit/commalg/test_polynomial_facade.py:197 · validation/unit/commalg/test_polynomial_facade.py:205 · validation/unit/commalg/test_polynomial_ideal_facade.py:259 · validation/unit/commalg/test_power_series_facade.py:65 · validation/bench/groebner_compare.py:120 · validation/bench/groebner_compare.py:121
commalg.GradedCommutativePolynomialRing.field¶
Return the field recorded by this GradedCommutativePolynomialRing.
Detailed contract
Coefficient field with its exact presentation.
noether::commalg::GradedCommutativePolynomialRing::field · 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/GradedCommutativePolynomialRing@1 |
Executable usage: examples/08_finite_field_extensions.py:10 · examples/08_finite_field_extensions.py:11 · examples/08_finite_field_extensions.py:12 · examples/08_finite_field_extensions.py:13 · examples/08_finite_field_extensions.py:14 · examples/08_finite_field_extensions.py:3
commalg.GradedCommutativePolynomialRing.from_json¶
Deserialize and revalidate a GradedCommutativePolynomialRing from typed JSON.
Detailed contract
Deserialize and revalidate a ring context.
noether::commalg::GradedCommutativePolynomialRing::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/GradedCommutativePolynomialRing@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.GradedCommutativePolynomialRing.generator¶
Compute generator for this GradedCommutativePolynomialRing.
Detailed contract
The indexed algebra generator.
noether::commalg::GradedCommutativePolynomialRing::generator · 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/GradedCommutativePolynomialRing@1 |
Executable usage: examples/08_finite_field_extensions.py:10 · examples/08_finite_field_extensions.py:11 · examples/08_finite_field_extensions.py:12 · examples/08_finite_field_extensions.py:13 · examples/08_finite_field_extensions.py:14 · examples/10_padic_hensel_lifting.py:12
commalg.GradedCommutativePolynomialRing.generators¶
Return the generators recorded by this GradedCommutativePolynomialRing.
Detailed contract
Ordered homogeneous generators.
noether::commalg::GradedCommutativePolynomialRing::generators · 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/GradedCommutativePolynomialRing@1 |
Executable usage: examples/14_weighted_polynomials.py:11 · examples/15_groebner_twisted_cubic.py:11 · examples/15_groebner_twisted_cubic.py:19 · examples/17_weighted_power_series.py:15 · examples/18_finite_field_schemes.py:12 · examples/30_modules_and_resolutions.py:20
commalg.GradedCommutativePolynomialRing.has_characteristic_two¶
Test whether this GradedCommutativePolynomialRing has characteristic two.
Detailed contract
Whether Koszul signs disappear in the coefficient field.
noether::commalg::GradedCommutativePolynomialRing::has_characteristic_two · 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/GradedCommutativePolynomialRing@1 |
commalg.GradedCommutativePolynomialRing.one¶
Compute one for this GradedCommutativePolynomialRing.
Detailed contract
Multiplicative identity in degree zero.
noether::commalg::GradedCommutativePolynomialRing::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/GradedCommutativePolynomialRing@1 |
Executable usage: examples/02_ball_arithmetic.py:13 · examples/11_qadic_witt_vectors.py:11 · examples/24_homology_and_persistence.py:3 · examples/31_local_fields_and_precision.py:27 · validation/unit/combinatorics/test_poset.py:3 · validation/unit/commalg/test_acceptance_workload.py:37
commalg.GradedCommutativePolynomialRing.polynomial¶
Compute polynomial for this GradedCommutativePolynomialRing.
Detailed contract
Construct and canonically combine a sparse polynomial.
noether::commalg::GradedCommutativePolynomialRing::polynomial · 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/GradedCommutativePolynomialRing@1 |
Executable usage: examples/07_integer_factorization.py:3 · examples/14_weighted_polynomials.py:13 · examples/14_weighted_polynomials.py:15 · examples/14_weighted_polynomials.py:3 · examples/22_matroids_and_tutte.py:3 · examples/27_weight_characters.py:3
commalg.GradedCommutativePolynomialRing.term¶
Compute term for this GradedCommutativePolynomialRing.
Detailed contract
Construct one coefficient times one monomial.
noether::commalg::GradedCommutativePolynomialRing::term · 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/GradedCommutativePolynomialRing@1 |
Executable usage: validation/unit/commalg/test_polynomial_facade.py:407 · validation/unit/homalg/test_module_facade.py:722 · validation/unit/homalg/test_module_facade.py:723 · validation/unit/topology/test_eilenberg_maclane.py:127 · validation/parity/homalg/test_exterior_algebra_sage_parity.py:49 · validation/bench/macaulay2_core.py:1920
commalg.GradedCommutativePolynomialRing.to_json¶
Serialize this GradedCommutativePolynomialRing to its canonical typed JSON representation.
Detailed contract
Serialize the exact coefficient context and ordered generators.
noether::commalg::GradedCommutativePolynomialRing::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/GradedCommutativePolynomialRing@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.GradedCommutativePolynomialRing.zero¶
Compute zero for this GradedCommutativePolynomialRing.
Detailed contract
Additive identity.
noether::commalg::GradedCommutativePolynomialRing::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/GradedCommutativePolynomialRing@1 |
Executable usage: examples/08_finite_field_extensions.py:11 · examples/10_padic_hensel_lifting.py:15 · examples/40_exterior_algebra.py:26 · examples/distributed/f2_linear_algebra.py:28 · examples/distributed/f2_linear_algebra.py:29 · examples/distributed/f2_linear_algebra.py:30