Skip to content

Commit f6af55c

Browse files
author
Release Manager
committed
gh-36085: some details in coxeter groups <!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes #1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> this is making a few little changes in the file for the category of Coxeter groups, also fixing a typo <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes #12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - #12345: short description why this is a dependency - #34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: #36085 Reported by: Frédéric Chapoton Reviewer(s): David Coudert
2 parents 45f69ff + d5495ae commit f6af55c

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

src/sage/categories/coxeter_groups.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -518,9 +518,10 @@ def succ(u):
518518

519519
from sage.categories.finite_coxeter_groups import FiniteCoxeterGroups
520520
default_category = FiniteEnumeratedSets() if self in FiniteCoxeterGroups() else EnumeratedSets()
521+
cat = default_category.or_subcategory(category)
521522
return RecursivelyEnumeratedSet_forest((self.one(),), succ,
522-
algorithm='breadth',
523-
category=default_category.or_subcategory(category))
523+
algorithm='breadth',
524+
category=cat)
524525

525526
@cached_method
526527
def coxeter_element(self):
@@ -1239,10 +1240,6 @@ def random_element_of_length(self, n):
12391240
x = x.apply_simple_reflection_right(antiD[rnd])
12401241
return x
12411242

1242-
# TODO: Groups() should have inverse() call __invert__
1243-
# With strong doc stating that this is just a convenience for the user
1244-
# and links to ~ / __invert__
1245-
12461243
# parabolic_subgroup
12471244

12481245
def _test_simple_projections(self, **options):
@@ -2260,7 +2257,6 @@ def binary_factorizations(self, predicate=ConstantFunction(True)):
22602257
if not predicate(W.one()):
22612258
from sage.sets.finite_enumerated_set import FiniteEnumeratedSet
22622259
return FiniteEnumeratedSet([])
2263-
s = W.simple_reflections()
22642260

22652261
def succ(u_v):
22662262
u, v = u_v
@@ -2399,7 +2395,7 @@ def bruhat_lower_covers_reflections(self):
23992395
wi = self.apply_simple_reflection(i, side='right')
24002396
return [(u.apply_simple_reflection(i, side='right'),
24012397
r.apply_conjugation_by_simple_reflection(i))
2402-
for u,r in wi.bruhat_lower_covers_reflections()
2398+
for u, r in wi.bruhat_lower_covers_reflections()
24032399
if not u.has_descent(i, side='right')] + [
24042400
(wi, self.parent().simple_reflection(i))]
24052401

@@ -3148,7 +3144,7 @@ def kazhdan_lusztig_cell(self, side='left'):
31483144
31493145
The cell computation uses the optional package ``coxeter3`` in
31503146
the background if available to speed up the computation,
3151-
even in the different implementations implementations::
3147+
even in the different implementations::
31523148
31533149
sage: # optional - coxeter3, needs sage.combinat sage.groups sage.modules
31543150
sage: W = WeylGroup('A3', prefix='s')

src/sage/categories/monoids.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,8 @@ def inverse(self):
378378
This is an alias for inversion, which can also be invoked
379379
by ``~x`` for an element ``x``.
380380
381+
Nota Bene: Element classes should implement ``__invert__`` only.
382+
381383
EXAMPLES::
382384
383385
sage: AA(sqrt(~2)).inverse() # needs sage.rings.number_field sage.symbolic

0 commit comments

Comments
 (0)