Skip to content

homalg · GradedBettiTable

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

Worked example

The complete checked program Reduce a module element and certify a minimal free resolution uses this API directly.

# SPDX-License-Identifier: MIT
# Copyright (c) 2026 Benjamin Antieau and Deven Manam
"""Reduce a module element and certify a minimal free resolution."""

from noether import Q
from noether.commalg import Degree, MonomialOrder, PolynomialRing
from noether.homalg import (
    FreeModule,
    ModuleElement,
    ModuleHomomorphism,
    ModuleMonomialOrder,
    PresentedModule,
    Submodule,
)
from noether.linalg import Matrix, Vector


def main() -> None:
    ring = PolynomialRing(Q, ["x", "y", "z", "w"])
    x, y, z, w = ring.generators()
    order = ModuleMonomialOrder.term_over_position(MonomialOrder.GREVLEX)

    ambient = FreeModule(ring, 2)
    first = ModuleElement(ambient, Vector.from_values(ring, [x, y]))
    second = ModuleElement(ambient, Vector.from_values(ring, [y, 1]))
    submodule = Submodule.from_generators(ambient, [first, second])
    basis = submodule.groebner_basis(order)
    reduction = basis.reduce(first + second * x)
    basis.verify()
    reduction.verify()
    assert reduction.is_member()

    target = FreeModule(ring, 1, grading_rank=1, degree_shifts=[Degree([0])])
    source = FreeModule(ring, 3, grading_rank=1, degree_shifts=[Degree([-2])] * 3)
    twisted_cubic = PresentedModule(
        ModuleHomomorphism(
            source,
            target,
            Matrix.from_rows(ring, [[x * z - y**2, x * w - y * z, y * w - z**2]]),
        )
    )
    resolution = twisted_cubic.minimal_free_resolution(order)
    resolution.verify()
    betti = resolution.graded_betti_table()
    betti.verify()
    assert betti.entries == [
        (0, Degree([0]), 1),
        (1, Degree([2]), 3),
        (2, Degree([3]), 2),
    ]
    print(f"module member certified; minimal Betti entries={betti.entries}")


if __name__ == "__main__":
    main()

Run it with .venv/bin/python examples/30_modules_and_resolutions.py.

homalg.GradedBettiTable

Canonical exact multigraded Betti numbers.

class GradedBettiTable

noether::homalg::GradedBettiTable · Direct Rust declaration

pub struct GradedBettiTable { /* 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/GradedBettiTable@1

Executable usage: validation/unit/homalg/test_module_facade.py:26 · validation/unit/homalg/test_module_facade.py:851 · validation/unit/homalg/test_module_facade.py:861

homalg.GradedBettiTable.completeness

Return the completeness recorded by this GradedBettiTable.

Detailed contract

Exact completeness or truncation claim inherited from the resolution.

(self) -> ResolutionCompleteness

noether::homalg::GradedBettiTable::completeness · Direct Rust declaration

pub fn completeness(&self) -> &ResolutionCompleteness
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/GradedBettiTable@1

Executable usage: validation/unit/homalg/test_module_facade.py:422 · validation/unit/homalg/test_module_facade.py:423 · validation/unit/homalg/test_module_facade.py:812 · validation/unit/homalg/test_module_facade.py:813 · validation/unit/homalg/test_module_facade.py:820 · validation/unit/homalg/test_module_facade.py:821

homalg.GradedBettiTable.entries

Return the entries recorded by this GradedBettiTable.

Detailed contract

Canonical nonzero (homological degree, internal degree, multiplicity) entries.

(self) -> list[tuple[int, Degree, int]]

noether::homalg::GradedBettiTable::entries · Direct Rust declaration

pub fn entries(&self) -> &[(usize, Degree, usize)]
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/GradedBettiTable@1

Executable usage: examples/30_modules_and_resolutions.py:46 · examples/30_modules_and_resolutions.py:51 · validation/unit/homalg/test_padic_homology_facade.py:161 · validation/unit/infra/test_boundary_properties.py:28 · validation/unit/infra/test_boundary_properties.py:29 · validation/unit/infra/test_docs_site_generator.py:24

homalg.GradedBettiTable.from_json

Deserialize and revalidate a GradedBettiTable from typed JSON.

Detailed contract

Deserialize and independently revalidate an exact table.

(cls, value: str) -> GradedBettiTable

noether::homalg::GradedBettiTable::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/GradedBettiTable@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.GradedBettiTable.get

Compute get for this GradedBettiTable.

Detailed contract

One exact multigraded Betti number.

(self, homological_degree: int, internal_degree: Degree) -> int

noether::homalg::GradedBettiTable::get · Direct Rust declaration

pub fn get(&self, homological_degree: usize, internal_degree: &Degree) -> usize
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/GradedBettiTable@1

Executable usage: examples/distributed/f2_linear_algebra.py:22 · examples/distributed/f2_linear_algebra.py:26 · examples/distributed/f2_linear_algebra.py:27 · validation/unit/commalg/test_groebner_verification_budget.py:36 · validation/unit/commalg/test_groebner_verification_budget.py:39 · validation/unit/commalg/test_groebner_verification_budget.py:41

homalg.GradedBettiTable.grading

Return the grading recorded by this GradedBettiTable.

Detailed contract

Exact polynomial-ring grading.

(self) -> FreeAbelianGrading

noether::homalg::GradedBettiTable::grading · Direct Rust declaration

pub fn grading(&self) -> &FreeAbelianGrading
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/GradedBettiTable@1

Executable usage: examples/14_weighted_polynomials.py:10 · examples/14_weighted_polynomials.py:3 · validation/unit/commalg/test_base_change.py:23 · validation/unit/commalg/test_base_change.py:34 · validation/unit/commalg/test_construction_algebras.py:44 · validation/unit/commalg/test_context_tower_workload.py:42

homalg.GradedBettiTable.length

Return the length recorded by this GradedBettiTable.

Detailed contract

Greatest represented homological degree.

(self) -> int

noether::homalg::GradedBettiTable::length · Direct Rust declaration

pub fn length(&self) -> usize
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/GradedBettiTable@1

Executable usage: validation/unit/groups/test_permutation_group_facade.py:52 · validation/unit/groups/test_permutation_group_facade.py:53 · validation/unit/groups/test_permutation_group_facade.py:54 · validation/unit/groups/test_permutation_group_facade.py:55 · validation/unit/groups/test_permutation_group_facade.py:56 · validation/unit/homalg/test_module_facade.py:421

homalg.GradedBettiTable.projective_dimension

Compute projective dimension for this GradedBettiTable.

Detailed contract

Projective dimension when the resolution is proved complete.

(self) -> int | None

noether::homalg::GradedBettiTable::projective_dimension · Direct Rust declaration

pub fn projective_dimension(&self) -> Option<usize>
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/GradedBettiTable@1

Executable usage: validation/unit/homalg/test_module_facade.py:501 · validation/unit/homalg/test_module_facade.py:503 · validation/unit/homalg/test_module_facade.py:860 · validation/unit/homalg/test_module_facade.py:874 · validation/bench/macaulay2_derived.py:485

homalg.GradedBettiTable.to_json

Serialize this GradedBettiTable to its canonical typed JSON representation.

Detailed contract

Serialize the complete exact table as typed JSON.

(self) -> str

noether::homalg::GradedBettiTable::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/GradedBettiTable@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.GradedBettiTable.total

Compute total for this GradedBettiTable.

Detailed contract

Total rank in one represented homological degree.

(self, homological_degree: int) -> int

noether::homalg::GradedBettiTable::total · Direct Rust declaration

pub fn total(&self, homological_degree: usize) -> usize
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/GradedBettiTable@1

Executable usage: validation/unit/homalg/test_module_facade.py:855 · validation/unit/homalg/test_module_facade.py:856 · validation/unit/homalg/test_module_facade.py:857 · validation/unit/infra/test_sdist_audit.py:3 · validation/corpus/combin/dundee-exact-winning-probabilities.py:12 · validation/corpus/combin/dundee-exact-winning-probabilities.py:24

homalg.GradedBettiTable.verify

Replay and verify the mathematical evidence carried by this GradedBettiTable.

Detailed contract

Independently recheck all canonical sparse-table invariants.

(self) -> None

noether::homalg::GradedBettiTable::verify · Direct Rust declaration

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