combin · Composition¶
6 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.
combin.Composition¶
A thin Python handle around Noether's canonical integer composition.
noether::combin::Composition · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, graph-core, perm-core |
| GIL | attached / bounded |
| Semantic ID | noether/combin/Composition@1 |
Executable usage: validation/unit/combinatorics/test_partition_composition.py:37 · validation/unit/combinatorics/test_partition_composition.py:39 · validation/unit/combinatorics/test_partition_composition.py:42 · validation/unit/combinatorics/test_partition_composition.py:43 · validation/unit/combinatorics/test_partition_composition.py:48 · validation/unit/combinatorics/test_partition_composition.py:7
combin.Composition.__eq__¶
Test mathematical equality with another value.
noether::combin::Composition · Python projection
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, graph-core, perm-core |
| GIL | attached / bounded |
| Semantic ID | noether/combin/Composition@1 |
combin.Composition.from_json¶
Deserialize and revalidate the composition.
noether::combin::Composition · Python projection
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, graph-core, perm-core |
| GIL | attached / bounded |
| Semantic ID | noether/combin/Composition@1 |
Executable usage: validation/unit/category/test_category.py:14 · validation/unit/combin/test_acceptance_workload.py:65 · validation/unit/combin/test_acceptance_workload.py:86 · validation/unit/combin/test_graph_facade.py:106 · validation/unit/combin/test_graph_facade.py:25 · validation/unit/combinatorics/test_kashiwara_crystal.py:32
combin.Composition.parts¶
Ordered positive parts.
noether::combin::Composition::parts · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, graph-core, perm-core |
| GIL | attached / bounded |
| Semantic ID | noether/combin/Composition@1 |
Executable usage: validation/unit/combin/test_acceptance_workload.py:45 · validation/unit/combinatorics/test_partition_composition.py:14 · validation/unit/combinatorics/test_partition_composition.py:28 · validation/unit/combinatorics/test_partition_composition.py:40 · validation/unit/combinatorics/test_partition_types.py:43 · validation/unit/groups/test_weight_characters.py:14
combin.Composition.size¶
Integer being composed.
noether::combin::Composition::size · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, graph-core, perm-core |
| GIL | attached / bounded |
| Semantic ID | noether/combin/Composition@1 |
Executable usage: examples/20_conjugacy_classes.py:16 · examples/20_conjugacy_classes.py:17 · examples/20_conjugacy_classes.py:18 · examples/distributed/f2_linear_algebra.py:14 · examples/distributed/f2_linear_algebra.py:60 · validation/unit/combinatorics/test_partition_composition.py:15
combin.Composition.to_json¶
Serialize only the canonical parts.
noether::combin::Composition · Python projection
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, graph-core, perm-core |
| GIL | attached / bounded |
| Semantic ID | noether/combin/Composition@1 |
Executable usage: validation/unit/category/test_category.py:14 · validation/unit/category/test_category.py:15 · validation/unit/combin/test_acceptance_workload.py:30 · validation/unit/combin/test_acceptance_workload.py:65 · validation/unit/combin/test_acceptance_workload.py:86 · validation/unit/combin/test_graph_facade.py:106