Skip to content

Commit 7b413c7

Browse files
committed
add suggested doctest
1 parent 215d8b4 commit 7b413c7

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/sage/categories/coxeter_groups.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1561,10 +1561,9 @@ def is_fully_commutative(self) -> bool:
15611561
r"""
15621562
Check if ``self`` is a fully-commutative element.
15631563
1564-
We use the characterization that
1565-
an element `w` in a Coxeter system `(W,S)` is
1566-
fully-commutative if and only if for every pair of
1567-
generators `s,t \in S` for which `m(s,t)>2`, no reduced
1564+
We use the characterization that an element `w` in a Coxeter
1565+
system `(W,S)` is fully-commutative if and only if for every pair
1566+
of generators `s,t \in S` for which `m(s,t)>2`, no reduced
15681567
word of `w` contains the 'braid' word `sts...` of length
15691568
`m(s,t)` as a contiguous subword. See [Ste1996]_.
15701569
@@ -1576,6 +1575,12 @@ def is_fully_commutative(self) -> bool:
15761575
sage: W = CoxeterGroup(['B', 3])
15771576
sage: len([1 for w in W if w.is_fully_commutative()])
15781577
24
1578+
1579+
TESTS::
1580+
1581+
sage: W = CoxeterGroup(['A', 2], index_set=['u','v'])
1582+
sage: len([1 for w in W if w.is_fully_commutative()])
1583+
5
15791584
"""
15801585
word = self.reduced_word()
15811586
from sage.combinat.root_system.braid_orbit import is_fully_commutative as is_fully_comm

0 commit comments

Comments
 (0)