Skip to content

commalg · ReesAlgebra

10 accepted declarations. Python and Rust forms, contracts, evidence, failure boundaries, and checked usages are kept together below.

Worked example

The complete checked program Compute in an exterior algebra and induce a linear map on two-forms uses this API directly.

# SPDX-License-Identifier: MIT
# Copyright (c) 2026 Benjamin Antieau and Deven Manam
"""Compute in an exterior algebra and induce a linear map on two-forms."""

from noether import Q
from noether.commalg import PolynomialRing
from noether.homalg import FreeModule, ModuleElement, ModuleHomomorphism
from noether.linalg import Matrix, Vector


def main() -> None:
    ring = PolynomialRing(Q, ["t"])
    module = FreeModule(ring, 3, basis_labels=["e0", "e1", "e2"])
    exterior = module.exterior_algebra()
    e0, e1, e2 = [exterior.generator(position) for position in range(3)]

    volume = e0 * e1 * e2
    assert volume == exterior.alternating_product(
        [
            ModuleElement(module, Vector.from_values(ring, [1, 0, 0])),
            ModuleElement(module, Vector.from_values(ring, [0, 1, 0])),
            ModuleElement(module, Vector.from_values(ring, [0, 0, 1])),
        ]
    )
    assert e1 * e0 == -(e0 * e1)
    assert e0 * e0 == exterior.zero()

    e0_dual = ModuleElement(module.dual(), Vector.from_values(ring, [1, 0, 0]))
    assert volume.contract(e0_dual) == e1 * e2

    linear_map = ModuleHomomorphism(
        module,
        module,
        Matrix.from_rows(ring, [[1, 1, 0], [0, 1, 0], [0, 0, 2]]),
    )
    on_two_forms = linear_map.exterior_power(2)
    on_two_forms.verify()
    assert on_two_forms.apply_exterior(e1 * e2) == 2 * (e0 * e2 + e1 * e2)
    print(
        "Λ² has basis",
        exterior.basis(2),
        "and the induced map sends e1∧e2 to",
        on_two_forms.apply_exterior(e1 * e2).terms,
    )


if __name__ == "__main__":
    main()

Run it with .venv/bin/python examples/40_exterior_algebra.py.

commalg.ReesAlgebra

A verified elimination presentation of an ideal's Rees algebra.

class ReesAlgebra

noether::commalg::ReesAlgebra · Direct Rust declaration

pub struct ReesAlgebra<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/ReesAlgebra@1

Executable usage: validation/unit/commalg/test_construction_algebras.py:11 · validation/unit/commalg/test_construction_algebras.py:75

commalg.ReesAlgebra.algebra

Return the algebra recorded by this ReesAlgebra.

Detailed contract

Exact quotient-algebra context.

(self) -> QuotientRing[C]

noether::commalg::ReesAlgebra::algebra · Direct Rust declaration

pub fn algebra(&self) -> &QuotientRing<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/ReesAlgebra@1

Executable usage: examples/40_exterior_algebra.py:3 · examples/distributed/f2_linear_algebra.py:3 · validation/unit/commalg/test_acceptance_workload.py:3 · validation/unit/commalg/test_construction_algebras.py:41 · validation/unit/commalg/test_construction_algebras.py:71 · validation/unit/commalg/test_construction_algebras.py:72

commalg.ReesAlgebra.ambient_ring

Return the ambient ring recorded by this ReesAlgebra.

Detailed contract

Flat polynomial presentation ring k[x,T].

(self) -> PolynomialRing[C]

noether::commalg::ReesAlgebra::ambient_ring · Direct Rust declaration

pub fn ambient_ring(&self) -> &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/ReesAlgebra@1

Executable usage: validation/unit/commalg/test_acceptance_workload.py:120 · validation/unit/commalg/test_construction_algebras.py:36 · validation/unit/commalg/test_construction_algebras.py:37 · validation/unit/commalg/test_construction_algebras.py:44 · validation/unit/commalg/test_scheme_facade.py:262

commalg.ReesAlgebra.base_images

Return the base images recorded by this ReesAlgebra.

Detailed contract

Images of the base polynomial variables.

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

noether::commalg::ReesAlgebra::base_images · Direct Rust declaration

pub fn base_images( &self, ) -> Result<Vec<QuotientElement<PolynomialRing<R>>>, ConstructionAlgebraError>
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/ReesAlgebra@1

Executable usage: validation/unit/commalg/test_construction_algebras.py:42 · validation/unit/commalg/test_construction_algebras.py:67

commalg.ReesAlgebra.defining_ideal

Return the defining ideal recorded by this ReesAlgebra.

Detailed contract

Canonical Rees ideal obtained by elimination.

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

noether::commalg::ReesAlgebra::defining_ideal · Direct Rust declaration

pub fn defining_ideal(&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/ReesAlgebra@1

Executable usage: validation/unit/commalg/test_acceptance_workload.py:107 · validation/unit/commalg/test_acceptance_workload.py:114 · validation/unit/commalg/test_affine_normalization_facade.py:108 · validation/unit/commalg/test_affine_normalization_facade.py:163 · validation/unit/commalg/test_affine_normalization_facade.py:182 · validation/unit/commalg/test_affine_normalization_facade.py:89

commalg.ReesAlgebra.from_json

Deserialize and revalidate a ReesAlgebra from typed JSON.

Detailed contract

Deserialize and independently revalidate the presentation.

(cls, value: str) -> ReesAlgebra[RationalField | FiniteField]

noether::commalg::ReesAlgebra::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/ReesAlgebra@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.ReesAlgebra.generator_images

Return the generator images recorded by this ReesAlgebra.

Detailed contract

Degree-one images corresponding to the canonical ideal generators.

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

noether::commalg::ReesAlgebra::generator_images · Direct Rust declaration

pub fn generator_images( &self, ) -> Result<Vec<QuotientElement<PolynomialRing<R>>>, ConstructionAlgebraError>
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/ReesAlgebra@1

Executable usage: validation/unit/commalg/test_construction_algebras.py:43 · validation/unit/commalg/test_construction_algebras.py:68 · validation/corpus/groups/degree-four-permutation-actions.py:19 · validation/corpus/groups/degree-four-permutation-actions.py:20

commalg.ReesAlgebra.source

Return the source recorded by this ReesAlgebra.

Detailed contract

Source ideal whose blowup algebra is represented.

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

noether::commalg::ReesAlgebra::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/ReesAlgebra@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.ReesAlgebra.to_json

Serialize this ReesAlgebra to its canonical typed JSON representation.

Detailed contract

Serialize the complete verified presentation.

(self) -> str

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

pub fn to_json(&self) -> Result<String, NoetherError>where R: Serialize, R::Element: Serialize, Ideal<PolynomialRing<R>>: Serialize, QuotientRing<PolynomialRing<R>>: Serialize,
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/ReesAlgebra@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.ReesAlgebra.verify

Replay and verify the mathematical evidence carried by this ReesAlgebra.

Detailed contract

Recompute the elimination ideal and quotient presentation.

(self) -> None

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

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