Skip to content

Commit

Permalink
Expose Coxeter number and dual Coxeter number
Browse files Browse the repository at this point in the history
  • Loading branch information
skipgaribaldi committed Sep 29, 2024
1 parent d1f99d1 commit 3dcc315
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions src/sage/combinat/root_system/root_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -787,6 +787,56 @@ def coambient_space(self, base_ring=QQ):
"""
return self.dual.ambient_space(base_ring)

def coxeter_number(self):
"""
For an irreducible finite root system, reports the Coxeter number.
This function is a wrapper for the corresponding function in CartanType.
EXAMPLES::
sage: rt = RootSystem(['C', 5])
sage: rt.coxeter_number()
10
.. SEEALSO:: :meth:`~sage.combinat.root_system.cartan_type.CartanType_standard_finite.coxeter_number`
"""
# Check if RootSystem is finite and irreducible
if self.is_finite() and self.is_irreducible():
# Hand over to CartanType method
return self._cartan_type.coxeter_number()
else:
raise ValueError("Coxeter number is defined only for finite and irreducible root systems.")

def dual_coxeter_number(self):
"""
For an irreducible finite root system, reports the dual Coxeter number,
which is defined to be 1 plus the sum of the coefficients of simple roots
in the highest short root of the dual root system. This function is a
wrapper for the corresponding function in CartanType.
EXAMPLES::
sage: rt = RootSystem(['C', 5])
sage: rt.dual_coxeter_number()
6
The dual Coxeter number is not the same concept as the Coxeter number
of the dual root system::
sage: rt.dual
Dual of root system of type ['C', 5]
sage: rt.dual.coxeter_number()
10
.. SEEALSO:: :meth:`~sage.combinat.root_system.cartan_type.CartanType_standard_finite.dual_coxeter_number`
"""
# Check if RootSystem is finite and irreducible
if self.is_finite() and self.is_irreducible():
# Hand over to CartanType method
return self._cartan_type.dual_coxeter_number()
else:
raise ValueError("Dual Coxeter number is defined only for finite and irreducible root systems.")


def WeylDim(ct, coeffs):
"""
Expand Down

0 comments on commit 3dcc315

Please sign in to comment.