Skip to content

groups · WeightCharacter

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

Worked example

The complete checked program Weight characters and second Chern classes for polynomial GL representations uses this API directly.

# SPDX-License-Identifier: MIT
# Copyright (c) 2026 Benjamin Antieau and Deven Manam
"""Weight characters and second Chern classes for polynomial GL representations."""

from noether.combin import Partition, Tableau
from noether.groups import PolynomialGlRepresentation

shape = Partition((2, 1))
tableaux = Tableau.semistandard(shape, 3)
assert tableaux.cardinality == 8
assert next(tableaux).content(3) == (2, 1, 0)

wedge_two = PolynomialGlRepresentation(4, Partition((1, 1)))
assert wedge_two.weyl_dimension == 6
assert wedge_two.descends_to_sl_quotient(2)
assert wedge_two.second_chern_index() == 2
assert wedge_two.second_chern_index_from_weights() == 2

example = PolynomialGlRepresentation(6, shape)
assert example.weyl_dimension == 70
assert example.second_chern_index() == 33
example.verify_second_chern_index()

character = example.sl_character()
assert character.dimension == 70
assert character.chern_class(2).nonzero_term_count > 0

print("tableaux=8; c2(wedge^2 gamma_4)=2c2; c2(gamma_6^(2,1))=33c2")

Run it with .venv/bin/python examples/27_weight_characters.py.

groups.WeightCharacter

A finite formal character on an explicit weight lattice.

WeightCharacter(lattice: WeightLattice, terms: Sequence[WeightTerm])

noether::groups::WeightCharacter · Direct Rust declaration

pub struct WeightCharacter { /* 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/WeightCharacter@1

Executable usage: validation/unit/groups/test_weight_characters.py:43 · validation/unit/groups/test_weight_characters.py:49 · validation/unit/groups/test_weight_characters.py:8

groups.WeightCharacter.__add__

Add another compatible value to this value.

(self, other: WeightCharacter) -> WeightCharacter

noether::groups::WeightCharacter · 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
Semantic ID noether/groups/WeightCharacter@1

Executable usage: validation/unit/infra/test_discovery.py:211 · validation/unit/infra/test_public_api_index.py:293

groups.WeightCharacter.__eq__

Test mathematical equality with another value.

(self, other: object) -> bool

noether::groups::WeightCharacter · 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
Semantic ID noether/groups/WeightCharacter@1

groups.WeightCharacter.__mul__

Multiply this value by another compatible value.

(self, other: WeightCharacter) -> WeightCharacter

noether::groups::WeightCharacter · 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
Semantic ID noether/groups/WeightCharacter@1

Executable usage: validation/unit/infra/test_public_api_index.py:214

groups.WeightCharacter.checked_add

Compute checked add for this WeightCharacter.

Detailed contract

Character addition in one lattice context.

(self, other: WeightCharacter) -> WeightCharacter

noether::groups::WeightCharacter::checked_add · Direct Rust declaration

pub fn checked_add(&self, other: &Self) -> Result<Self, RepresentationError>
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/WeightCharacter@1

groups.WeightCharacter.chern_class

Compute chern class for this WeightCharacter.

Detailed contract

Homogeneous Chern class c_k in the polynomial ring on the lattice.

(self, degree: int) -> Polynomial[IntegerRing]

noether::groups::WeightCharacter::chern_class · Direct Rust declaration

pub fn chern_class( &self, degree: u64, ) -> Result<Polynomial<IntegerRing>, RepresentationError>
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/WeightCharacter@1

Executable usage: examples/27_weight_characters.py:26 · validation/unit/groups/test_weight_characters.py:64

groups.WeightCharacter.dimension

Return the dimension recorded by this WeightCharacter.

Detailed contract

Sum of all weight multiplicities.

(self) -> int

noether::groups::WeightCharacter::dimension · Direct Rust declaration

pub fn dimension(&self) -> Integer
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/WeightCharacter@1

Executable usage: examples/03_exact_linear_systems.py:15 · examples/03_exact_linear_systems.py:16 · examples/15_groebner_twisted_cubic.py:14 · examples/15_groebner_twisted_cubic.py:28 · examples/27_weight_characters.py:25 · examples/34_finite_group_cohomology.py:13

groups.WeightCharacter.dual

Compute dual for this WeightCharacter.

Detailed contract

Dual character, obtained by negating every weight.

(self) -> WeightCharacter

noether::groups::WeightCharacter::dual · Direct Rust declaration

pub fn dual(&self) -> Self
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/WeightCharacter@1

Executable usage: examples/40_exterior_algebra.py:28 · validation/unit/category/test_category.py:18 · validation/unit/groups/test_weight_characters.py:47 · validation/unit/homalg/test_exterior_algebra.py:123 · validation/unit/homalg/test_exterior_algebra.py:124 · validation/unit/homalg/test_exterior_algebra.py:125

groups.WeightCharacter.from_json

Deserialize and revalidate a WeightCharacter from typed JSON.

Detailed contract

Deserialize and revalidate deterministic weights and multiplicities.

(value: str) -> WeightCharacter

noether::groups::WeightCharacter::from_json · Direct Rust declaration

pub fn from_json(value: &str) -> Result<Self, NoetherError>
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/WeightCharacter@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

groups.WeightCharacter.lattice

Return the lattice recorded by this WeightCharacter.

Detailed contract

Defining weight lattice.

(self) -> WeightLattice

noether::groups::WeightCharacter::lattice · Direct Rust declaration

pub const fn lattice(&self) -> &WeightLattice
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/WeightCharacter@1

Executable usage: examples/06_shortest_lattice_vectors.py:10 · examples/06_shortest_lattice_vectors.py:11 · examples/06_shortest_lattice_vectors.py:12 · examples/06_shortest_lattice_vectors.py:3 · examples/38_exact_linear_systems.py:56 · examples/38_exact_linear_systems.py:57

groups.WeightCharacter.multiplicity

Compute multiplicity for this WeightCharacter.

Detailed contract

Multiplicity of one weight, or zero when it is absent.

(self, weight: Weight) -> int

noether::groups::WeightCharacter::multiplicity · Direct Rust declaration

pub fn multiplicity( &self, weight: &[Integer], ) -> Result<Integer, RepresentationError>
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/WeightCharacter@1

Executable usage: validation/unit/combin/test_acceptance_workload.py:64 · validation/unit/commalg/test_local_algebra.py:65 · validation/unit/commalg/test_local_algebra.py:82 · validation/unit/commalg/test_polynomial_facade.py:126 · validation/unit/commalg/test_polynomial_facade.py:158 · validation/unit/commalg/test_polynomial_facade.py:96

groups.WeightCharacter.restrict

Compute restrict for this WeightCharacter.

Detailed contract

Restrict this character along one checked lattice map.

(self, map: WeightLatticeMap) -> WeightCharacter

noether::groups::WeightCharacter::restrict · Direct Rust declaration

pub fn restrict( &self, map: &WeightLatticeMap, ) -> Result<Self, RepresentationError>
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/WeightCharacter@1

Executable usage: validation/unit/commalg/test_local_algebra.py:93 · validation/unit/groups/test_weight_characters.py:48 · validation/unit/numthy/test_padic_local_field_facade.py:100 · validation/unit/numthy/test_padic_ring_facade.py:62 · validation/unit/numthy/test_qadic_ring_facade.py:48

groups.WeightCharacter.tensor

Compute tensor for this WeightCharacter.

Detailed contract

Tensor-product character by convolution of weights.

(self, other: WeightCharacter) -> WeightCharacter

noether::groups::WeightCharacter::tensor · Direct Rust declaration

pub fn tensor(&self, other: &Self) -> Result<Self, RepresentationError>
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/WeightCharacter@1

Executable usage: examples/23_kashiwara_crystals.py:10 · examples/23_kashiwara_crystals.py:3 · validation/unit/combin/test_acceptance_workload.py:58 · validation/unit/combinatorics/test_kashiwara_crystal.py:41 · validation/unit/combinatorics/test_kashiwara_crystal.py:42 · validation/unit/combinatorics/test_kashiwara_crystal.py:44

groups.WeightCharacter.terms

Return the terms recorded by this WeightCharacter.

Detailed contract

Deterministic weight-to-multiplicity terms.

(self) -> tuple[tuple[tuple[int, ...], int], ...]

noether::groups::WeightCharacter::terms · Direct Rust declaration

pub fn terms(&self) -> impl Iterator<Item = (&[Integer], &Integer)>
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/WeightCharacter@1

Executable usage: examples/07_integer_factorization.py:14 · examples/40_exterior_algebra.py:43 · validation/unit/combin/test_acceptance_workload.py:45 · validation/unit/combin/test_acceptance_workload.py:81 · validation/unit/combinatorics/test_boundary.py:31 · validation/unit/combinatorics/test_boundary.py:44

groups.WeightCharacter.to_json

Serialize this WeightCharacter to its canonical typed JSON representation.

Detailed contract

Serialize deterministic weights and arbitrary-precision multiplicities.

(self) -> str

noether::groups::WeightCharacter::to_json · Direct Rust declaration

pub fn to_json(&self) -> Result<String, NoetherError>
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/WeightCharacter@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

groups.WeightCharacter.total_chern_class

Compute total chern class for this WeightCharacter.

Detailed contract

Total Chern class through maximum_degree, represented in the shared fixed total-degree power-series implementation over Z.

(self, maximum_degree: int) -> PowerSeries[IntegerRing]

noether::groups::WeightCharacter::total_chern_class · Direct Rust declaration

pub fn total_chern_class( &self, maximum_degree: u64, ) -> Result<PowerSeries<IntegerRing>, RepresentationError>
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/WeightCharacter@1

Executable usage: validation/unit/groups/test_weight_characters.py:65

groups.WeightCharacter.verify

Replay and verify the mathematical evidence carried by this WeightCharacter.

Detailed contract

Recheck arities and positive multiplicities.

(self) -> None

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

pub fn verify(&self) -> Result<(), RepresentationError>
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/WeightCharacter@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