Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
added test to check bug in coxeter_groups.py in bruhat_lower_covers_r…
Browse files Browse the repository at this point in the history
…eflections() woth implementation 'permutation' and cleaned up code according to PEP8
  • Loading branch information
DennisJahn committed Nov 23, 2021
1 parent f7a19db commit 37ff44a
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/sage/categories/coxeter_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -1985,12 +1985,25 @@ def bruhat_lower_covers_reflections(self):
sage: w.bruhat_lower_covers_reflections()
[(s1*s2*s1, s1*s2*s3*s2*s1), (s3*s2*s1, s2), (s3*s1*s2, s1)]
Tests:
Check bug discovered in :trac:`32669` is fixed
sage: W = CoxeterGroup(['A',3], implementation='permutation')
sage: W.w0.bruhat_lower_covers_reflections()
[((1,3,7,9)(2,11,6,10)(4,8,5,12), (2,5)(3,9)(4,6)(8,11)(10,12)),
((1,11)(3,10)(4,9)(5,7)(6,12), (1,4)(2,8)(3,5)(7,10)(9,11)),
((1,9,7,3)(2,10,6,11)(4,12,5,8), (1,7)(2,4)(5,6)(8,10)(11,12))]
"""
i = self.first_descent(side='right')
if i is None:
return []
wi = self.apply_simple_reflection(i, side = 'right')
return [(u.apply_simple_reflection(i, side='right'),r.apply_conjugation_by_simple_reflection(i)) for u,r in wi.bruhat_lower_covers_reflections() if not u.has_descent(i, side='right')] + [(wi, self.parent().simple_reflection(i))]
wi = self.apply_simple_reflection(i, side='right')
return [(u.apply_simple_reflection(i, side='right'),
r.apply_conjugation_by_simple_reflection(i))
for u,r in wi.bruhat_lower_covers_reflections()
if not u.has_descent(i, side='right')] + [
(wi, self.parent().simple_reflection(i))]

def lower_cover_reflections(self, side='right'):
r"""
Expand Down

0 comments on commit 37ff44a

Please sign in to comment.