Skip to content

Commit

Permalink
sagemathgh-38105: Fixing the index set of a rank 1 Cartan matrix
Browse files Browse the repository at this point in the history
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

Fixes sagemath#37979 by handling passing along the index set for the special
cased rank 1 Cartan matrix.

### 📝 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.
- [x] I have linked a relevant issue or discussion.
- [x] I have created tests covering the changes.
- [x] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->

URL: sagemath#38105
Reported by: Travis Scrimshaw
Reviewer(s): Frédéric Chapoton
  • Loading branch information
Release Manager committed May 29, 2024
2 parents b1d4fa9 + e602c05 commit 0e04f5e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
4 changes: 2 additions & 2 deletions build/pkgs/configure/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
tarball=configure-VERSION.tar.gz
sha1=8164bb387998beb2257d3e09f10697195e958860
sha256=981eb6316a4ff9179b0eb7242e23f4cb39e00372d2aa855efde6885e599e26e8
sha1=ee7627e65e85f8f74e5bdff5201f6de13106050e
sha256=8c6746170ea46928047268bc0f8bbc378ed1af8c62fb5e51b575e0a7bbf4dbea
2 changes: 1 addition & 1 deletion build/pkgs/configure/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
fb2b8c823bcc3f168c1e6e467f254557fa714db9
b72c3bed388e4e57ff7fca3151a57fda13eff35a
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 0e04f5e

Please sign in to comment.