Skip to content

topology · SimplicialCohomologyProduct

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

Worked example

The complete checked program Compute a fast Smith form without transformation matrices uses this API directly.

# SPDX-License-Identifier: MIT
# Copyright (c) 2026 Benjamin Antieau and Deven Manam
"""Compute a fast Smith form without transformation matrices."""

from noether import Z
from noether.linalg import Matrix


def main() -> None:
    matrix = Matrix.from_rows(Z, [[2, 4, 4], [6, 6, 12], [10, 4, 16]])
    smith = matrix.smith_normal_form()
    smith.verify()
    assert all(
        right % left == 0
        for left, right in zip(smith.invariant_factors, smith.invariant_factors[1:])
    )
    print(f"invariant factors: {smith.invariant_factors}")


if __name__ == "__main__":
    main()

Run it with .venv/bin/python examples/04_smith_normal_form.py.

topology.SimplicialCohomologyProduct

One ordered basis product in a finite simplicial cohomology ring.

class SimplicialCohomologyProduct

noether::topology::SimplicialCohomologyProduct · Direct Rust declaration

pub struct SimplicialCohomologyProduct { /* private fields */ }
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, geom-core, m4rst, m4rste
GIL attached / bounded

topology.SimplicialCohomologyProduct.left

Return the left recorded by this SimplicialCohomologyProduct.

Detailed contract

Left global basis index.

(self) -> int

noether::topology::SimplicialCohomologyProduct::left · Direct Rust declaration

pub fn left(&self) -> usize
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, geom-core, m4rst, m4rste
GIL attached / bounded

Executable usage: examples/04_smith_normal_form.py:14 · examples/04_smith_normal_form.py:15 · validation/unit/combin/test_acceptance_workload.py:101 · validation/unit/combin/test_acceptance_workload.py:98 · validation/unit/commalg/test_groebner_verification_budget.py:30 · validation/unit/commalg/test_groebner_verification_budget.py:31

topology.SimplicialCohomologyProduct.right

Return the right recorded by this SimplicialCohomologyProduct.

Detailed contract

Right global basis index.

(self) -> int

noether::topology::SimplicialCohomologyProduct::right · Direct Rust declaration

pub fn right(&self) -> usize
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, geom-core, m4rst, m4rste
GIL attached / bounded

Executable usage: examples/04_smith_normal_form.py:14 · examples/04_smith_normal_form.py:15 · validation/unit/combin/test_acceptance_workload.py:101 · validation/unit/combin/test_acceptance_workload.py:98 · validation/unit/commalg/test_groebner_verification_budget.py:31 · validation/unit/commalg/test_groebner_verification_budget.py:34

topology.SimplicialCohomologyProduct.terms

Return the terms recorded by this SimplicialCohomologyProduct.

Detailed contract

Sparse result in the canonical cohomology basis.

(self) -> list[SimplicialCohomologyProductTerm]

noether::topology::SimplicialCohomologyProduct::terms · Direct Rust declaration

pub fn terms(&self) -> &[SimplicialCohomologyProductTerm]
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, geom-core, m4rst, m4rste
GIL attached / bounded

Executable usage: examples/07_integer_factorization.py:14 · examples/40_exterior_algebra.py:43 · validation/unit/combin/test_acceptance_workload.py:45 · validation/unit/combin/test_acceptance_workload.py:81 · validation/unit/combinatorics/test_boundary.py:31 · validation/unit/combinatorics/test_boundary.py:44