homalg · ModuleMonomial¶
5 accepted declarations. Python and Rust forms, contracts, evidence, failure boundaries, and checked usages are kept together below.
Worked example¶
The complete checked program Project and reconstruct a residue class by the Chinese remainder theorem uses this API directly.
# SPDX-License-Identifier: MIT
# Copyright (c) 2026 Benjamin Antieau and Deven Manam
"""Project and reconstruct a residue class by the Chinese remainder theorem."""
from noether.commalg import ResidueRing
def main() -> None:
ring = ResidueRing(360)
decomposition = ring.crt()
decomposition.verify()
value = ring(347)
components = decomposition.project(value)
assert decomposition.reconstruct(components) == value
print(f"347 mod 360 -> {[int(component) for component in components]}")
if __name__ == "__main__":
main()
Run it with .venv/bin/python examples/13_chinese_remainder_theorem.py.
homalg.ModuleMonomial¶
One polynomial monomial times an ordered free-module basis vector.
noether::homalg::ModuleMonomial · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core, groebner-kernel, m4rst, m4rste, module-core, resolution-kernel, sparla |
| GIL | attached / bounded |
| Semantic ID | noether/homalg/ModuleMonomial@1 |
Executable usage: validation/unit/homalg/test_module_facade.py:32 · validation/unit/homalg/test_module_facade.py:655
homalg.ModuleMonomial.component¶
Return the component recorded by this ModuleMonomial.
Detailed contract
Zero-based free-module basis component.
noether::homalg::ModuleMonomial::component · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core, groebner-kernel, m4rst, m4rste, module-core, resolution-kernel, sparla |
| GIL | attached / bounded |
| Semantic ID | noether/homalg/ModuleMonomial@1 |
Executable usage: examples/13_chinese_remainder_theorem.py:15 · validation/unit/commalg/test_acceptance_workload.py:78 · validation/unit/commalg/test_acceptance_workload.py:79 · validation/unit/commalg/test_affine_normalization_facade.py:187 · validation/unit/commalg/test_affine_normalization_facade.py:216 · validation/unit/commalg/test_polynomial_ideal_facade.py:1005
homalg.ModuleMonomial.exponent¶
Return the exponent recorded by this ModuleMonomial.
Detailed contract
Polynomial exponent vector.
noether::homalg::ModuleMonomial::exponent · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core, groebner-kernel, m4rst, m4rste, module-core, resolution-kernel, sparla |
| GIL | attached / bounded |
| Semantic ID | noether/homalg/ModuleMonomial@1 |
Executable usage: examples/31_local_fields_and_precision.py:38 · validation/unit/commalg/test_base_change.py:93 · validation/unit/commalg/test_groebner_verification_budget.py:32 · validation/unit/commalg/test_groebner_verification_budget.py:33 · validation/unit/commalg/test_groebner_verification_budget.py:34 · validation/unit/commalg/test_groebner_verification_budget.py:35
homalg.ModuleMonomial.from_json¶
Deserialize and revalidate a ModuleMonomial from typed JSON.
Detailed contract
Deserialize an exact module monomial.
noether::homalg::ModuleMonomial::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, m4rst, m4rste, module-core, resolution-kernel, sparla |
| GIL | attached / bounded |
| Semantic ID | noether/homalg/ModuleMonomial@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
homalg.ModuleMonomial.to_json¶
Serialize this ModuleMonomial to its canonical typed JSON representation.
Detailed contract
Serialize this exact exponent vector and basis component.
noether::homalg::ModuleMonomial::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, m4rst, m4rste, module-core, resolution-kernel, sparla |
| GIL | attached / bounded |
| Semantic ID | noether/homalg/ModuleMonomial@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