Skip to content

commalg · AssociatedPrimeExtStage

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

Worked example

The complete checked program Differentiate exactly and distinguish a cusp's smooth and singular points uses this API directly.

# SPDX-License-Identifier: MIT
# Copyright (c) 2026 Benjamin Antieau and Deven Manam
"""Differentiate exactly and distinguish a cusp's smooth and singular points."""

from noether import Q
from noether.commalg import KahlerDifferentials, PolynomialRing


def main() -> None:
    ring = PolynomialRing(Q, ["x", "y"])
    x, y = ring.generators()
    relation = y**2 - x**3
    cusp = ring.quotient(ring.ideal([relation]))
    omega = cusp.kahler_differentials()

    assert isinstance(omega, KahlerDifferentials)
    dx = omega.differentiate(cusp(x))
    dy = omega.differentiate(cusp(y))
    assert omega.differentiate(cusp(x * y)) == dx * cusp(y) + dy * cusp(x)
    assert omega.differentiate(cusp(relation)).is_zero()

    singular = cusp.cotangent_space_at([0, 0])
    smooth = cusp.cotangent_space_at([1, 1])
    assert singular.embedding_dimension == 2
    assert smooth.embedding_dimension == 1
    assert singular.presentation_matrix == singular.evaluated_jacobian.transpose()

    complex = cusp.cotangent_complex()
    assert complex.codimension == 1
    assert (complex.amplitude.lowest_degree, complex.amplitude.highest_degree) == (-1, 0)
    assert complex.hypothesis.equation_count == 1
    complex.verify()

    print(
        "cusp cotangent dimensions: "
        f"singular={singular.embedding_dimension}, smooth={smooth.embedding_dimension}; "
        "complete-intersection amplitude=[-1,0]"
    )


if __name__ == "__main__":
    main()

Run it with .venv/bin/python examples/39_kahler_differentials.py.

commalg.AssociatedPrimeExtStage

One verified Ext-annihilator stage in an associated-prime computation.

class AssociatedPrimeExtStage

noether::commalg::AssociatedPrimeExtStage · Direct Rust declaration

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

Executable usage: validation/unit/commalg/test_polynomial_ideal_facade.py:14 · validation/unit/commalg/test_polynomial_ideal_facade.py:572 · validation/unit/commalg/test_polynomial_ideal_facade.py:586 · validation/unit/homalg/test_module_facade.py:12 · validation/unit/homalg/test_module_facade.py:78

commalg.AssociatedPrimeExtStage.annihilator

Return the annihilator recorded by this AssociatedPrimeExtStage.

Detailed contract

Exact annihilator of the retained Ext module.

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

noether::commalg::AssociatedPrimeExtStage::annihilator · Direct Rust declaration

pub fn annihilator(&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/AssociatedPrimeExtStage@1

Executable usage: validation/unit/commalg/test_polynomial_ideal_facade.py:574 · validation/unit/commalg/test_polynomial_ideal_facade.py:575 · validation/unit/commalg/test_polynomial_ideal_facade.py:576 · validation/unit/commalg/test_polynomial_ideal_facade.py:589 · validation/unit/commalg/test_polynomial_ideal_facade.py:590 · validation/unit/homalg/test_module_facade.py:463

commalg.AssociatedPrimeExtStage.associated_primes

Return the associated primes recorded by this AssociatedPrimeExtStage.

Detailed contract

Height-i associated primes contributed by this stage.

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

noether::commalg::AssociatedPrimeExtStage::associated_primes · Direct Rust declaration

pub fn associated_primes(&self) -> &[PolynomialPrimeCertificate<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/AssociatedPrimeExtStage@1

Executable usage: validation/unit/commalg/test_polynomial_ideal_facade.py:1271 · validation/unit/commalg/test_polynomial_ideal_facade.py:566 · validation/unit/commalg/test_polynomial_ideal_facade.py:577 · validation/unit/commalg/test_polynomial_ideal_facade.py:623 · validation/unit/commalg/test_polynomial_ideal_facade.py:654 · validation/unit/commalg/test_polynomial_ideal_facade.py:694

commalg.AssociatedPrimeExtStage.codimension

Return the codimension recorded by this AssociatedPrimeExtStage.

Detailed contract

Ext degree and height selected by this stage.

(self) -> int

noether::commalg::AssociatedPrimeExtStage::codimension · Direct Rust declaration

pub const fn codimension(&self) -> 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/AssociatedPrimeExtStage@1

Executable usage: examples/39_kahler_differentials.py:29 · validation/unit/commalg/test_intersection_theory.py:31 · validation/unit/commalg/test_intersection_theory.py:32 · validation/unit/commalg/test_intersection_theory.py:50 · validation/unit/commalg/test_kahler_differentials.py:100 · validation/unit/commalg/test_kahler_differentials.py:121

commalg.AssociatedPrimeExtStage.ext_module

Return the ext module recorded by this AssociatedPrimeExtStage.

Detailed contract

Exact presentation of Ext^i_R(M,R).

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

noether::commalg::AssociatedPrimeExtStage::ext_module · Direct Rust declaration

pub fn ext_module(&self) -> &PresentedModule<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/AssociatedPrimeExtStage@1

Executable usage: validation/unit/commalg/test_polynomial_ideal_facade.py:573

commalg.AssociatedPrimeExtStage.from_json

Deserialize and revalidate a AssociatedPrimeExtStage from typed JSON.

Detailed contract

Deserialize and exactly reverify one rational Ext stage. Deserialize and exactly reverify one finite-field Ext stage.

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

noether::commalg::AssociatedPrimeExtStage::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/AssociatedPrimeExtStage@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.AssociatedPrimeExtStage.minimal_primes

Return the minimal primes recorded by this AssociatedPrimeExtStage.

Detailed contract

Complete minimal-prime evidence when the annihilator has codimension i.

(self) -> MinimalPrimeDecomposition[C] | None

noether::commalg::AssociatedPrimeExtStage::minimal_primes · Direct Rust declaration

pub fn minimal_primes(&self) -> Option<&MinimalPrimeDecomposition<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/AssociatedPrimeExtStage@1

Executable usage: validation/unit/commalg/test_acceptance_workload.py:69 · validation/unit/commalg/test_acceptance_workload.py:70 · validation/unit/commalg/test_acceptance_workload.py:75 · validation/unit/commalg/test_affine_normalization_facade.py:183 · validation/unit/commalg/test_polynomial_ideal_facade.py:1002 · validation/unit/commalg/test_polynomial_ideal_facade.py:1039

commalg.AssociatedPrimeExtStage.to_json

Serialize this AssociatedPrimeExtStage to its canonical typed JSON representation.

Detailed contract

Serialize the Ext presentation, annihilator, and height-filtered primes.

(self) -> str

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

Replay and verify the mathematical evidence carried by this AssociatedPrimeExtStage.

Detailed contract

Independently replay this rational Ext-stage annihilator evidence. Independently replay this finite-field Ext-stage annihilator evidence.

(self) -> None

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

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