Skip to content

commalg · AssociatedPrimeSet

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

Worked example

The complete checked program Split rational primes and factor an ideal in the Gaussian integers uses this API directly.

# SPDX-License-Identifier: MIT
# Copyright (c) 2026 Benjamin Antieau and Deven Manam
"""Split rational primes and factor an ideal in the Gaussian integers."""

from noether import Q
from noether.commalg import PolynomialRing
from noether.numthy import NumberField


def main() -> None:
    polynomials = PolynomialRing(Q, ["x"])
    field = NumberField(polynomials.generator("x") ** 2 + 1, name="i")
    order = field.maximal_order()
    primes = order.prime_ideals_above(5)
    assert len(primes) == 2
    assert all(prime.norm() == 5 for prime in primes)
    ideal = order.fractional_ideal([1 + field.generator])
    assert ideal.norm() == 2
    print(f"(5) splits into norms {[prime.norm() for prime in primes]}; N(1+i)={ideal.norm()}")


if __name__ == "__main__":
    main()

Run it with .venv/bin/python examples/12_number_field_ideals.py.

commalg.AssociatedPrimeSet

Complete verified associated primes of a polynomial ideal.

class AssociatedPrimeSet

noether::commalg::AssociatedPrimeSet · Direct Rust declaration

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

Executable usage: validation/unit/commalg/test_polynomial_ideal_facade.py:15 · validation/unit/commalg/test_polynomial_ideal_facade.py:568 · validation/unit/commalg/test_polynomial_ideal_facade.py:585 · validation/unit/commalg/test_polynomial_ideal_facade.py:591

commalg.AssociatedPrimeSet.from_json

Deserialize and revalidate a AssociatedPrimeSet from typed JSON.

Detailed contract

Deserialize and exactly reverify rational associated-prime evidence. Deserialize and exactly reverify finite-field associated-prime evidence.

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

noether::commalg::AssociatedPrimeSet::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/AssociatedPrimeSet@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.AssociatedPrimeSet.prime_certificates

Return the prime certificates recorded by this AssociatedPrimeSet.

Detailed contract

Canonically ordered associated-prime certificates, including embedded primes.

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

noether::commalg::AssociatedPrimeSet::prime_certificates · Direct Rust declaration

pub fn prime_certificates(&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/AssociatedPrimeSet@1

Executable usage: validation/unit/commalg/test_polynomial_ideal_facade.py:1006 · validation/unit/commalg/test_polynomial_ideal_facade.py:1041 · validation/unit/commalg/test_polynomial_ideal_facade.py:1057 · validation/unit/commalg/test_polynomial_ideal_facade.py:1075 · validation/unit/commalg/test_polynomial_ideal_facade.py:1140 · validation/unit/commalg/test_polynomial_ideal_facade.py:1143

commalg.AssociatedPrimeSet.primes

Return the primes recorded by this AssociatedPrimeSet.

Detailed contract

Canonically ordered associated-prime ideals, including embedded primes.

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

noether::commalg::AssociatedPrimeSet::primes · Direct Rust declaration

pub fn primes(&self) -> Vec<&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/AssociatedPrimeSet@1

Executable usage: examples/12_number_field_ideals.py:14 · examples/12_number_field_ideals.py:15 · examples/12_number_field_ideals.py:16 · examples/12_number_field_ideals.py:19 · examples/12_number_field_ideals.py:3 · validation/unit/commalg/test_polynomial_ideal_facade.py:1150

commalg.AssociatedPrimeSet.resolution

Return the resolution recorded by this AssociatedPrimeSet.

Detailed contract

One complete verified resolution of R/I, shared by all Ext stages.

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

noether::commalg::AssociatedPrimeSet::resolution · Direct Rust declaration

pub fn resolution(&self) -> &FreeResolution<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/AssociatedPrimeSet@1

Executable usage: examples/30_modules_and_resolutions.py:3 · examples/30_modules_and_resolutions.py:42 · examples/30_modules_and_resolutions.py:43 · examples/30_modules_and_resolutions.py:44 · validation/unit/commalg/test_polynomial_ideal_facade.py:570 · validation/unit/homalg/test_module_facade.py:351

commalg.AssociatedPrimeSet.source

Return the source recorded by this AssociatedPrimeSet.

Detailed contract

Original ideal whose quotient module is examined.

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

noether::commalg::AssociatedPrimeSet::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/AssociatedPrimeSet@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.AssociatedPrimeSet.stages

Return the stages recorded by this AssociatedPrimeSet.

Detailed contract

Consecutive Ext stages from codim(I) through the ambient dimension.

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

noether::commalg::AssociatedPrimeSet::stages · Direct Rust declaration

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

Executable usage: validation/unit/commalg/test_polynomial_ideal_facade.py:571 · validation/unit/commalg/test_polynomial_ideal_facade.py:572 · validation/unit/commalg/test_polynomial_ideal_facade.py:573 · 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

commalg.AssociatedPrimeSet.theorem

Return the theorem recorded by this AssociatedPrimeSet.

Detailed contract

Exact theorem proving completeness of the associated-prime set.

(self) -> str

noether::commalg::AssociatedPrimeSet::theorem · Direct Rust declaration

pub const fn theorem(&self) -> &'static str
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/AssociatedPrimeSet@1

Executable usage: examples/13_chinese_remainder_theorem.py:3 · validation/unit/commalg/test_polynomial_ideal_facade.py:1150 · validation/unit/commalg/test_polynomial_ideal_facade.py:507 · validation/unit/commalg/test_polynomial_ideal_facade.py:583 · validation/unit/commalg/test_polynomial_ideal_facade.py:659 · validation/unit/homalg/test_module_facade.py:509

commalg.AssociatedPrimeSet.to_json

Serialize this AssociatedPrimeSet to its canonical typed JSON representation.

Detailed contract

Serialize the source, common resolution, all Ext stages, and prime evidence.

(self) -> str

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

Replay and verify the mathematical evidence carried by this AssociatedPrimeSet.

Detailed contract

Independently replay the rational EHV associated-prime evidence. Independently replay the finite-field EHV associated-prime evidence.

(self) -> None

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