Skip to content

topology · SimplicialCohomologyRing

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

Worked example

The complete checked program Compute the mod-two cohomology ring of RP2 and its Steenrod square uses this API directly.

# SPDX-License-Identifier: MIT
# Copyright (c) 2026 Benjamin Antieau and Deven Manam
"""Compute the mod-two cohomology ring of RP2 and its Steenrod square."""

from noether.numthy import FiniteField
from noether.topology import AdmissibleCohomologyOperation, SimplicialComplex


def main() -> None:
    projective_plane = SimplicialComplex(
        [
            [0, 1, 2],
            [0, 1, 4],
            [0, 2, 3],
            [0, 3, 5],
            [0, 4, 5],
            [1, 2, 5],
            [1, 3, 4],
            [1, 3, 5],
            [2, 3, 4],
            [2, 4, 5],
        ]
    )
    cohomology = projective_plane.cohomology_ring(FiniteField.prime(2))
    cohomology.verify()
    assert [basis.degree for basis in cohomology.basis] == [0, 1, 2]
    assert cohomology.product(1, 1)[0].basis == 2

    square = AdmissibleCohomologyOperation.steenrod_square(1)
    image = cohomology.apply_operation(square, 1)
    assert image[0].basis == 2 and int(image[0].coefficient) == 1
    print(f"H*(RP2; F2) degrees={[basis.degree for basis in cohomology.basis]}; Sq^1(h)=h^2")


if __name__ == "__main__":
    main()

Run it with .venv/bin/python examples/33_simplicial_cohomology_operations.py.

topology.SimplicialCohomologyRing

Complete finite-dimensional cohomology algebra over a finite field.

class SimplicialCohomologyRing

noether::topology::SimplicialCohomologyRing · Direct Rust declaration

pub struct SimplicialCohomologyRing { /* 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
Semantic ID noether/topology/SimplicialCohomologyRing@1

Executable usage: validation/unit/topology/test_simplicial_complex_facade.py:188 · validation/unit/topology/test_simplicial_complex_facade.py:20 · validation/unit/topology/test_simplicial_complex_facade.py:201

topology.SimplicialCohomologyRing.apply_operation

Compute apply operation for this SimplicialCohomologyRing.

Detailed contract

Apply one typed admissible Steenrod word to a canonical basis class. The rightmost operation acts first. Every intermediate result is reduced into the retained canonical basis, so the returned coordinates are independently checkable by replaying the single-operation methods.

(self, operation: AdmissibleCohomologyOperation, source: int) -> list[SimplicialCohomologyProductTerm]

noether::topology::SimplicialCohomologyRing::apply_operation · Direct Rust declaration

pub fn apply_operation( &self, operation: &AdmissibleCohomologyOperation, source_index: usize, ) -> Result<Vec<SimplicialCohomologyProductTerm>, TopologyError>
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, geom-core, m4rst, m4rste
GIL attached / bounded
Semantic ID noether/topology/SimplicialCohomologyRing@1

Executable usage: examples/33_simplicial_cohomology_operations.py:30 · validation/unit/topology/test_simplicial_complex_facade.py:197 · validation/unit/topology/test_simplicial_set_facade.py:192

topology.SimplicialCohomologyRing.basis

Return the basis recorded by this SimplicialCohomologyRing.

Detailed contract

Canonical basis, ordered first by degree and then by quotient pivot.

(self) -> list[SimplicialCohomologyBasisElement]

noether::topology::SimplicialCohomologyRing::basis · Direct Rust declaration

pub fn basis(&self) -> &[SimplicialCohomologyBasisElement]
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, geom-core, m4rst, m4rste
GIL attached / bounded
Semantic ID noether/topology/SimplicialCohomologyRing@1

Executable usage: examples/26_elliptic_descent_functions.py:28 · examples/30_modules_and_resolutions.py:27 · examples/30_modules_and_resolutions.py:28 · examples/30_modules_and_resolutions.py:29 · examples/33_simplicial_cohomology_operations.py:26 · examples/33_simplicial_cohomology_operations.py:27

topology.SimplicialCohomologyRing.bockstein_reduced_power

Compute bockstein reduced power for this SimplicialCohomologyRing.

Detailed contract

Odd-primary operation beta P^power on one canonical cohomology-basis class.

(self, power: int, source: int) -> list[SimplicialCohomologyProductTerm]

noether::topology::SimplicialCohomologyRing::bockstein_reduced_power · Direct Rust declaration

pub fn bockstein_reduced_power( &self, power: usize, source_index: usize, ) -> Result<Vec<SimplicialCohomologyProductTerm>, TopologyError>
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, geom-core, m4rst, m4rste
GIL attached / bounded
Semantic ID noether/topology/SimplicialCohomologyRing@1

Executable usage: validation/unit/infra/test_discovery.py:141 · validation/unit/infra/test_discovery.py:149 · validation/unit/topology/test_simplicial_set_facade.py:186 · validation/unit/topology/test_simplicial_set_facade.py:190 · validation/unit/topology/test_simplicial_set_facade.py:191

topology.SimplicialCohomologyRing.complex

Return the complex recorded by this SimplicialCohomologyRing.

Detailed contract

Source complex in its fixed simplex bases.

(self) -> SimplicialComplex

noether::topology::SimplicialCohomologyRing::complex · Direct Rust declaration

pub fn complex(&self) -> &SimplicialComplex
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, geom-core, m4rst, m4rste
GIL attached / bounded
Semantic ID noether/topology/SimplicialCohomologyRing@1

Executable usage: examples/02_ball_arithmetic.py:3 · examples/32_poset_core_and_morse.py:3 · examples/39_kahler_differentials.py:28 · examples/39_kahler_differentials.py:29 · examples/39_kahler_differentials.py:30 · examples/39_kahler_differentials.py:31

topology.SimplicialCohomologyRing.field

Return the field recorded by this SimplicialCohomologyRing.

Detailed contract

Exact coefficient field.

(self) -> FiniteField

noether::topology::SimplicialCohomologyRing::field · Direct Rust declaration

pub fn field(&self) -> &FiniteField
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, geom-core, m4rst, m4rste
GIL attached / bounded
Semantic ID noether/topology/SimplicialCohomologyRing@1

Executable usage: examples/08_finite_field_extensions.py:10 · examples/08_finite_field_extensions.py:11 · examples/08_finite_field_extensions.py:12 · examples/08_finite_field_extensions.py:13 · examples/08_finite_field_extensions.py:14 · examples/08_finite_field_extensions.py:3

topology.SimplicialCohomologyRing.from_json

Deserialize and revalidate a SimplicialCohomologyRing from typed JSON.

Detailed contract

Deserialize and exactly revalidate a cohomology algebra.

(cls, value: str) -> SimplicialCohomologyRing

noether::topology::SimplicialCohomologyRing::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, geom-core, m4rst, m4rste
GIL attached / bounded
Semantic ID noether/topology/SimplicialCohomologyRing@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

topology.SimplicialCohomologyRing.presentation

Return the presentation recorded by this SimplicialCohomologyRing.

Detailed contract

Complete connected quotient presentation, when H^0 is exactly the coefficient field.

(self) -> GradedCommutativePresentation | None

noether::topology::SimplicialCohomologyRing::presentation · Direct Rust declaration

pub fn presentation(&self) -> Option<&GradedCommutativePresentation>
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, geom-core, m4rst, m4rste
GIL attached / bounded
Semantic ID noether/topology/SimplicialCohomologyRing@1

Executable usage: examples/34_finite_group_cohomology.py:3 · validation/unit/category/test_category.py:70 · validation/unit/category/test_category.py:71 · validation/unit/category/test_category.py:72 · validation/unit/commalg/test_graded_commutative_facade.py:24 · validation/unit/commalg/test_graded_commutative_facade.py:25

topology.SimplicialCohomologyRing.product

Compute product for this SimplicialCohomologyRing.

Detailed contract

Return a basis product in either input order, applying its Koszul sign.

(self, left: int, right: int) -> list[SimplicialCohomologyProductTerm]

noether::topology::SimplicialCohomologyRing::product · Direct Rust declaration

pub fn product( &self, left: usize, right: usize, ) -> Result<Vec<SimplicialCohomologyProductTerm>, TopologyError>
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, geom-core, m4rst, m4rste
GIL attached / bounded
Semantic ID noether/topology/SimplicialCohomologyRing@1

Executable usage: examples/33_simplicial_cohomology_operations.py:27 · validation/unit/combin/test_acceptance_workload.py:41 · validation/unit/combin/test_acceptance_workload.py:43 · validation/unit/combin/test_acceptance_workload.py:44 · validation/unit/combin/test_acceptance_workload.py:45 · validation/unit/commalg/test_polynomial_facade.py:234

topology.SimplicialCohomologyRing.products

Return the products recorded by this SimplicialCohomologyRing.

Detailed contract

Ordered basis products with left <= right.

(self) -> list[SimplicialCohomologyProduct]

noether::topology::SimplicialCohomologyRing::products · Direct Rust declaration

pub fn products(&self) -> &[SimplicialCohomologyProduct]
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, geom-core, m4rst, m4rste
GIL attached / bounded
Semantic ID noether/topology/SimplicialCohomologyRing@1

Executable usage: validation/bench/macaulay2_derived.py:6 · validation/corpus/linalg/cubic-discriminant-matrix-factorization.py:54

topology.SimplicialCohomologyRing.steenrod_reduced_power

Compute steenrod reduced power for this SimplicialCohomologyRing.

Detailed contract

Odd-primary Steenrod reduced power P^power of one canonical cohomology-basis class.

(self, power: int, source: int) -> list[SimplicialCohomologyProductTerm]

noether::topology::SimplicialCohomologyRing::steenrod_reduced_power · Direct Rust declaration

pub fn steenrod_reduced_power( &self, power: usize, source_index: usize, ) -> Result<Vec<SimplicialCohomologyProductTerm>, TopologyError>
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, geom-core, m4rst, m4rste
GIL attached / bounded
Semantic ID noether/topology/SimplicialCohomologyRing@1

Executable usage: validation/unit/infra/test_discovery.py:140 · validation/unit/infra/test_discovery.py:148 · validation/unit/topology/test_simplicial_set_facade.py:185 · validation/unit/topology/test_simplicial_set_facade.py:189

topology.SimplicialCohomologyRing.steenrod_square

Compute steenrod square for this SimplicialCohomologyRing.

Detailed contract

Steenrod square of one canonical cohomology-basis class. The operation is computed on the stored canonical cocycle with the normalized cup-i formula and then reduced into the canonical cohomology basis. It is available exactly in characteristic 2.

(self, square: int, source: int) -> list[SimplicialCohomologyProductTerm]

noether::topology::SimplicialCohomologyRing::steenrod_square · Direct Rust declaration

pub fn steenrod_square( &self, square: usize, source_index: usize, ) -> Result<Vec<SimplicialCohomologyProductTerm>, TopologyError>
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, geom-core, m4rst, m4rste
GIL attached / bounded
Semantic ID noether/topology/SimplicialCohomologyRing@1

Executable usage: examples/33_simplicial_cohomology_operations.py:29 · validation/unit/infra/test_discovery.py:139 · validation/unit/infra/test_discovery.py:147 · validation/unit/topology/test_simplicial_complex_facade.py:171 · validation/unit/topology/test_simplicial_complex_facade.py:192 · validation/unit/topology/test_simplicial_complex_facade.py:193

topology.SimplicialCohomologyRing.to_json

Serialize this SimplicialCohomologyRing to its canonical typed JSON representation.

Detailed contract

Serialize the source, coefficient context, cocycles, products, and connected presentation.

(self) -> str

noether::topology::SimplicialCohomologyRing::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, geom-core, m4rst, m4rste
GIL attached / bounded
Semantic ID noether/topology/SimplicialCohomologyRing@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

topology.SimplicialCohomologyRing.verify

Replay and verify the mathematical evidence carried by this SimplicialCohomologyRing.

Detailed contract

Recompute the algebra from its source and compare every cocycle, product, and presentation.

(self) -> None

noether::topology::SimplicialCohomologyRing::verify · Direct Rust declaration

pub fn verify(&self) -> Result<(), TopologyError>
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, geom-core, m4rst, m4rste
GIL attached / bounded
Semantic ID noether/topology/SimplicialCohomologyRing@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