Skip to content

Commit

Permalink
sagemathgh-38730: Expose Coxeter and dual Coxeter numbers in RootSyst…
Browse files Browse the repository at this point in the history
…em class

    
Makes the Coxeter number and dual Coxeter number, which are properties
of a root system, available in the RootSystem class.

The underlying functions already exist in the CartanType, so this is a
matter of exposing them in the RootSytem class.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [X ] The title is concise and informative.
- [X ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ X] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies
    
URL: sagemath#38730
Reported by: Skip G
Reviewer(s): Skip G, Travis Scrimshaw
  • Loading branch information
Release Manager committed Oct 5, 2024
2 parents 92cb1dc + 7da711f commit 0e87e7b
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 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,55 @@ def coambient_space(self, base_ring=QQ):
"""
return self.dual.ambient_space(base_ring)

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

def dual_coxeter_number(self):
"""
Return the dual Coxeter number of a irreducible finite root system.
The dual Coxeter number is equal to 1 plus the sum of the coefficients
of simple roots in the highest short root of the dual root system.
.. SEEALSO:: :meth:`~sage.combinat.root_system.cartan_type.CartanType_standard_finite.dual_coxeter_number`
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
"""
# Check if RootSystem is finite and irreducible
if not (self.is_finite() and self.is_irreducible()):
raise ValueError("the dual Coxeter number is defined only for finite and irreducible root systems")
# Hand over to CartanType method
return self._cartan_type.dual_coxeter_number()


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

0 comments on commit 0e87e7b

Please sign in to comment.