Skip to content

commalg · IdealDecomposition

9 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.

commalg.IdealDecomposition

A verified decomposition into top-dimensional minimal components.

class IdealDecomposition

noether::commalg::IdealDecomposition · Direct Rust declaration

pub struct IdealDecomposition<R: Field> { /* private fields */ }
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/IdealDecomposition@1

Executable usage: validation/unit/commalg/test_acceptance_workload.py:12 · validation/unit/commalg/test_acceptance_workload.py:87 · validation/unit/commalg/test_polynomial_ideal_facade.py:21 · validation/unit/commalg/test_polynomial_ideal_facade.py:474 · validation/unit/commalg/test_polynomial_ideal_facade.py:485 · validation/unit/commalg/test_polynomial_ideal_facade.py:490

commalg.IdealDecomposition.components

Canonically ordered top-dimensional minimal components.

(self) -> list[Ideal[C]]

noether::commalg::IdealDecomposition::components · Direct Rust declaration

pub fn components(&self) -> &[Ideal<PolynomialRing<R>>]
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/IdealDecomposition@1

Executable usage: examples/13_chinese_remainder_theorem.py:13 · examples/13_chinese_remainder_theorem.py:14 · examples/13_chinese_remainder_theorem.py:15 · examples/14_weighted_polynomials.py:15 · examples/14_weighted_polynomials.py:16 · examples/14_weighted_polynomials.py:17

commalg.IdealDecomposition.frobenius_permutation

Absolute coefficient-Frobenius action on component indices.

Detailed contract

Verified coefficient-Frobenius action, when the base carries one.

(self) -> list[int]

noether::commalg::IdealDecomposition::frobenius_permutation · Direct Rust declaration

pub fn frobenius_permutation(&self) -> Option<&[usize]>
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/IdealDecomposition@1

Executable usage: validation/unit/commalg/test_acceptance_workload.py:77 · validation/unit/commalg/test_polynomial_ideal_facade.py:477 · validation/unit/commalg/test_polynomial_ideal_facade.py:488

commalg.IdealDecomposition.from_json

Deserialize and reverify all decomposition evidence.

Detailed contract

Deserialize and reverify the component intersection and Frobenius action.

(cls, value: str) -> IdealDecomposition[CoefficientRing]

noether::commalg::IdealDecomposition::from_json · Direct Rust declaration

pub fn from_json(value: &str) -> Result<Self, NoetherError>
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/IdealDecomposition@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.IdealDecomposition.hilbert_polynomials

Standard Hilbert polynomial of every component.

(self) -> list[Polynomial[RationalField]]

noether::commalg::IdealDecomposition · Python projection

Python projection convenience over this Rust mathematical type
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/IdealDecomposition@1

Executable usage: validation/unit/commalg/test_acceptance_workload.py:81 · validation/unit/commalg/test_polynomial_ideal_facade.py:479

commalg.IdealDecomposition.source

The base-changed radical ideal reconstructed by the components.

Detailed contract

The radical ideal reconstructed by intersecting the components.

(self) -> Ideal[C]

noether::commalg::IdealDecomposition::source · Direct Rust declaration

pub fn source(&self) -> &Ideal<PolynomialRing<R>>
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/IdealDecomposition@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.IdealDecomposition.to_json

Serialize the source, components, and verified Frobenius action.

Detailed contract

Serialize the source, components, and verified Frobenius permutation.

(self) -> str

noether::commalg::IdealDecomposition::to_json · Direct Rust declaration

pub fn to_json(&self) -> Result<String, NoetherError>
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/IdealDecomposition@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.IdealDecomposition.verify

Recheck contexts, dimensions, and component intersection.

Detailed contract

Recheck component contexts, dimensions, intersection, and permutation shape.

(self) -> None

noether::commalg::IdealDecomposition::verify · Direct Rust declaration

pub fn verify(&self) -> Result<(), DecompositionError>
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/IdealDecomposition@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

commalg.IdealDecomposition.verify_frobenius

Recompute and verify every coefficient-Frobenius image.

Detailed contract

Recompute the absolute coefficient-Frobenius image of every component.

(self) -> None

noether::commalg::IdealDecomposition::verify_frobenius · Direct Rust declaration

pub fn verify_frobenius(&self) -> Result<(), DecompositionError>
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/IdealDecomposition@1

Executable usage: validation/unit/commalg/test_acceptance_workload.py:86 · validation/unit/commalg/test_polynomial_ideal_facade.py:484