Skip to content

groups · OrbitStabilizer

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

Worked example

The complete checked program Compute all conjugacy classes of A5 and verify orbit-stabilizer uses this API directly.

# SPDX-License-Identifier: MIT
# Copyright (c) 2026 Benjamin Antieau and Deven Manam
"""Compute all conjugacy classes of A5 and verify orbit-stabilizer."""

from noether.groups import Permutation, PermutationGroup


def main() -> None:
    group = PermutationGroup.from_generators(
        5,
        [Permutation.from_images([1, 2, 0, 3, 4]), Permutation.from_images([1, 2, 3, 4, 0])],
    )
    classes = group.conjugacy_classes()
    for conjugacy_class in classes:
        conjugacy_class.verify()
        assert conjugacy_class.centralizer().order * conjugacy_class.size == group.order
    assert sorted(conjugacy_class.size for conjugacy_class in classes) == [1, 12, 12, 15, 20]
    print(f"A5 conjugacy-class sizes: {[value.size for value in classes]}")


if __name__ == "__main__":
    main()

Run it with .venv/bin/python examples/20_conjugacy_classes.py.

groups.OrbitStabilizer

The (orbit, stabilizer) pair returned by PermGroup.orbit_stabilizer, directly encoding the orbit–stabilizer identity |orbit| * |stab| = |G|.

Detailed contract

The (orbit, stabilizer) pair returned by PermGroup.orbit_stabilizer, directly encoding the orbit–stabilizer identity |orbit| * |stab| = |G|.

class OrbitStabilizer

noether::groups::OrbitStabilizer · Direct Rust declaration

pub struct OrbitStabilizer { pub orbit: Vec<u32>, pub stabilizer: PermGroup, }
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, perm-core
GIL attached / bounded

Executable usage: validation/unit/groups/test_acceptance_workload.py:12 · validation/unit/groups/test_acceptance_workload.py:44

groups.OrbitStabilizer.orbit

The orbit, list[int].

(self) -> list[int]

noether::groups::OrbitStabilizer · Python projection

Python projection convenience over this Rust mathematical type
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, perm-core
GIL attached / bounded

Executable usage: examples/20_conjugacy_classes.py:3 · validation/unit/groups/test_acceptance_workload.py:125 · validation/unit/groups/test_acceptance_workload.py:126 · validation/unit/groups/test_acceptance_workload.py:127 · validation/unit/groups/test_acceptance_workload.py:128 · validation/unit/groups/test_acceptance_workload.py:129

groups.OrbitStabilizer.stabilizer

The point stabilizer, as a PermGroup.

(self) -> PermutationGroup

noether::groups::OrbitStabilizer · Python projection

Python projection convenience over this Rust mathematical type
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, perm-core
GIL attached / bounded

Executable usage: examples/19_permutation_groups.py:15 · examples/19_permutation_groups.py:18 · examples/19_permutation_groups.py:3 · examples/20_conjugacy_classes.py:3 · validation/unit/groups/test_acceptance_workload.py:41 · validation/unit/groups/test_acceptance_workload.py:45