Skip to content

category · CategoricalHomologyComponentSlice

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

Worked example

The complete checked program Compose cells, compute polygraphic homology, and inspect the Street model uses this API directly.

# SPDX-License-Identifier: MIT
# Copyright (c) 2026 Benjamin Antieau and Deven Manam
"""Compose cells, compute polygraphic homology, and inspect the Street model."""

from noether.category import AtomId, SteinerCategory


def main() -> None:
    triangle = SteinerCategory.oriental(2)
    first = triangle.atom(AtomId(1, 0))
    second = triangle.atom(AtomId(1, 2))
    long_path = first.compose_at(second, 0)

    assert long_path.top_atoms == [0, 2]
    assert triangle.exact_cell_counts() == [3, 4, 1]
    assert triangle.polygraphic_homology_invariants()[0].free_rank == 1

    categorical = triangle.categorical_homology()
    nerve = categorical.skeleton(2)
    assert nerve.verify()
    assert categorical.component_poset_slice(2).poset.order == 6
    print(
        "2-oriental:",
        f"cells={triangle.exact_cell_counts()}",
        f"Street simplices={nerve.simplex_counts}",
        "stable hPos_0 weight 2 has 6 elements",
    )


if __name__ == "__main__":
    main()

Run it with .venv/bin/python examples/28_steiner_categories.py.

category.CategoricalHomologyComponentSlice

One finite particle-number slice of categorical-homology components.

class CategoricalHomologyComponentSlice

noether::category::CategoricalHomologyComponentSlice · Direct Rust declaration

pub struct CategoricalHomologyComponentSlice { /* private fields */ }
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether
GIL attached / bounded

category.CategoricalHomologyComponentSlice.object_multisets

Return the object multisets recorded by this CategoricalHomologyComponentSlice.

Detailed contract

Object multisets, represented by nondecreasing object indices.

(self) -> list[list[int]]

noether::category::CategoricalHomologyComponentSlice::object_multisets · Direct Rust declaration

pub fn object_multisets(&self) -> &[Vec<usize>]
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether
GIL attached / bounded

category.CategoricalHomologyComponentSlice.particle_number

Return the particle number recorded by this CategoricalHomologyComponentSlice.

Detailed contract

Number of particles in every element of the slice.

(self) -> int

noether::category::CategoricalHomologyComponentSlice::particle_number · Direct Rust declaration

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

category.CategoricalHomologyComponentSlice.poset

Return the poset recorded by this CategoricalHomologyComponentSlice.

Detailed contract

Finite Poset carried by this particle-number slice.

(self) -> Poset

noether::category::CategoricalHomologyComponentSlice::poset · Direct Rust declaration

pub fn poset(&self) -> &Poset
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether
GIL attached / bounded

Executable usage: examples/28_steiner_categories.py:21 · validation/unit/category/test_category.py:72 · validation/unit/combinatorics/test_poset.py:20 · validation/unit/combinatorics/test_poset.py:22 · validation/unit/combinatorics/test_poset.py:23 · validation/unit/combinatorics/test_poset.py:24