commalg · MonomialMap¶
9 accepted declarations. Python and Rust forms, contracts, evidence, failure boundaries, and checked usages are kept together below.
Worked example¶
The complete checked program Apply and multiply canonical sparse exact operators uses this API directly.
# SPDX-License-Identifier: MIT
# Copyright (c) 2026 Benjamin Antieau and Deven Manam
"""Apply and multiply canonical sparse exact operators."""
from noether import Z
from noether.linalg import SparseMatrix, Vector
def main() -> None:
operator = SparseMatrix.from_triplets(
Z,
(3, 3),
[(0, 0, 2), (0, 2, -1), (1, 1, 3), (2, 0, 4)],
)
vector = Vector.from_values(Z, [5, 7, 11])
image = operator.apply(vector)
assert image.to_values() == [-1, 21, 20]
assert (operator @ operator).nnz == 4
print(f"A v = {image.to_values()}; nnz(A^2) = {(operator @ operator).nnz}")
if __name__ == "__main__":
main()
Run it with .venv/bin/python examples/05_sparse_exact_operators.py.
commalg.MonomialMap¶
A checked monomial endomorphism on an ordered variable list.
noether::commalg::MonomialMap · 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/MonomialMap@1 |
Executable usage: validation/unit/commalg/test_polynomial_facade.py:12 · validation/unit/commalg/test_polynomial_facade.py:195 · validation/unit/commalg/test_polynomial_facade.py:200 · validation/unit/commalg/test_polynomial_facade.py:201 · validation/unit/commalg/test_polynomial_facade.py:204 · validation/unit/commalg/test_polynomial_facade.py:206
commalg.MonomialMap.apply¶
Apply this MonomialMap to the supplied value.
Detailed contract
Transform one arbitrary-precision nonnegative exponent vector.
noether::commalg::MonomialMap::apply · 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/MonomialMap@1 |
Executable usage: examples/05_sparse_exact_operators.py:16 · validation/unit/commalg/test_local_algebra.py:94 · validation/unit/commalg/test_local_algebra.py:97 · validation/unit/commalg/test_polynomial_facade.py:199 · validation/unit/commalg/test_quotient_facade.py:186 · validation/unit/groups/test_weight_characters.py:39
commalg.MonomialMap.arity¶
Return the arity recorded by this MonomialMap.
Detailed contract
Number of ordered source and target variables.
noether::commalg::MonomialMap::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/MonomialMap@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.MonomialMap.compose¶
Compose this MonomialMap with another compatible map.
Detailed contract
Compose self after inner using exact exponent arithmetic.
noether::commalg::MonomialMap::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/MonomialMap@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.MonomialMap.diagonal_power¶
Construct a MonomialMap using diagonal power.
Detailed contract
Diagonal substitution x_i -> x_i^power on every variable.
noether::commalg::MonomialMap::diagonal_power · 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/MonomialMap@1 |
Executable usage: validation/unit/commalg/test_polynomial_facade.py:247 · validation/unit/commalg/test_power_series_facade.py:280 · validation/unit/commalg/test_power_series_facade.py:287
commalg.MonomialMap.from_json¶
Deserialize and revalidate a MonomialMap from typed JSON.
Detailed contract
Deserialize and revalidate every exponent vector.
noether::commalg::MonomialMap::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/MonomialMap@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.MonomialMap.identity¶
Construct a MonomialMap using identity.
Detailed contract
Identity monomial map on arity ordered variables.
noether::commalg::MonomialMap::identity · 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/MonomialMap@1 |
Executable usage: examples/01_bezout_certificates.py:10 · examples/01_bezout_certificates.py:12 · examples/01_bezout_certificates.py:14 · examples/01_bezout_certificates.py:9 · examples/02_ball_arithmetic.py:3 · examples/distributed/f2_linear_algebra.py:20
commalg.MonomialMap.images¶
Return the images recorded by this MonomialMap.
Detailed contract
Exact exponent vectors of the variable images.
noether::commalg::MonomialMap::images · 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/MonomialMap@1 |
Executable usage: validation/unit/commalg/test_polynomial_facade.py:198 · validation/unit/commalg/test_polynomial_homomorphism.py:30 · validation/unit/groups/test_acceptance_workload.py:90 · validation/unit/groups/test_acceptance_workload.py:95 · validation/unit/groups/test_permutation_group_facade.py:49 · validation/unit/groups/test_permutation_group_facade.py:54
commalg.MonomialMap.to_json¶
Serialize this MonomialMap to its canonical typed JSON representation.
Detailed contract
Serialize the exact exponent matrix as canonical typed JSON.
noether::commalg::MonomialMap::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/MonomialMap@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