Skip to content

combin · PosetCanonicalLabel

6 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.

combin.PosetCanonicalLabel

Exact Poset-owned canonical labeling and symmetry evidence.

class PosetCanonicalLabel

noether::combin::PosetCanonicalLabel · Direct Rust declaration

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

Executable usage: validation/unit/combinatorics/test_poset.py:54 · validation/unit/combinatorics/test_poset.py:9

combin.PosetCanonicalLabel.automorphism_group

Complete automorphism group acting on the original element ids.

Detailed contract

The complete automorphism group on the original element ids.

(self) -> PermutationGroup

noether::combin::PosetCanonicalLabel::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, graph-core, perm-core
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

combin.PosetCanonicalLabel.incidence_sequence

Principal-downset integers in canonical element order.

(self) -> list[int]

noether::combin::PosetCanonicalLabel::incidence_sequence · Direct Rust declaration

pub fn incidence_sequence(&self) -> &[Integer]
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, graph-core, perm-core
GIL attached / bounded

Executable usage: validation/unit/combinatorics/test_poset.py:57

combin.PosetCanonicalLabel.labeling

Permutation from original element ids to canonical ids.

Detailed contract

The permutation from original ids to canonical ids.

(self) -> Permutation

noether::combin::PosetCanonicalLabel::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, graph-core, perm-core
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

combin.PosetCanonicalLabel.poset

Canonically relabeled poset.

Detailed contract

The canonically relabeled poset.

(self) -> Poset

noether::combin::PosetCanonicalLabel::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, graph-core, perm-core
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

combin.PosetCanonicalLabel.verify

Verify the labeling and stored evidence against an original poset.

Detailed contract

Verify the canonical relabeling, incidence sequence, and generators.

(self, original: Poset) -> bool

noether::combin::PosetCanonicalLabel::verify · Direct Rust declaration

pub fn verify(&self, original: &Poset) -> bool
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, graph-core, perm-core
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