Skip to content

Commit 28d6564

Browse files
committed
fix WeylGroup of rank 0
1 parent d1f99d1 commit 28d6564

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/sage/combinat/root_system/weyl_group.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,8 +1090,18 @@ def iteration(self, algorithm='breadth', tracking_words=True):
10901090
(1,7,5,3)(2,4,6,8)
10911091
(2,8)(3,7)(4,6)
10921092
(1,5)(2,6)(3,7)(4,8)
1093+
1094+
TESTS::
1095+
1096+
sage: W = WeylGroup(["A",0], implementation='permutation')
1097+
sage: list(W)
1098+
[()]
1099+
sage: W[0]
1100+
()
10931101
"""
10941102
from sage.combinat.root_system.reflection_group_c import Iterator
1103+
if self.rank() == 0:
1104+
return iter([self.one()])
10951105
return iter(Iterator(self, N=self.number_of_reflections(),
10961106
algorithm=algorithm, tracking_words=tracking_words))
10971107

0 commit comments

Comments
 (0)