Skip to content

category · AtomId

3 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.AtomId

Degree-local atom identifier.

AtomId(degree: int, index: int)

noether::category::AtomId · Direct Rust declaration

pub struct AtomId { /* private fields */ }
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:10 · examples/28_steiner_categories.py:11 · examples/28_steiner_categories.py:5 · validation/unit/category/test_acceptance_workload.py:10 · validation/unit/category/test_acceptance_workload.py:11 · validation/unit/category/test_acceptance_workload.py:25

category.AtomId.degree

Return the degree recorded by this AtomId.

Detailed contract

Homological degree of the atom.

(self) -> int

noether::category::AtomId::degree · Direct Rust declaration

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

Executable usage: examples/14_weighted_polynomials.py:16 · examples/14_weighted_polynomials.py:18 · examples/15_groebner_twisted_cubic.py:15 · examples/15_groebner_twisted_cubic.py:28 · examples/31_local_fields_and_precision.py:37 · examples/33_simplicial_cohomology_operations.py:26

category.AtomId.index

Return the index recorded by this AtomId.

Detailed contract

Index in the basis of its degree.

(self) -> int

noether::category::AtomId::index · Direct Rust declaration

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

Executable usage: examples/38_exact_linear_systems.py:79 · validation/unit/combinatorics/test_kashiwara_crystal.py:34 · validation/unit/combinatorics/test_kashiwara_crystal.py:35 · validation/unit/combinatorics/test_kashiwara_crystal.py:36 · validation/unit/commalg/test_base_change.py:90 · validation/unit/commalg/test_base_change.py:93