commalg · IdealElimination¶
7 accepted declarations. Python and Rust forms, contracts, evidence, failure boundaries, and checked usages are kept together below.
Worked example¶
The complete checked program Recover the Hilbert invariants of the twisted cubic cone uses this API directly.
# SPDX-License-Identifier: MIT
# Copyright (c) 2026 Benjamin Antieau and Deven Manam
"""Recover the Hilbert invariants of the twisted cubic cone."""
from noether import Q
from noether.commalg import PolynomialRing
def main() -> None:
ring = PolynomialRing(Q, ["x", "y", "z", "w"])
x, y, z, w = ring.generators()
ideal = ring.ideal([x * z - y**2, x * w - y * z, y * w - z**2])
ideal.verify()
assert ideal.dimension() == 2
assert ideal.degree() == 3
assert ideal.hilbert_numerator() == [1, 0, -3, 2]
elimination_ring = PolynomialRing(Q, ["a", "b", "c"], order="lex")
a, b, c = elimination_ring.generators()
parametrized = elimination_ring.ideal([a - b**2, c - b])
elimination = parametrized.eliminate_with_evidence(["b"])
elimination.verify()
assert elimination.result == elimination_ring.ideal([a - c**2])
quotient = elimination_ring.quotient(parametrized)
assert quotient(a) == quotient(c**2)
print(
f"dimension={ideal.dimension()}, degree={ideal.degree()}, "
f"elimination={elimination.result.groebner_basis()}"
)
if __name__ == "__main__":
main()
Run it with .venv/bin/python examples/15_groebner_twisted_cubic.py.
commalg.IdealElimination¶
Replayable exact elimination result over a field.
noether::commalg::IdealElimination · 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/IdealElimination@1 |
Executable usage: validation/unit/commalg/test_polynomial_ideal_facade.py:22 · validation/unit/commalg/test_polynomial_ideal_facade.py:280 · validation/unit/commalg/test_polynomial_ideal_facade.py:285
commalg.IdealElimination.from_json¶
Deserialize and revalidate a IdealElimination from typed JSON.
Detailed contract
Deserialize and independently recompute the elimination result.
noether::commalg::IdealElimination::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/IdealElimination@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.IdealElimination.result¶
Return the result recorded by this IdealElimination.
Detailed contract
Canonical elimination ideal in the source ambient context.
noether::commalg::IdealElimination::result · 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/IdealElimination@1 |
Executable usage: examples/15_groebner_twisted_cubic.py:23 · examples/15_groebner_twisted_cubic.py:29 · validation/unit/commalg/test_polynomial_facade.py:120 · validation/unit/commalg/test_polynomial_facade.py:122 · validation/unit/commalg/test_polynomial_facade.py:123 · validation/unit/commalg/test_polynomial_facade.py:124
commalg.IdealElimination.source¶
Return the source recorded by this IdealElimination.
Detailed contract
Source ideal before elimination.
noether::commalg::IdealElimination::source · 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/IdealElimination@1 |
Executable usage: examples/09_finite_field_isomorphisms.py:11 · examples/09_finite_field_isomorphisms.py:13 · examples/09_finite_field_isomorphisms.py:9 · examples/30_modules_and_resolutions.py:34 · examples/30_modules_and_resolutions.py:37 · validation/unit/category/test_acceptance_workload.py:25
commalg.IdealElimination.to_json¶
Serialize this IdealElimination to its canonical typed JSON representation.
Detailed contract
Serialize the source, operation, and canonical result as typed JSON.
noether::commalg::IdealElimination::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/IdealElimination@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.IdealElimination.variables¶
Return the variables recorded by this IdealElimination.
Detailed contract
Sorted, duplicate-free variable indices that were eliminated.
noether::commalg::IdealElimination::variables · 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/IdealElimination@1 |
Executable usage: validation/unit/combinatorics/test_matroid.py:66 · validation/unit/commalg/test_affine_normalization_facade.py:100 · validation/unit/commalg/test_affine_normalization_facade.py:107 · validation/unit/commalg/test_base_change.py:32 · validation/unit/commalg/test_normalization_facade.py:60 · validation/unit/commalg/test_normalization_facade.py:69
commalg.IdealElimination.verify¶
Replay and verify the mathematical evidence carried by this IdealElimination.
Detailed contract
Recompute the canonical elimination and compare the exact result.
noether::commalg::IdealElimination::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/IdealElimination@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