Skip to content

category · SteinerCanonicalLabel

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

Worked example

The complete checked program Canonically label a cycle and compute its automorphism group uses this API directly.

# SPDX-License-Identifier: MIT
# Copyright (c) 2026 Benjamin Antieau and Deven Manam
"""Canonically label a cycle and compute its automorphism group."""

from noether.combin import Graph


def main() -> None:
    cycle = Graph.from_unweighted(
        5,
        [(0, 1), (1, 2), (2, 3), (3, 4), (4, 0)],
        directed=False,
    )
    canonical = cycle.canonical_label()
    assert canonical.verify(cycle)
    assert canonical.automorphism_group.order == 10
    assert cycle.laplacian()[0] == [2, -1, 0, 0, -1]
    print(f"Aut(C5) has order {canonical.automorphism_group.order}")


if __name__ == "__main__":
    main()

Run it with .venv/bin/python examples/21_graph_symmetry.py.

category.SteinerCanonicalLabel

Exact category canonicalization and symmetry evidence.

class SteinerCanonicalLabel

noether::category::SteinerCanonicalLabel · Direct Rust declaration

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

category.SteinerCanonicalLabel.automorphism_group

Return the automorphism group recorded by this SteinerCanonicalLabel.

Detailed contract

Complete automorphism group on submitted flattened atom ids.

(self) -> PermutationGroup

noether::category::SteinerCanonicalLabel::automorphism_group · Direct Rust declaration

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

Executable usage: examples/21_graph_symmetry.py:16 · examples/21_graph_symmetry.py:18 · examples/29_integral_line_configurations.py:10 · validation/unit/category/test_category.py:55 · validation/unit/combin/test_acceptance_workload.py:31 · validation/unit/combin/test_graph_facade.py:91

category.SteinerCanonicalLabel.category

Return the category recorded by this SteinerCanonicalLabel.

Detailed contract

Canonical category.

(self) -> SteinerCategory

noether::category::SteinerCanonicalLabel::category · Direct Rust declaration

pub fn category(&self) -> &SteinerCategory
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:5 · validation/unit/category/test_acceptance_workload.py:10 · validation/unit/category/test_acceptance_workload.py:11 · validation/unit/category/test_acceptance_workload.py:14 · validation/unit/category/test_acceptance_workload.py:15 · validation/unit/category/test_acceptance_workload.py:16

category.SteinerCanonicalLabel.degreewise_labeling

Return the degreewise labeling recorded by this SteinerCanonicalLabel.

Detailed contract

Degree-local atom images from the submitted category to the canonical one.

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

noether::category::SteinerCanonicalLabel::degreewise_labeling · Direct Rust declaration

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

category.SteinerCanonicalLabel.encoding

Return the encoding recorded by this SteinerCanonicalLabel.

Detailed contract

Version-one canonical unsigned-word encoding. The sequence begins with the number of occupied atomic degrees and the degreewise atom counts. It then stores, column by column, each support length followed by its sorted degree-local atom indices, negative side first. Atom order is induced by the exact canonical labeling of the degree-coloured signed incidence graph.

(self) -> list[int]

noether::category::SteinerCanonicalLabel::encoding · Direct Rust declaration

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

Executable usage: validation/unit/category/test_category.py:17 · validation/unit/infra/test_corpus_acceptance.py:120 · validation/unit/infra/test_corpus_acceptance.py:42 · validation/unit/infra/test_docs_site_generator.py:107 · validation/unit/infra/test_docs_site_generator.py:174 · validation/unit/infra/test_docs_site_generator.py:86

category.SteinerCanonicalLabel.labeling

Return the labeling recorded by this SteinerCanonicalLabel.

Detailed contract

Permutation from submitted flattened atom ids to canonical ids.

(self) -> Permutation

noether::category::SteinerCanonicalLabel::labeling · Direct Rust declaration

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

Executable usage: validation/unit/combin/test_acceptance_workload.py:100 · validation/unit/combin/test_acceptance_workload.py:101 · validation/unit/combin/test_acceptance_workload.py:98 · validation/unit/combin/test_acceptance_workload.py:99 · validation/unit/combin/test_graph_facade.py:58 · validation/unit/combin/test_graph_facade.py:60

category.SteinerCanonicalLabel.transport_cell

Compute transport cell for this SteinerCanonicalLabel.

Detailed contract

Transport one submitted cell into the canonical category.

(self, cell: SteinerCell) -> SteinerCell

noether::category::SteinerCanonicalLabel::transport_cell · Direct Rust declaration

pub fn transport_cell( &self, cell: &SteinerCell, ) -> Result<SteinerCell, CategoryError>
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether
GIL attached / bounded

category.SteinerCanonicalLabel.verify

Replay and verify the mathematical evidence carried by this SteinerCanonicalLabel.

Detailed contract

Verify the relabeling and every stored group generator.

(self, original: SteinerCategory) -> bool

noether::category::SteinerCanonicalLabel::verify · Direct Rust declaration

pub fn verify(&self, original: &SteinerCategory) -> bool
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether
GIL attached / bounded

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