Skip to content

Commit

Permalink
Fixing the index set of a rank 1 Cartan matrix.
Browse files Browse the repository at this point in the history
  • Loading branch information
tscrim committed May 28, 2024
1 parent ffbbea9 commit e602c05
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/sage/combinat/root_system/cartan_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,14 @@ def _CM_init(self, cartan_type, index_set, cartan_type_check):
sage: C = CartanMatrix(['A',1,1]) # indirect doctest # needs sage.graphs
sage: TestSuite(C).run(skip=["_test_category", "_test_change_ring"]) # needs sage.graphs
Check that :issue:`37979` is fixed::
sage: C = CartanMatrix([[2]], index_set=(4,))
sage: C.index_set()
(4,)
sage: CartanType("A3").subtype((2,)) is CartanType("A1").relabel({1:2})
True
"""
self._index_set = index_set
self.set_immutable()
Expand All @@ -396,6 +404,8 @@ def _CM_init(self, cartan_type, index_set, cartan_type_check):
cartan_type = CartanType(cartan_type)
elif self.nrows() == 1:
cartan_type = CartanType(['A', 1])
if index_set != (1,):
cartan_type = cartan_type.relabel({1: index_set[0]})
elif cartan_type_check:
# Placeholder so we don't have to reimplement creating a
# Dynkin diagram from a Cartan matrix
Expand Down

0 comments on commit e602c05

Please sign in to comment.