Reflection group elements

AUTHORS:

  • Christian Stump (initial version 2011–2015)

  • Travis Scrimshaw (14-03-2017): moved element code

class sage.combinat.root_system.reflection_group_element.ComplexReflectionGroupElement

Bases: PermutationGroupElement

An element in a complex reflection group.

action(vec, on_space='primal')

Return the image of vec under the action of self.

INPUT:

  • vec – vector in the basis given by the simple root

  • on_space – (default: 'primal') whether to act as the reflection representation on the given basis, or to act on the dual reflection representation on the dual basis

EXAMPLES:

sage: W = ReflectionGroup((3,1,2))                      # optional - gap3
sage: w = W.from_reduced_word([1, 2, 1, 1, 2])          # optional - gap3
sage: for alpha in W.independent_roots():               # optional - gap3
....:     print("%s -> %s"%(alpha,w.action(alpha)))
(1, 0) -> (E(3), 0)
(-1, 1) -> (-E(3), E(3)^2)
>>> from sage.all import *
>>> W = ReflectionGroup((Integer(3),Integer(1),Integer(2)))                      # optional - gap3
>>> w = W.from_reduced_word([Integer(1), Integer(2), Integer(1), Integer(1), Integer(2)])          # optional - gap3
>>> for alpha in W.independent_roots():               # optional - gap3
...     print("%s -> %s"%(alpha,w.action(alpha)))
(1, 0) -> (E(3), 0)
(-1, 1) -> (-E(3), E(3)^2)
action_on_root(root)

Return the root obtained by applying self to root on the right.

INPUT:

  • root – the root to act on

EXAMPLES:

sage: W = ReflectionGroup(['A',2])                      # optional - gap3
sage: for w in W:                                       # optional - gap3
....:     print("%s %s"%(w.reduced_word(),
....:           [w.action_on_root(beta,side='left') for beta in W.positive_roots()]))
[] [(1, 0), (0, 1), (1, 1)]
[2] [(1, 1), (0, -1), (1, 0)]
[1] [(-1, 0), (1, 1), (0, 1)]
[1, 2] [(0, 1), (-1, -1), (-1, 0)]
[2, 1] [(-1, -1), (1, 0), (0, -1)]
[1, 2, 1] [(0, -1), (-1, 0), (-1, -1)]
>>> from sage.all import *
>>> W = ReflectionGroup(['A',Integer(2)])                      # optional - gap3
>>> for w in W:                                       # optional - gap3
...     print("%s %s"%(w.reduced_word(),
...           [w.action_on_root(beta,side='left') for beta in W.positive_roots()]))
[] [(1, 0), (0, 1), (1, 1)]
[2] [(1, 1), (0, -1), (1, 0)]
[1] [(-1, 0), (1, 1), (0, 1)]
[1, 2] [(0, 1), (-1, -1), (-1, 0)]
[2, 1] [(-1, -1), (1, 0), (0, -1)]
[1, 2, 1] [(0, -1), (-1, 0), (-1, -1)]
action_on_root_indices(i)

Return the right action on the set of roots.

INPUT:

  • i – index of the root to act on

EXAMPLES:

sage: # optional - gap3
sage: W = ReflectionGroup(['A',3])
sage: w = W.w0
sage: N = len(W.roots())
sage: [w.action_on_root_indices(i) for i in range(N)]
[8, 7, 6, 10, 9, 11, 2, 1, 0, 4, 3, 5]

sage: # optional - gap3
sage: W = ReflectionGroup(['A',2], reflection_index_set=['A','B','C'])
sage: w = W.w0
sage: N = len(W.roots())
sage: [w.action_on_root_indices(i) for i in range(N)]
[4, 3, 5, 1, 0, 2]
>>> from sage.all import *
>>> # optional - gap3
>>> W = ReflectionGroup(['A',Integer(3)])
>>> w = W.w0
>>> N = len(W.roots())
>>> [w.action_on_root_indices(i) for i in range(N)]
[8, 7, 6, 10, 9, 11, 2, 1, 0, 4, 3, 5]

>>> # optional - gap3
>>> W = ReflectionGroup(['A',Integer(2)], reflection_index_set=['A','B','C'])
>>> w = W.w0
>>> N = len(W.roots())
>>> [w.action_on_root_indices(i) for i in range(N)]
[4, 3, 5, 1, 0, 2]
canonical_matrix()

Return the matrix of self in the canonical faithful representation.

EXAMPLES:

sage: # needs sage.graphs
sage: W = WeylGroup(['A',2], prefix='s', implementation='permutation')
sage: for w in W:
....:     w.reduced_word()
....:     w.canonical_matrix()
[]
[1 0]
[0 1]
[2]
[ 1  1]
[ 0 -1]
[1]
[-1  0]
[ 1  1]
[1, 2]
[-1 -1]
[ 1  0]
[2, 1]
[ 0  1]
[-1 -1]
[1, 2, 1]
[ 0 -1]
[-1  0]
>>> from sage.all import *
>>> # needs sage.graphs
>>> W = WeylGroup(['A',Integer(2)], prefix='s', implementation='permutation')
>>> for w in W:
...     w.reduced_word()
...     w.canonical_matrix()
[]
[1 0]
[0 1]
[2]
[ 1  1]
[ 0 -1]
[1]
[-1  0]
[ 1  1]
[1, 2]
[-1 -1]
[ 1  0]
[2, 1]
[ 0  1]
[-1 -1]
[1, 2, 1]
[ 0 -1]
[-1  0]
fix_space()

Return the fix space of self.

This is the sub vector space of the underlying vector space on which self acts trivially.

EXAMPLES:

sage: W = ReflectionGroup((1,1,3))                      # optional - gap3
sage: for w in W:                                       # optional - gap3
....:     w.reduced_word()
....:     w.fix_space()
[]
Vector space of degree 2 and dimension 2 over Rational Field
Basis matrix:
[1 0]
[0 1]
[2]
Vector space of degree 2 and dimension 1 over Rational Field
Basis matrix:
[1 0]
[1]
Vector space of degree 2 and dimension 1 over Rational Field
Basis matrix:
[0 1]
[1, 2]
Vector space of degree 2 and dimension 0 over Rational Field
Basis matrix:
[]
[2, 1]
Vector space of degree 2 and dimension 0 over Rational Field
Basis matrix:
[]
[1, 2, 1]
Vector space of degree 2 and dimension 1 over Rational Field
Basis matrix:
[ 1 -1]

sage: W = ReflectionGroup(23)                 # optional - gap3
sage: W.gen(0).fix_space()                    # optional - gap3
Vector space of degree 3 and dimension 2 over Universal Cyclotomic Field
Basis matrix:
[0 1 0]
[0 0 1]
>>> from sage.all import *
>>> W = ReflectionGroup((Integer(1),Integer(1),Integer(3)))                      # optional - gap3
>>> for w in W:                                       # optional - gap3
...     w.reduced_word()
...     w.fix_space()
[]
Vector space of degree 2 and dimension 2 over Rational Field
Basis matrix:
[1 0]
[0 1]
[2]
Vector space of degree 2 and dimension 1 over Rational Field
Basis matrix:
[1 0]
[1]
Vector space of degree 2 and dimension 1 over Rational Field
Basis matrix:
[0 1]
[1, 2]
Vector space of degree 2 and dimension 0 over Rational Field
Basis matrix:
[]
[2, 1]
Vector space of degree 2 and dimension 0 over Rational Field
Basis matrix:
[]
[1, 2, 1]
Vector space of degree 2 and dimension 1 over Rational Field
Basis matrix:
[ 1 -1]

>>> W = ReflectionGroup(Integer(23))                 # optional - gap3
>>> W.gen(Integer(0)).fix_space()                    # optional - gap3
Vector space of degree 3 and dimension 2 over Universal Cyclotomic Field
Basis matrix:
[0 1 0]
[0 0 1]
galois_conjugates()

Return all Galois conjugates of self.

EXAMPLES:

sage: W = ReflectionGroup(4)                            # optional - gap3
sage: for w in W.iteration_tracking_words():            # optional - gap3
....:     print(w.galois_conjugates())
[[1 0]
 [0 1]]
[[   1    0]
 [   0 E(3)], [     1      0]
 [     0 E(3)^2]]
[[ 1/3*E(3) - 1/3*E(3)^2  2/3*E(3) + 1/3*E(3)^2]
 [ 4/3*E(3) + 2/3*E(3)^2 -1/3*E(3) - 2/3*E(3)^2],
 [-1/3*E(3) + 1/3*E(3)^2  1/3*E(3) + 2/3*E(3)^2]
 [ 2/3*E(3) + 4/3*E(3)^2 -2/3*E(3) - 1/3*E(3)^2]]
[[     1      0]
 [     0 E(3)^2], [   1    0]
 [   0 E(3)]]
[[ 1/3*E(3) - 1/3*E(3)^2  2/3*E(3) + 1/3*E(3)^2]
 [-2/3*E(3) + 2/3*E(3)^2  2/3*E(3) + 1/3*E(3)^2],
 [-1/3*E(3) + 1/3*E(3)^2  1/3*E(3) + 2/3*E(3)^2]
 [ 2/3*E(3) - 2/3*E(3)^2  1/3*E(3) + 2/3*E(3)^2]]
[[ 1/3*E(3) - 1/3*E(3)^2 -1/3*E(3) + 1/3*E(3)^2]
 [ 4/3*E(3) + 2/3*E(3)^2  2/3*E(3) + 1/3*E(3)^2],
 [-1/3*E(3) + 1/3*E(3)^2  1/3*E(3) - 1/3*E(3)^2]
 [ 2/3*E(3) + 4/3*E(3)^2  1/3*E(3) + 2/3*E(3)^2]]
[[-1/3*E(3) + 1/3*E(3)^2  1/3*E(3) + 2/3*E(3)^2]
 [ 2/3*E(3) + 4/3*E(3)^2 -2/3*E(3) - 1/3*E(3)^2],
 [ 1/3*E(3) - 1/3*E(3)^2  2/3*E(3) + 1/3*E(3)^2]
 [ 4/3*E(3) + 2/3*E(3)^2 -1/3*E(3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*E(3) + 1/3*E(3)^2 -2/3*E(3) - 1/3*E(3)^2]
 [-4/3*E(3) - 2/3*E(3)^2  1/3*E(3) + 2/3*E(3)^2]]
[[-1/3*E(3) + 1/3*E(3)^2 -2/3*E(3) - 1/3*E(3)^2]
 [ 2/3*E(3) - 2/3*E(3)^2 -2/3*E(3) - 1/3*E(3)^2],
 [ 1/3*E(3) - 1/3*E(3)^2 -1/3*E(3) - 2/3*E(3)^2]
 [-2/3*E(3) + 2/3*E(3)^2 -1/3*E(3) - 2/3*E(3)^2]]
[[     -1       0]
 [      0 -E(3)^2], [   -1     0]
 [    0 -E(3)]]
[[-1/3*E(3) + 1/3*E(3)^2  1/3*E(3) - 1/3*E(3)^2]
 [-4/3*E(3) - 2/3*E(3)^2 -2/3*E(3) - 1/3*E(3)^2],
 [ 1/3*E(3) - 1/3*E(3)^2 -1/3*E(3) + 1/3*E(3)^2]
 [-2/3*E(3) - 4/3*E(3)^2 -1/3*E(3) - 2/3*E(3)^2]]
[[-1  0]
 [ 0 -1]]
[[-1/3*E(3) + 1/3*E(3)^2  1/3*E(3) - 1/3*E(3)^2]
 [ 2/3*E(3) - 2/3*E(3)^2  1/3*E(3) - 1/3*E(3)^2],
 [ 1/3*E(3) - 1/3*E(3)^2 -1/3*E(3) + 1/3*E(3)^2]
 [-2/3*E(3) + 2/3*E(3)^2 -1/3*E(3) + 1/3*E(3)^2]]

sage: data = {w: w.galois_conjugates() for w in W}      # optional - gap3
sage: all(w.galois_conjugates() == data[w] for w in W.iteration_tracking_words())  # optional - gap3
True
>>> from sage.all import *
>>> W = ReflectionGroup(Integer(4))                            # optional - gap3
>>> for w in W.iteration_tracking_words():            # optional - gap3
...     print(w.galois_conjugates())
[[1 0]
 [0 1]]
[[   1    0]
 [   0 E(3)], [     1      0]
 [     0 E(3)^2]]
[[ 1/3*E(3) - 1/3*E(3)^2  2/3*E(3) + 1/3*E(3)^2]
 [ 4/3*E(3) + 2/3*E(3)^2 -1/3*E(3) - 2/3*E(3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1/3*E(3)^2  1/3*E(3) - 1/3*E(3)^2]
 [-4/3*E(3) - 2/3*E(3)^2 -2/3*E(3) - 1/3*E(3)^2],
 [ 1/3*E(3) - 1/3*E(3)^2 -1/3*E(3) + 1/3*E(3)^2]
 [-2/3*E(3) - 4/3*E(3)^2 -1/3*E(3) - 2/3*E(3)^2]]
[[-1  0]
 [ 0 -1]]
[[-1/3*E(3) + 1/3*E(3)^2  1/3*E(3) - 1/3*E(3)^2]
 [ 2/3*E(3) - 2/3*E(3)^2  1/3*E(3) - 1/3*E(3)^2],
 [ 1/3*E(3) - 1/3*E(3)^2 -1/3*E(3) + 1/3*E(3)^2]
 [-2/3*E(3) + 2/3*E(3)^2 -1/3*E(3) + 1/3*E(3)^2]]

>>> data = {w: w.galois_conjugates() for w in W}      # optional - gap3
>>> all(w.galois_conjugates() == data[w] for w in W.iteration_tracking_words())  # optional - gap3
True
length()

Return the length of self in generating reflections.

This is the minimal numbers of generating reflections needed to obtain self.

EXAMPLES:

sage: W = ReflectionGroup(4)                            # optional - gap3
sage: for w in W.iteration_tracking_words():            # optional - gap3
....:     print("{} {}".format(w.reduced_word(), w.length()))
[] 0
[1] 1
[2] 1
[1, 1] 2
[1, 2] 2
[2, 1] 2
[2, 2] 2
[1, 1, 2] 3
[1, 2, 1] 3
[1, 2, 2] 3
[2, 1, 1] 3
[2, 2, 1] 3
[1, 1, 2, 1] 4
[1, 1, 2, 2] 4
[1, 2, 1, 1] 4
[1, 2, 2, 1] 4
[2, 1, 1, 2] 4
[2, 2, 1, 1] 4
[1, 1, 2, 1, 1] 5
[1, 1, 2, 2, 1] 5
[1, 2, 1, 1, 2] 5
[1, 2, 2, 1, 1] 5
[1, 1, 2, 1, 1, 2] 6
[1, 1, 2, 2, 1, 1] 6

sage: data = {w: (len(w.reduced_word()), w.length())    # optional - gap3
....:         for w in W.iteration_tracking_words()}
sage: for w in W:                                       # optional - gap3
....:     assert data[w] == (w.length(), w.length()), w
>>> from sage.all import *
>>> W = ReflectionGroup(Integer(4))                            # optional - gap3
>>> for w in W.iteration_tracking_words():            # optional - gap3
...     print("{} {}".format(w.reduced_word(), w.length()))
[] 0
[1] 1
[2] 1
[1, 1] 2
[1, 2] 2
[2, 1] 2
[2, 2] 2
[1, 1, 2] 3
[1, 2, 1] 3
[1, 2, 2] 3
[2, 1, 1] 3
[2, 2, 1] 3
[1, 1, 2, 1] 4
[1, 1, 2, 2] 4
[1, 2, 1, 1] 4
[1, 2, 2, 1] 4
[2, 1, 1, 2] 4
[2, 2, 1, 1] 4
[1, 1, 2, 1, 1] 5
[1, 1, 2, 2, 1] 5
[1, 2, 1, 1, 2] 5
[1, 2, 2, 1, 1] 5
[1, 1, 2, 1, 1, 2] 6
[1, 1, 2, 2, 1, 1] 6

>>> data = {w: (len(w.reduced_word()), w.length())    # optional - gap3
...         for w in W.iteration_tracking_words()}
>>> for w in W:                                       # optional - gap3
...     assert data[w] == (w.length(), w.length()), w
matrix(on_space='primal')

Return self as a matrix acting on the underlying vector space.

  • on_space – (default: 'primal') whether to act as the reflection representation on the given basis, or to act on the dual reflection representation on the dual basis

EXAMPLES:

sage: W = ReflectionGroup((3,1,2))                                          # optional - gap3
sage: data = {w: [w.to_matrix(), w.to_matrix(on_space='dual')] for w in W}  # optional - gap3
sage: for w in W.iteration_tracking_words():                                # optional - gap3
....:     w.reduced_word()
....:     mats = [w.to_matrix(), w.to_matrix(on_space='dual')]
....:     mats
....:     assert data[w] == mats
[]
[
[1 0]  [1 0]
[0 1], [0 1]
]
[1]
[
[E(3)    0]  [E(3)^2      0]
[   0    1], [     0      1]
]
[2]
[
[0 1]  [0 1]
[1 0], [1 0]
]
[1, 1]
[
[E(3)^2      0]  [E(3)    0]
[     0      1], [   0    1]
]
[1, 2]
[
[   0 E(3)]  [     0 E(3)^2]
[   1    0], [     1      0]
]
[2, 1]
[
[   0    1]  [     0      1]
[E(3)    0], [E(3)^2      0]
]
[1, 1, 2]
[
[     0 E(3)^2]  [   0 E(3)]
[     1      0], [   1    0]
]
[1, 2, 1]
[
[   0 E(3)]  [     0 E(3)^2]
[E(3)    0], [E(3)^2      0]
]
[2, 1, 1]
[
[     0      1]  [   0    1]
[E(3)^2      0], [E(3)    0]
]
[2, 1, 2]
[
[   1    0]  [     1      0]
[   0 E(3)], [     0 E(3)^2]
]
[1, 1, 2, 1]
[
[     0 E(3)^2]  [     0   E(3)]
[  E(3)      0], [E(3)^2      0]
]
[1, 2, 1, 1]
[
[     0   E(3)]  [     0 E(3)^2]
[E(3)^2      0], [  E(3)      0]
]
[1, 2, 1, 2]
[
[E(3)    0]  [E(3)^2      0]
[   0 E(3)], [     0 E(3)^2]
]
[2, 1, 1, 2]
[
[     1      0]  [   1    0]
[     0 E(3)^2], [   0 E(3)]
]
[1, 1, 2, 1, 1]
[
[     0 E(3)^2]  [   0 E(3)]
[E(3)^2      0], [E(3)    0]
]
[1, 1, 2, 1, 2]
[
[E(3)^2      0]  [  E(3)      0]
[     0   E(3)], [     0 E(3)^2]
]
[1, 2, 1, 1, 2]
[
[  E(3)      0]  [E(3)^2      0]
[     0 E(3)^2], [     0   E(3)]
]
[1, 1, 2, 1, 1, 2]
[
[E(3)^2      0]  [E(3)    0]
[     0 E(3)^2], [   0 E(3)]
]
>>> from sage.all import *
>>> W = ReflectionGroup((Integer(3),Integer(1),Integer(2)))                                          # optional - gap3
>>> data = {w: [w.to_matrix(), w.to_matrix(on_space='dual')] for w in W}  # optional - gap3
>>> for w in W.iteration_tracking_words():                                # optional - gap3
...     w.reduced_word()
...     mats = [w.to_matrix(), w.to_matrix(on_space='dual')]
...     mats
...     assert data[w] == mats
[]
[
[1 0]  [1 0]
[0 1], [0 1]
]
[1]
[
[E(3)    0]  [E(3)^2      0]
[   0    1], [     0      1]
]
[2]
[
[0 1]  [0 1]
[1 0], [1 0]
]
[1, 1]
[
[E(3)^2      0]  [E(3)    0]
[     0      1], [   0    1]
]
[1, 2]
[
[   0 E(3)]  [     0 E(3)^2]
[   1    0], [     1      0]
]
[2, 1]
[
[   0    1]  [     0      1]
[E(3)    0], [E(3)^2      0]
]
[1, 1, 2]
[
[     0 E(3)^2]  [   0 E(3)]
[     1      0], [   1    0]
]
[1, 2, 1]
[
[   0 E(3)]  [     0 E(3)^2]
[E(3)    0], [E(3)^2      0]
]
[2, 1, 1]
[
[     0      1]  [   0    1]
[E(3)^2      0], [E(3)    0]
]
[2, 1, 2]
[
[   1    0]  [     1      0]
[   0 E(3)], [     0 E(3)^2]
]
[1, 1, 2, 1]
[
[     0 E(3)^2]  [     0   E(3)]
[  E(3)      0], [E(3)^2      0]
]
[1, 2, 1, 1]
[
[     0   E(3)]  [     0 E(3)^2]
[E(3)^2      0], [  E(3)      0]
]
[1, 2, 1, 2]
[
[E(3)    0]  [E(3)^2      0]
[   0 E(3)], [     0 E(3)^2]
]
[2, 1, 1, 2]
[
[     1      0]  [   1    0]
[     0 E(3)^2], [   0 E(3)]
]
[1, 1, 2, 1, 1]
[
[     0 E(3)^2]  [   0 E(3)]
[E(3)^2      0], [E(3)    0]
]
[1, 1, 2, 1, 2]
[
[E(3)^2      0]  [  E(3)      0]
[     0   E(3)], [     0 E(3)^2]
]
[1, 2, 1, 1, 2]
[
[  E(3)      0]  [E(3)^2      0]
[     0 E(3)^2], [     0   E(3)]
]
[1, 1, 2, 1, 1, 2]
[
[E(3)^2      0]  [E(3)    0]
[     0 E(3)^2], [   0 E(3)]
]
reduced_word()

Return a word in the simple reflections to obtain self.

EXAMPLES:

sage: W = ReflectionGroup((5,1,1), index_set=['a'], hyperplane_index_set=['x'], reflection_index_set=['A','B','C','D']) # optional - gap3
sage: [w.reduced_word() for w in W]                     # optional - gap3
[[], ['a'], ['a', 'a'], ['a', 'a', 'a'], ['a', 'a', 'a', 'a']]
>>> from sage.all import *
>>> W = ReflectionGroup((Integer(5),Integer(1),Integer(1)), index_set=['a'], hyperplane_index_set=['x'], reflection_index_set=['A','B','C','D']) # optional - gap3
>>> [w.reduced_word() for w in W]                     # optional - gap3
[[], ['a'], ['a', 'a'], ['a', 'a', 'a'], ['a', 'a', 'a', 'a']]
reduced_word_in_reflections()

Return a word in the reflections to obtain self.

EXAMPLES:

sage: W = ReflectionGroup((5,1,1), index_set=['a'], reflection_index_set=['A','B','C','D']) # optional - gap3
sage: [w.reduced_word_in_reflections() for w in W]      # optional - gap3
[[], ['A'], ['B'], ['C'], ['D']]
>>> from sage.all import *
>>> W = ReflectionGroup((Integer(5),Integer(1),Integer(1)), index_set=['a'], reflection_index_set=['A','B','C','D']) # optional - gap3
>>> [w.reduced_word_in_reflections() for w in W]      # optional - gap3
[[], ['A'], ['B'], ['C'], ['D']]

See also

reduced_word()

reflection_eigenvalues(is_class_representative=False)

Return the reflection eigenvalues of self.

INPUT:

  • is_class_representative – boolean (default: False); whether to first replace self by the representative of its conjugacy class

EXAMPLES:

sage: W = ReflectionGroup(4)                            # optional - gap3
sage: for w in W.iteration_tracking_words():            # optional - gap3
....:      w.reflection_eigenvalues()
[0, 0]
[1/3, 0]
[1/3, 0]
[2/3, 0]
[1/6, 1/2]
[1/6, 1/2]
[2/3, 0]
[1/4, 3/4]
[1/4, 3/4]
[1/4, 3/4]
[1/4, 3/4]
[1/4, 3/4]
[1/3, 0]
[1/2, 5/6]
[1/3, 0]
[1/2, 5/6]
[1/2, 5/6]
[1/2, 5/6]
[1/6, 1/2]
[2/3, 0]
[1/6, 1/2]
[2/3, 0]
[1/2, 1/2]
[1/4, 3/4]

sage: data = {w: w.reflection_eigenvalues() for w in W}  # optional - gap3
sage: all(w.reflection_eigenvalues() == data[w] for w in W.iteration_tracking_words())  # optional - gap3
True
>>> from sage.all import *
>>> W = ReflectionGroup(Integer(4))                            # optional - gap3
>>> for w in W.iteration_tracking_words():            # optional - gap3
...      w.reflection_eigenvalues()
[0, 0]
[1/3, 0]
[1/3, 0]
[2/3, 0]
[1/6, 1/2]
[1/6, 1/2]
[2/3, 0]
[1/4, 3/4]
[1/4, 3/4]
[1/4, 3/4]
[1/4, 3/4]
[1/4, 3/4]
[1/3, 0]
[1/2, 5/6]
[1/3, 0]
[1/2, 5/6]
[1/2, 5/6]
[1/2, 5/6]
[1/6, 1/2]
[2/3, 0]
[1/6, 1/2]
[2/3, 0]
[1/2, 1/2]
[1/4, 3/4]

>>> data = {w: w.reflection_eigenvalues() for w in W}  # optional - gap3
>>> all(w.reflection_eigenvalues() == data[w] for w in W.iteration_tracking_words())  # optional - gap3
True
to_matrix(on_space='primal')

Return self as a matrix acting on the underlying vector space.

  • on_space – (default: 'primal') whether to act as the reflection representation on the given basis, or to act on the dual reflection representation on the dual basis

EXAMPLES:

sage: W = ReflectionGroup((3,1,2))                                          # optional - gap3
sage: data = {w: [w.to_matrix(), w.to_matrix(on_space='dual')] for w in W}  # optional - gap3
sage: for w in W.iteration_tracking_words():                                # optional - gap3
....:     w.reduced_word()
....:     mats = [w.to_matrix(), w.to_matrix(on_space='dual')]
....:     mats
....:     assert data[w] == mats
[]
[
[1 0]  [1 0]
[0 1], [0 1]
]
[1]
[
[E(3)    0]  [E(3)^2      0]
[   0    1], [     0      1]
]
[2]
[
[0 1]  [0 1]
[1 0], [1 0]
]
[1, 1]
[
[E(3)^2      0]  [E(3)    0]
[     0      1], [   0    1]
]
[1, 2]
[
[   0 E(3)]  [     0 E(3)^2]
[   1    0], [     1      0]
]
[2, 1]
[
[   0    1]  [     0      1]
[E(3)    0], [E(3)^2      0]
]
[1, 1, 2]
[
[     0 E(3)^2]  [   0 E(3)]
[     1      0], [   1    0]
]
[1, 2, 1]
[
[   0 E(3)]  [     0 E(3)^2]
[E(3)    0], [E(3)^2      0]
]
[2, 1, 1]
[
[     0      1]  [   0    1]
[E(3)^2      0], [E(3)    0]
]
[2, 1, 2]
[
[   1    0]  [     1      0]
[   0 E(3)], [     0 E(3)^2]
]
[1, 1, 2, 1]
[
[     0 E(3)^2]  [     0   E(3)]
[  E(3)      0], [E(3)^2      0]
]
[1, 2, 1, 1]
[
[     0   E(3)]  [     0 E(3)^2]
[E(3)^2      0], [  E(3)      0]
]
[1, 2, 1, 2]
[
[E(3)    0]  [E(3)^2      0]
[   0 E(3)], [     0 E(3)^2]
]
[2, 1, 1, 2]
[
[     1      0]  [   1    0]
[     0 E(3)^2], [   0 E(3)]
]
[1, 1, 2, 1, 1]
[
[     0 E(3)^2]  [   0 E(3)]
[E(3)^2      0], [E(3)    0]
]
[1, 1, 2, 1, 2]
[
[E(3)^2      0]  [  E(3)      0]
[     0   E(3)], [     0 E(3)^2]
]
[1, 2, 1, 1, 2]
[
[  E(3)      0]  [E(3)^2      0]
[     0 E(3)^2], [     0   E(3)]
]
[1, 1, 2, 1, 1, 2]
[
[E(3)^2      0]  [E(3)    0]
[     0 E(3)^2], [   0 E(3)]
]
>>> from sage.all import *
>>> W = ReflectionGroup((Integer(3),Integer(1),Integer(2)))                                          # optional - gap3
>>> data = {w: [w.to_matrix(), w.to_matrix(on_space='dual')] for w in W}  # optional - gap3
>>> for w in W.iteration_tracking_words():                                # optional - gap3
...     w.reduced_word()
...     mats = [w.to_matrix(), w.to_matrix(on_space='dual')]
...     mats
...     assert data[w] == mats
[]
[
[1 0]  [1 0]
[0 1], [0 1]
]
[1]
[
[E(3)    0]  [E(3)^2      0]
[   0    1], [     0      1]
]
[2]
[
[0 1]  [0 1]
[1 0], [1 0]
]
[1, 1]
[
[E(3)^2      0]  [E(3)    0]
[     0      1], [   0    1]
]
[1, 2]
[
[   0 E(3)]  [     0 E(3)^2]
[   1    0], [     1      0]
]
[2, 1]
[
[   0    1]  [     0      1]
[E(3)    0], [E(3)^2      0]
]
[1, 1, 2]
[
[     0 E(3)^2]  [   0 E(3)]
[     1      0], [   1    0]
]
[1, 2, 1]
[
[   0 E(3)]  [     0 E(3)^2]
[E(3)    0], [E(3)^2      0]
]
[2, 1, 1]
[
[     0      1]  [   0    1]
[E(3)^2      0], [E(3)    0]
]
[2, 1, 2]
[
[   1    0]  [     1      0]
[   0 E(3)], [     0 E(3)^2]
]
[1, 1, 2, 1]
[
[     0 E(3)^2]  [     0   E(3)]
[  E(3)      0], [E(3)^2      0]
]
[1, 2, 1, 1]
[
[     0   E(3)]  [     0 E(3)^2]
[E(3)^2      0], [  E(3)      0]
]
[1, 2, 1, 2]
[
[E(3)    0]  [E(3)^2      0]
[   0 E(3)], [     0 E(3)^2]
]
[2, 1, 1, 2]
[
[     1      0]  [   1    0]
[     0 E(3)^2], [   0 E(3)]
]
[1, 1, 2, 1, 1]
[
[     0 E(3)^2]  [   0 E(3)]
[E(3)^2      0], [E(3)    0]
]
[1, 1, 2, 1, 2]
[
[E(3)^2      0]  [  E(3)      0]
[     0   E(3)], [     0 E(3)^2]
]
[1, 2, 1, 1, 2]
[
[  E(3)      0]  [E(3)^2      0]
[     0 E(3)^2], [     0   E(3)]
]
[1, 1, 2, 1, 1, 2]
[
[E(3)^2      0]  [E(3)    0]
[     0 E(3)^2], [   0 E(3)]
]
to_permutation_of_roots()

Return self as a permutation of the roots with indexing starting at \(1\).

EXAMPLES:

sage: W = ReflectionGroup((1,1,3))                      # optional - gap3
sage: for w in W:       # optional - gap3
....:     perm = w.to_permutation_of_roots()
....:     print("{} {}".format(perm, perm == w))
() True
(1,3)(2,5)(4,6) True
(1,4)(2,3)(5,6) True
(1,6,2)(3,5,4) True
(1,2,6)(3,4,5) True
(1,5)(2,4)(3,6) True
>>> from sage.all import *
>>> W = ReflectionGroup((Integer(1),Integer(1),Integer(3)))                      # optional - gap3
>>> for w in W:       # optional - gap3
...     perm = w.to_permutation_of_roots()
...     print("{} {}".format(perm, perm == w))
() True
(1,3)(2,5)(4,6) True
(1,4)(2,3)(5,6) True
(1,6,2)(3,5,4) True
(1,2,6)(3,4,5) True
(1,5)(2,4)(3,6) True
class sage.combinat.root_system.reflection_group_element.RealReflectionGroupElement

Bases: ComplexReflectionGroupElement

action(vec, side='right', on_space='primal')

Return the image of vec under the action of self.

INPUT:

  • vec – vector in the basis given by the simple root

  • side – (default: 'right') whether the action of self is on the 'left' or on the 'right'

  • on_space – (default: 'primal') whether to act as the reflection representation on the given basis, or to act on the dual reflection representation on the dual basis

EXAMPLES:

sage: W = ReflectionGroup(['A',2])                      # optional - gap3
sage: for w in W:                                       # optional - gap3
....:     print("%s %s"%(w.reduced_word(),
....:           [w.action(weight,side='left') for weight in W.fundamental_weights()]))
[] [(2/3, 1/3), (1/3, 2/3)]
[2] [(2/3, 1/3), (1/3, -1/3)]
[1] [(-1/3, 1/3), (1/3, 2/3)]
[1, 2] [(-1/3, 1/3), (-2/3, -1/3)]
[2, 1] [(-1/3, -2/3), (1/3, -1/3)]
[1, 2, 1] [(-1/3, -2/3), (-2/3, -1/3)]
>>> from sage.all import *
>>> W = ReflectionGroup(['A',Integer(2)])                      # optional - gap3
>>> for w in W:                                       # optional - gap3
...     print("%s %s"%(w.reduced_word(),
...           [w.action(weight,side='left') for weight in W.fundamental_weights()]))
[] [(2/3, 1/3), (1/3, 2/3)]
[2] [(2/3, 1/3), (1/3, -1/3)]
[1] [(-1/3, 1/3), (1/3, 2/3)]
[1, 2] [(-1/3, 1/3), (-2/3, -1/3)]
[2, 1] [(-1/3, -2/3), (1/3, -1/3)]
[1, 2, 1] [(-1/3, -2/3), (-2/3, -1/3)]
action_on_root(root, side='right')

Return the root obtained by applying self to root.

INPUT:

  • root – the root to act on

  • side – (default: 'right') whether the action is on the left or on the right

EXAMPLES:

sage: W = ReflectionGroup(['A',2])           # optional - gap3
sage: for w in W:                            # optional - gap3
....:     print("%s %s"%(w.reduced_word(),
....:           [w.action_on_root(beta,side='left') for beta in W.positive_roots()]))
[] [(1, 0), (0, 1), (1, 1)]
[2] [(1, 1), (0, -1), (1, 0)]
[1] [(-1, 0), (1, 1), (0, 1)]
[1, 2] [(0, 1), (-1, -1), (-1, 0)]
[2, 1] [(-1, -1), (1, 0), (0, -1)]
[1, 2, 1] [(0, -1), (-1, 0), (-1, -1)]

sage: W = ReflectionGroup(['A',2])           # optional - gap3
sage: for w in W:                            # optional - gap3
....:     print("%s %s"%(w.reduced_word(),
....:           [w.action_on_root(beta,side='right') for beta in W.positive_roots()]))
[] [(1, 0), (0, 1), (1, 1)]
[2] [(1, 1), (0, -1), (1, 0)]
[1] [(-1, 0), (1, 1), (0, 1)]
[1, 2] [(-1, -1), (1, 0), (0, -1)]
[2, 1] [(0, 1), (-1, -1), (-1, 0)]
[1, 2, 1] [(0, -1), (-1, 0), (-1, -1)]
>>> from sage.all import *
>>> W = ReflectionGroup(['A',Integer(2)])           # optional - gap3
>>> for w in W:                            # optional - gap3
...     print("%s %s"%(w.reduced_word(),
...           [w.action_on_root(beta,side='left') for beta in W.positive_roots()]))
[] [(1, 0), (0, 1), (1, 1)]
[2] [(1, 1), (0, -1), (1, 0)]
[1] [(-1, 0), (1, 1), (0, 1)]
[1, 2] [(0, 1), (-1, -1), (-1, 0)]
[2, 1] [(-1, -1), (1, 0), (0, -1)]
[1, 2, 1] [(0, -1), (-1, 0), (-1, -1)]

>>> W = ReflectionGroup(['A',Integer(2)])           # optional - gap3
>>> for w in W:                            # optional - gap3
...     print("%s %s"%(w.reduced_word(),
...           [w.action_on_root(beta,side='right') for beta in W.positive_roots()]))
[] [(1, 0), (0, 1), (1, 1)]
[2] [(1, 1), (0, -1), (1, 0)]
[1] [(-1, 0), (1, 1), (0, 1)]
[1, 2] [(-1, -1), (1, 0), (0, -1)]
[2, 1] [(0, 1), (-1, -1), (-1, 0)]
[1, 2, 1] [(0, -1), (-1, 0), (-1, -1)]
action_on_root_indices(i, side='right')

Return the action on the set of roots.

INPUT:

  • i – index of the root to act on

  • side – (default: 'right') whether the action is on the left or on the right

EXAMPLES:

sage: # optional - gap3
sage: W = ReflectionGroup(['A',3])
sage: w = W.w0
sage: N = len(W.roots())
sage: [w.action_on_root_indices(i,side='left') for i in range(N)]
[8, 7, 6, 10, 9, 11, 2, 1, 0, 4, 3, 5]

sage: # optional - gap3
sage: W = ReflectionGroup(['A',2], reflection_index_set=['A','B','C'])
sage: w = W.w0
sage: N = len(W.roots())
sage: [w.action_on_root_indices(i,side='left') for i in range(N)]
[4, 3, 5, 1, 0, 2]
>>> from sage.all import *
>>> # optional - gap3
>>> W = ReflectionGroup(['A',Integer(3)])
>>> w = W.w0
>>> N = len(W.roots())
>>> [w.action_on_root_indices(i,side='left') for i in range(N)]
[8, 7, 6, 10, 9, 11, 2, 1, 0, 4, 3, 5]

>>> # optional - gap3
>>> W = ReflectionGroup(['A',Integer(2)], reflection_index_set=['A','B','C'])
>>> w = W.w0
>>> N = len(W.roots())
>>> [w.action_on_root_indices(i,side='left') for i in range(N)]
[4, 3, 5, 1, 0, 2]
coset_representative(index_set, side='right')

Return the unique shortest element of the Coxeter group \(W\) which is in the same left (resp. right) coset as self, with respect to the parabolic subgroup \(W_I\).

INPUT:

  • index_set – a subset (or iterable) of the nodes of the index set

  • side – (default: right) 'left' or 'right'

EXAMPLES:

sage: # needs sage.graphs
sage: W = CoxeterGroup(['A',4], implementation='permutation')
sage: s = W.simple_reflections()
sage: w = s[2] * s[1] * s[3]
sage: w.coset_representative([]).reduced_word()
[2, 1, 3]
sage: w.coset_representative([1]).reduced_word()
[2, 3]
sage: w.coset_representative([1,2]).reduced_word()
[2, 3]
sage: w.coset_representative([1,3]                 ).reduced_word()
[2]
sage: w.coset_representative([2,3]                 ).reduced_word()
[2, 1]
sage: w.coset_representative([1,2,3]               ).reduced_word()
[]
sage: w.coset_representative([],      side = 'left').reduced_word()
[2, 1, 3]
sage: w.coset_representative([1],     side = 'left').reduced_word()
[2, 1, 3]
sage: w.coset_representative([1,2],   side = 'left').reduced_word()
[3]
sage: w.coset_representative([1,3],   side = 'left').reduced_word()
[2, 1, 3]
sage: w.coset_representative([2,3],   side = 'left').reduced_word()
[1]
sage: w.coset_representative([1,2,3], side = 'left').reduced_word()
[]
>>> from sage.all import *
>>> # needs sage.graphs
>>> W = CoxeterGroup(['A',Integer(4)], implementation='permutation')
>>> s = W.simple_reflections()
>>> w = s[Integer(2)] * s[Integer(1)] * s[Integer(3)]
>>> w.coset_representative([]).reduced_word()
[2, 1, 3]
>>> w.coset_representative([Integer(1)]).reduced_word()
[2, 3]
>>> w.coset_representative([Integer(1),Integer(2)]).reduced_word()
[2, 3]
>>> w.coset_representative([Integer(1),Integer(3)]                 ).reduced_word()
[2]
>>> w.coset_representative([Integer(2),Integer(3)]                 ).reduced_word()
[2, 1]
>>> w.coset_representative([Integer(1),Integer(2),Integer(3)]               ).reduced_word()
[]
>>> w.coset_representative([],      side = 'left').reduced_word()
[2, 1, 3]
>>> w.coset_representative([Integer(1)],     side = 'left').reduced_word()
[2, 1, 3]
>>> w.coset_representative([Integer(1),Integer(2)],   side = 'left').reduced_word()
[3]
>>> w.coset_representative([Integer(1),Integer(3)],   side = 'left').reduced_word()
[2, 1, 3]
>>> w.coset_representative([Integer(2),Integer(3)],   side = 'left').reduced_word()
[1]
>>> w.coset_representative([Integer(1),Integer(2),Integer(3)], side = 'left').reduced_word()
[]
has_descent(i, side='left', positive=False)

Return whether \(i\) is a descent (or ascent) of self.

This is done by testing whether \(i\) is mapped by self to a negative root.

INPUT:

  • i – an index of a simple reflection

  • side – (default: 'right') 'left' or 'right'

  • positive – boolean (default: False)

EXAMPLES:

sage: # optional - gap3
sage: W = ReflectionGroup(["A",3])
sage: s = W.simple_reflections()
sage: (s[1]*s[2]).has_descent(1)
True
sage: (s[1]*s[2]).has_descent(2)
False
>>> from sage.all import *
>>> # optional - gap3
>>> W = ReflectionGroup(["A",Integer(3)])
>>> s = W.simple_reflections()
>>> (s[Integer(1)]*s[Integer(2)]).has_descent(Integer(1))
True
>>> (s[Integer(1)]*s[Integer(2)]).has_descent(Integer(2))
False
has_left_descent(i)

Return whether i is a left descent of self.

This is done by testing whether i is mapped by self to a negative root.

EXAMPLES:

sage: # optional - gap3
sage: W = ReflectionGroup(["A",3])
sage: s = W.simple_reflections()
sage: (s[1]*s[2]).has_left_descent(1)
True
sage: (s[1]*s[2]).has_left_descent(2)
False
>>> from sage.all import *
>>> # optional - gap3
>>> W = ReflectionGroup(["A",Integer(3)])
>>> s = W.simple_reflections()
>>> (s[Integer(1)]*s[Integer(2)]).has_left_descent(Integer(1))
True
>>> (s[Integer(1)]*s[Integer(2)]).has_left_descent(Integer(2))
False
inversion_set(side='right')

Return the inversion set of self.

This is the set \(\{\beta \in \Phi^+ : s(\beta) \in \Phi^-\}\), where \(s\) is self.

EXAMPLES:

sage: W = ReflectionGroup(['A',2])                      # optional - gap3
sage: for w in W:                                       # optional - gap3
....:     print("%s %s"%(w.reduced_word(), w.inversion_set()))
[] []
[2] [(0, 1)]
[1] [(1, 0)]
[1, 2] [(1, 0), (1, 1)]
[2, 1] [(0, 1), (1, 1)]
[1, 2, 1] [(1, 0), (0, 1), (1, 1)]

sage: W.from_reduced_word([1,2]).inversion_set(side='left') # optional - gap3
[(0, 1), (1, 1)]
>>> from sage.all import *
>>> W = ReflectionGroup(['A',Integer(2)])                      # optional - gap3
>>> for w in W:                                       # optional - gap3
...     print("%s %s"%(w.reduced_word(), w.inversion_set()))
[] []
[2] [(0, 1)]
[1] [(1, 0)]
[1, 2] [(1, 0), (1, 1)]
[2, 1] [(0, 1), (1, 1)]
[1, 2, 1] [(1, 0), (0, 1), (1, 1)]

>>> W.from_reduced_word([Integer(1),Integer(2)]).inversion_set(side='left') # optional - gap3
[(0, 1), (1, 1)]
length()

Return the length of self in generating reflections.

This is the minimal numbers of generating reflections needed to obtain self.

EXAMPLES:

sage: W = ReflectionGroup(['A',2])                      # optional - gap3
sage: for w in W:                                       # optional - gap3
....:     print("%s %s"%(w.reduced_word(), w.length()))
[] 0
[2] 1
[1] 1
[1, 2] 2
[2, 1] 2
[1, 2, 1] 3
>>> from sage.all import *
>>> W = ReflectionGroup(['A',Integer(2)])                      # optional - gap3
>>> for w in W:                                       # optional - gap3
...     print("%s %s"%(w.reduced_word(), w.length()))
[] 0
[2] 1
[1] 1
[1, 2] 2
[2, 1] 2
[1, 2, 1] 3
matrix(side='right', on_space='primal')

Return self as a matrix acting on the underlying vector space.

  • side – (default: 'right') whether the action of self is on the 'left' or on the 'right'

  • on_space – (default: 'primal') whether to act as the reflection representation on the given basis, or to act on the dual reflection representation on the dual basis

EXAMPLES:

sage: W = ReflectionGroup(['A',2])           # optional - gap3
sage: for w in W:                            # optional - gap3
....:     w.reduced_word()
....:     [w.to_matrix(), w.to_matrix(on_space='dual')]
[]
[
[1 0]  [1 0]
[0 1], [0 1]
]
[2]
[
[ 1  1]  [ 1  0]
[ 0 -1], [ 1 -1]
]
[1]
[
[-1  0]  [-1  1]
[ 1  1], [ 0  1]
]
[1, 2]
[
[-1 -1]  [ 0 -1]
[ 1  0], [ 1 -1]
]
[2, 1]
[
[ 0  1]  [-1  1]
[-1 -1], [-1  0]
]
[1, 2, 1]
[
[ 0 -1]  [ 0 -1]
[-1  0], [-1  0]
]
>>> from sage.all import *
>>> W = ReflectionGroup(['A',Integer(2)])           # optional - gap3
>>> for w in W:                            # optional - gap3
...     w.reduced_word()
...     [w.to_matrix(), w.to_matrix(on_space='dual')]
[]
[
[1 0]  [1 0]
[0 1], [0 1]
]
[2]
[
[ 1  1]  [ 1  0]
[ 0 -1], [ 1 -1]
]
[1]
[
[-1  0]  [-1  1]
[ 1  1], [ 0  1]
]
[1, 2]
[
[-1 -1]  [ 0 -1]
[ 1  0], [ 1 -1]
]
[2, 1]
[
[ 0  1]  [-1  1]
[-1 -1], [-1  0]
]
[1, 2, 1]
[
[ 0 -1]  [ 0 -1]
[-1  0], [-1  0]
]
reduced_word_in_reflections()

Return a word in the reflections to obtain self.

EXAMPLES:

sage: W = ReflectionGroup(['A',2], index_set=['a','b'], reflection_index_set=['A','B','C']) # optional - gap3
sage: [(w.reduced_word(), w.reduced_word_in_reflections()) for w in W]  # optional - gap3
[([], []),
 (['b'], ['B']),
 (['a'], ['A']),
 (['a', 'b'], ['A', 'B']),
 (['b', 'a'], ['A', 'C']),
 (['a', 'b', 'a'], ['C'])]
>>> from sage.all import *
>>> W = ReflectionGroup(['A',Integer(2)], index_set=['a','b'], reflection_index_set=['A','B','C']) # optional - gap3
>>> [(w.reduced_word(), w.reduced_word_in_reflections()) for w in W]  # optional - gap3
[([], []),
 (['b'], ['B']),
 (['a'], ['A']),
 (['a', 'b'], ['A', 'B']),
 (['b', 'a'], ['A', 'C']),
 (['a', 'b', 'a'], ['C'])]

See also

reduced_word()

to_matrix(side='right', on_space='primal')

Return self as a matrix acting on the underlying vector space.

  • side – (default: 'right') whether the action of self is on the 'left' or on the 'right'

  • on_space – (default: 'primal') whether to act as the reflection representation on the given basis, or to act on the dual reflection representation on the dual basis

EXAMPLES:

sage: W = ReflectionGroup(['A',2])           # optional - gap3
sage: for w in W:                            # optional - gap3
....:     w.reduced_word()
....:     [w.to_matrix(), w.to_matrix(on_space='dual')]
[]
[
[1 0]  [1 0]
[0 1], [0 1]
]
[2]
[
[ 1  1]  [ 1  0]
[ 0 -1], [ 1 -1]
]
[1]
[
[-1  0]  [-1  1]
[ 1  1], [ 0  1]
]
[1, 2]
[
[-1 -1]  [ 0 -1]
[ 1  0], [ 1 -1]
]
[2, 1]
[
[ 0  1]  [-1  1]
[-1 -1], [-1  0]
]
[1, 2, 1]
[
[ 0 -1]  [ 0 -1]
[-1  0], [-1  0]
]
>>> from sage.all import *
>>> W = ReflectionGroup(['A',Integer(2)])           # optional - gap3
>>> for w in W:                            # optional - gap3
...     w.reduced_word()
...     [w.to_matrix(), w.to_matrix(on_space='dual')]
[]
[
[1 0]  [1 0]
[0 1], [0 1]
]
[2]
[
[ 1  1]  [ 1  0]
[ 0 -1], [ 1 -1]
]
[1]
[
[-1  0]  [-1  1]
[ 1  1], [ 0  1]
]
[1, 2]
[
[-1 -1]  [ 0 -1]
[ 1  0], [ 1 -1]
]
[2, 1]
[
[ 0  1]  [-1  1]
[-1 -1], [-1  0]
]
[1, 2, 1]
[
[ 0 -1]  [ 0 -1]
[-1  0], [-1  0]
]