Skip to content

homalg · ModuleAssociatedPrimeSet

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

homalg.ModuleAssociatedPrimeSet

Complete verified associated primes of a finitely presented module.

class ModuleAssociatedPrimeSet

noether::homalg::ModuleAssociatedPrimeSet · Direct Rust declaration

pub struct ModuleAssociatedPrimeSet<R: Field> { /* private fields */ }
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core, groebner-kernel, m4rst, m4rste, module-core, resolution-kernel, sparla
GIL attached / bounded
Semantic ID noether/homalg/ModuleAssociatedPrimeSet@1

Executable usage: validation/unit/homalg/test_module_facade.py:28 · validation/unit/homalg/test_module_facade.py:73 · validation/unit/homalg/test_module_facade.py:83 · validation/unit/homalg/test_module_facade.py:88

homalg.ModuleAssociatedPrimeSet.annihilator

Return the annihilator recorded by this ModuleAssociatedPrimeSet.

Detailed contract

Exact annihilator defining the support and its first possible codimension.

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

noether::homalg::ModuleAssociatedPrimeSet::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, m4rst, m4rste, module-core, resolution-kernel, sparla
GIL attached / bounded
Semantic ID noether/homalg/ModuleAssociatedPrimeSet@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

homalg.ModuleAssociatedPrimeSet.from_json

Deserialize and revalidate a ModuleAssociatedPrimeSet from typed JSON.

Detailed contract

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

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

noether::homalg::ModuleAssociatedPrimeSet::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, m4rst, m4rste, module-core, resolution-kernel, sparla
GIL attached / bounded
Semantic ID noether/homalg/ModuleAssociatedPrimeSet@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

homalg.ModuleAssociatedPrimeSet.prime_certificates

Return the prime certificates recorded by this ModuleAssociatedPrimeSet.

Detailed contract

Canonically ordered associated-prime certificates, including embedded primes.

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

noether::homalg::ModuleAssociatedPrimeSet::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, m4rst, m4rste, module-core, resolution-kernel, sparla
GIL attached / bounded
Semantic ID noether/homalg/ModuleAssociatedPrimeSet@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

homalg.ModuleAssociatedPrimeSet.primes

Return the primes recorded by this ModuleAssociatedPrimeSet.

Detailed contract

Canonically ordered associated-prime ideals, including embedded primes.

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

noether::homalg::ModuleAssociatedPrimeSet::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, m4rst, m4rste, module-core, resolution-kernel, sparla
GIL attached / bounded
Semantic ID noether/homalg/ModuleAssociatedPrimeSet@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

homalg.ModuleAssociatedPrimeSet.resolution

Return the resolution recorded by this ModuleAssociatedPrimeSet.

Detailed contract

One complete verified resolution of the source module.

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

noether::homalg::ModuleAssociatedPrimeSet::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, m4rst, m4rste, module-core, resolution-kernel, sparla
GIL attached / bounded
Semantic ID noether/homalg/ModuleAssociatedPrimeSet@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

homalg.ModuleAssociatedPrimeSet.source

Return the source recorded by this ModuleAssociatedPrimeSet.

Detailed contract

Original retained presentation of the examined module.

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

noether::homalg::ModuleAssociatedPrimeSet::source · Direct Rust declaration

pub fn source(&self) -> &PresentedModule<PolynomialRing<R>>
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core, groebner-kernel, m4rst, m4rste, module-core, resolution-kernel, sparla
GIL attached / bounded
Semantic ID noether/homalg/ModuleAssociatedPrimeSet@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

homalg.ModuleAssociatedPrimeSet.stages

Return the stages recorded by this ModuleAssociatedPrimeSet.

Detailed contract

Consecutive Ext stages from the support codimension through dim(R).

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

noether::homalg::ModuleAssociatedPrimeSet::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, m4rst, m4rste, module-core, resolution-kernel, sparla
GIL attached / bounded
Semantic ID noether/homalg/ModuleAssociatedPrimeSet@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

homalg.ModuleAssociatedPrimeSet.theorem

Return the theorem recorded by this ModuleAssociatedPrimeSet.

Detailed contract

Exact theorem proving completeness of the associated-prime set.

(self) -> str

noether::homalg::ModuleAssociatedPrimeSet::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, m4rst, m4rste, module-core, resolution-kernel, sparla
GIL attached / bounded
Semantic ID noether/homalg/ModuleAssociatedPrimeSet@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

homalg.ModuleAssociatedPrimeSet.to_json

Serialize this ModuleAssociatedPrimeSet to its canonical typed JSON representation.

Detailed contract

Serialize the source, support, common resolution, stages, and prime evidence.

(self) -> str

noether::homalg::ModuleAssociatedPrimeSet::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, m4rst, m4rste, module-core, resolution-kernel, sparla
GIL attached / bounded
Semantic ID noether/homalg/ModuleAssociatedPrimeSet@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

homalg.ModuleAssociatedPrimeSet.verify

Replay and verify the mathematical evidence carried by this ModuleAssociatedPrimeSet.

Detailed contract

Independently replay rational module associated-prime evidence. Independently replay finite-field module associated-prime evidence.

(self) -> None

noether::homalg::ModuleAssociatedPrimeSet::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, m4rst, m4rste, module-core, resolution-kernel, sparla
GIL attached / bounded
Semantic ID noether/homalg/ModuleAssociatedPrimeSet@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