Skip to content

commalg · AssociatedGradedAlgebra

8 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.AssociatedGradedAlgebra

A verified presentation of the associated graded algebra of an ideal.

class AssociatedGradedAlgebra

noether::commalg::AssociatedGradedAlgebra · Direct Rust declaration

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

Executable usage: validation/unit/commalg/test_construction_algebras.py:76 · validation/unit/commalg/test_construction_algebras.py:8

commalg.AssociatedGradedAlgebra.algebra

Return the algebra recorded by this AssociatedGradedAlgebra.

Detailed contract

Exact quotient-algebra context.

(self) -> QuotientRing[C]

noether::commalg::AssociatedGradedAlgebra::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/AssociatedGradedAlgebra@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.AssociatedGradedAlgebra.defining_ideal

Return the defining ideal recorded by this AssociatedGradedAlgebra.

Detailed contract

Defining ideal of the flat associated-graded presentation.

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

noether::commalg::AssociatedGradedAlgebra::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/AssociatedGradedAlgebra@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.AssociatedGradedAlgebra.from_json

Deserialize and revalidate a AssociatedGradedAlgebra from typed JSON.

Detailed contract

Deserialize and independently revalidate the presentation.

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

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

Return the generator images recorded by this AssociatedGradedAlgebra.

Detailed contract

Images of base and degree-one variables in presentation order.

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

noether::commalg::AssociatedGradedAlgebra::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/AssociatedGradedAlgebra@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.AssociatedGradedAlgebra.rees_algebra

Return the rees algebra recorded by this AssociatedGradedAlgebra.

Detailed contract

Canonical Rees algebra before quotienting by the source ideal.

(self) -> ReesAlgebra[C]

noether::commalg::AssociatedGradedAlgebra::rees_algebra · Direct Rust declaration

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

Executable usage: validation/unit/commalg/test_construction_algebras.py:61 · validation/unit/commalg/test_construction_algebras.py:69 · validation/unit/infra/test_discovery.py:166

commalg.AssociatedGradedAlgebra.to_json

Serialize this AssociatedGradedAlgebra to its canonical typed JSON representation.

Detailed contract

Serialize the complete verified presentation.

(self) -> str

noether::commalg::AssociatedGradedAlgebra::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/AssociatedGradedAlgebra@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.AssociatedGradedAlgebra.verify

Replay and verify the mathematical evidence carried by this AssociatedGradedAlgebra.

Detailed contract

Recompute the Rees presentation and quotient by the source ideal.

(self) -> None

noether::commalg::AssociatedGradedAlgebra::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/AssociatedGradedAlgebra@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