Skip to content

groups · PairOrbit

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

Worked example

The complete checked program Decompose a polynomial by a nonstandard positive grading uses this API directly.

# SPDX-License-Identifier: MIT
# Copyright (c) 2026 Benjamin Antieau and Deven Manam
"""Decompose a polynomial by a nonstandard positive grading."""

from noether import Z
from noether.commalg import PolynomialRing, WeightedGrading


def main() -> None:
    ring = PolynomialRing(Z, ["x", "y", "z"], grading=WeightedGrading([1, 2, 3]))
    x, y, z = ring.generators()
    sparse = ring.from_terms([([0, 0, 0], 1), ([2, 0, 0], 1), ([0, 1, 0], 1)])
    polynomial = sparse + z
    assert sparse * (x + y) == (1 + x**2 + y) * (x + y)
    components = polynomial.homogeneous_components()
    assert [degree for degree, _ in components] == [0, 2, 3]
    assert x**2 + y == components[1][1]
    print(f"weighted homogeneous degrees: {[degree for degree, _ in components]}")


if __name__ == "__main__":
    main()

Run it with .venv/bin/python examples/14_weighted_polynomials.py.

groups.PairOrbit

One compact exact diagonal orbit of point pairs.

class PairOrbit

noether::groups::PairOrbit · Direct Rust declaration

pub struct PairOrbit { /* private fields */ }
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, perm-core
GIL attached / bounded
Semantic ID noether/groups/PairOrbit@1

groups.PairOrbit.anchored_suborbits

Stabilizer suborbits encoding the double-coset class.

Detailed contract

Stab_G(left_seed) suborbits defining this double-coset class. Cross-orbit pairs have one suborbit. An unordered pair orbit inside one point orbit has one suborbit when its ordered orbital is self-paired and two when transposition exchanges two orbitals.

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

noether::groups::PairOrbit::anchored_suborbits · Direct Rust declaration

pub fn anchored_suborbits(&self) -> &[Vec<u32>]
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, perm-core
GIL attached / bounded
Semantic ID noether/groups/PairOrbit@1

groups.PairOrbit.degree

Degree of the underlying action.

Detailed contract

Degree of the underlying point action.

(self) -> int

noether::groups::PairOrbit::degree · Direct Rust declaration

pub fn degree(&self) -> usize
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, perm-core
GIL attached / bounded
Semantic ID noether/groups/PairOrbit@1

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

groups.PairOrbit.left_seed

First invariant-orbit seed.

Detailed contract

Seed of the first invariant point orbit.

(self) -> int

noether::groups::PairOrbit::left_seed · Direct Rust declaration

pub fn left_seed(&self) -> u32
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, perm-core
GIL attached / bounded
Semantic ID noether/groups/PairOrbit@1

Executable usage: validation/bench/magma_release.py:601

groups.PairOrbit.representative

Canonical endpoint pair.

Detailed contract

Canonical endpoint pair representing this orbit.

(self) -> list[int]

noether::groups::PairOrbit::representative · Direct Rust declaration

pub fn representative(&self) -> &[u32; 2]
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, perm-core
GIL attached / bounded
Semantic ID noether/groups/PairOrbit@1

Executable usage: validation/unit/commalg/test_residue_ring_facade.py:101 · validation/unit/commalg/test_residue_ring_facade.py:110 · validation/unit/commalg/test_residue_ring_facade.py:129 · validation/unit/commalg/test_residue_ring_facade.py:26 · validation/unit/commalg/test_residue_ring_facade.py:80 · validation/unit/groups/test_acceptance_workload.py:125

groups.PairOrbit.right_seed

Second invariant-orbit seed.

Detailed contract

Seed of the second invariant point orbit.

(self) -> int

noether::groups::PairOrbit::right_seed · Direct Rust declaration

pub fn right_seed(&self) -> u32
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, perm-core
GIL attached / bounded
Semantic ID noether/groups/PairOrbit@1

Executable usage: validation/bench/magma_release.py:603

groups.PairOrbit.same_point_orbit

Whether both endpoints range through one point orbit.

Detailed contract

Whether both endpoints range through the same invariant point orbit.

(self) -> bool

noether::groups::PairOrbit::same_point_orbit · Direct Rust declaration

pub fn same_point_orbit(&self) -> bool
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, perm-core
GIL attached / bounded
Semantic ID noether/groups/PairOrbit@1

groups.PairOrbit.size

Exact orbit cardinality.

Detailed contract

Number of unordered/color-preserving pairs in this orbit.

(self) -> int

noether::groups::PairOrbit::size · Direct Rust declaration

pub fn size(&self) -> usize
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, perm-core
GIL attached / bounded
Semantic ID noether/groups/PairOrbit@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

groups.PairOrbit.verify

Recompute and verify this compact pair orbit.

Detailed contract

Recompute the compact double-coset partition and this orbit exactly.

(self, group: PermutationGroup) -> None

noether::groups::PairOrbit::verify · Direct Rust declaration

pub fn verify(&self, group: &PermGroup) -> Result<(), GroupError>
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, perm-core
GIL attached / bounded
Semantic ID noether/groups/PairOrbit@1

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