Braid Orbit

Cython function to compute the orbit of the braid moves on a reduced word.

sage.combinat.root_system.braid_orbit.BraidOrbit(word, rels)[source]

Return the orbit of word by all replacements given by rels.

INPUT:

  • word – list of integers

  • rels – list of pairs (A, B), where A and B are lists of integers the same length

EXAMPLES:

sage: from sage.combinat.root_system.braid_orbit import BraidOrbit
sage: word = [1,2,1,3,2,1]
sage: rels = [[[2, 1, 2], [1, 2, 1]], [[3, 1], [1, 3]], [[3, 2, 3], [2, 3, 2]]]
sage: sorted(BraidOrbit(word, rels))
[(1, 2, 1, 3, 2, 1),
 (1, 2, 3, 1, 2, 1),
 (1, 2, 3, 2, 1, 2),
 (1, 3, 2, 1, 3, 2),
 (1, 3, 2, 3, 1, 2),
 (2, 1, 2, 3, 2, 1),
 (2, 1, 3, 2, 1, 3),
 (2, 1, 3, 2, 3, 1),
 (2, 3, 1, 2, 1, 3),
 (2, 3, 1, 2, 3, 1),
 (2, 3, 2, 1, 2, 3),
 (3, 1, 2, 1, 3, 2),
 (3, 1, 2, 3, 1, 2),
 (3, 2, 1, 2, 3, 2),
 (3, 2, 1, 3, 2, 3),
 (3, 2, 3, 1, 2, 3)]
sage: len(_)
16
>>> from sage.all import *
>>> from sage.combinat.root_system.braid_orbit import BraidOrbit
>>> word = [Integer(1),Integer(2),Integer(1),Integer(3),Integer(2),Integer(1)]
>>> rels = [[[Integer(2), Integer(1), Integer(2)], [Integer(1), Integer(2), Integer(1)]], [[Integer(3), Integer(1)], [Integer(1), Integer(3)]], [[Integer(3), Integer(2), Integer(3)], [Integer(2), Integer(3), Integer(2)]]]
>>> sorted(BraidOrbit(word, rels))
[(1, 2, 1, 3, 2, 1),
 (1, 2, 3, 1, 2, 1),
 (1, 2, 3, 2, 1, 2),
 (1, 3, 2, 1, 3, 2),
 (1, 3, 2, 3, 1, 2),
 (2, 1, 2, 3, 2, 1),
 (2, 1, 3, 2, 1, 3),
 (2, 1, 3, 2, 3, 1),
 (2, 3, 1, 2, 1, 3),
 (2, 3, 1, 2, 3, 1),
 (2, 3, 2, 1, 2, 3),
 (3, 1, 2, 1, 3, 2),
 (3, 1, 2, 3, 1, 2),
 (3, 2, 1, 2, 3, 2),
 (3, 2, 1, 3, 2, 3),
 (3, 2, 3, 1, 2, 3)]
>>> len(_)
16
sage.combinat.root_system.braid_orbit.is_fully_commutative(word, rels)[source]

Check if the braid orbit of word is using a braid relation.

INPUT:

  • word – list of integers

  • rels – list of pairs (A, B), where A and B are lists of integers the same length

EXAMPLES:

sage: from sage.combinat.root_system.braid_orbit import is_fully_commutative
sage: rels = [[[2, 1, 2], [1, 2, 1]], [[3, 1], [1, 3]], [[3, 2, 3], [2, 3, 2]]]
sage: word = [1,2,1,3,2,1]
sage: is_fully_commutative(word, rels)
False
sage: word = [1,2,3]
sage: is_fully_commutative(word, rels)
True
>>> from sage.all import *
>>> from sage.combinat.root_system.braid_orbit import is_fully_commutative
>>> rels = [[[Integer(2), Integer(1), Integer(2)], [Integer(1), Integer(2), Integer(1)]], [[Integer(3), Integer(1)], [Integer(1), Integer(3)]], [[Integer(3), Integer(2), Integer(3)], [Integer(2), Integer(3), Integer(2)]]]
>>> word = [Integer(1),Integer(2),Integer(1),Integer(3),Integer(2),Integer(1)]
>>> is_fully_commutative(word, rels)
False
>>> word = [Integer(1),Integer(2),Integer(3)]
>>> is_fully_commutative(word, rels)
True