commalg · LocalMonomialOrder¶
5 accepted declarations. Python and Rust forms, contracts, evidence, failure boundaries, and checked usages are kept together below.
Worked example¶
The complete checked program Split rational primes and factor an ideal in the Gaussian integers uses this API directly.
# SPDX-License-Identifier: MIT
# Copyright (c) 2026 Benjamin Antieau and Deven Manam
"""Split rational primes and factor an ideal in the Gaussian integers."""
from noether import Q
from noether.commalg import PolynomialRing
from noether.numthy import NumberField
def main() -> None:
polynomials = PolynomialRing(Q, ["x"])
field = NumberField(polynomials.generator("x") ** 2 + 1, name="i")
order = field.maximal_order()
primes = order.prime_ideals_above(5)
assert len(primes) == 2
assert all(prime.norm() == 5 for prime in primes)
ideal = order.fractional_ideal([1 + field.generator])
assert ideal.norm() == 2
print(f"(5) splits into norms {[prime.norm() for prime in primes]}; N(1+i)={ideal.norm()}")
if __name__ == "__main__":
main()
Run it with .venv/bin/python examples/12_number_field_ideals.py.
commalg.LocalMonomialOrder¶
One local monomial order, kept separate from global admissible orders.
noether::commalg::LocalMonomialOrder · 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/LocalMonomialOrder@1 |
Executable usage: validation/unit/commalg/test_local_algebra.py:10 · validation/unit/commalg/test_local_algebra.py:23 · validation/unit/commalg/test_local_algebra.py:33 · validation/unit/commalg/test_local_algebra.py:77
commalg.LocalMonomialOrder.from_json¶
Deserialize and revalidate a LocalMonomialOrder from typed JSON.
Detailed contract
Deserialize one exact local order.
noether::commalg::LocalMonomialOrder::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/LocalMonomialOrder@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.LocalMonomialOrder.is_degree_compatible¶
Test whether this LocalMonomialOrder is degree compatible.
Detailed contract
Whether lowest total-degree forms are compatible with this order.
noether::commalg::LocalMonomialOrder::is_degree_compatible · 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/LocalMonomialOrder@1 |
commalg.LocalMonomialOrder.name¶
Return the name recorded by this LocalMonomialOrder.
Detailed contract
Stable short name used by JSON and Python.
noether::commalg::LocalMonomialOrder::name · 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/LocalMonomialOrder@1 |
Executable usage: examples/12_number_field_ideals.py:12 · validation/unit/commalg/test_polynomial_facade.py:345 · validation/unit/commalg/test_polynomial_facade.py:44 · validation/unit/commalg/test_polynomial_facade.py:61 · validation/unit/commalg/test_polynomial_facade.py:65 · validation/unit/commalg/test_polynomial_facade.py:72
commalg.LocalMonomialOrder.to_json¶
Serialize this LocalMonomialOrder to its canonical typed JSON representation.
Detailed contract
Serialize this exact local order.
noether::commalg::LocalMonomialOrder::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/LocalMonomialOrder@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