# Coxeter Matrices#

class sage.combinat.root_system.coxeter_matrix.CoxeterMatrix(parent, data, coxeter_type, index_set)[source]#

Bases: CoxeterType

A Coxeter matrix.

A Coxeter matrix $$M = (m_{ij})_{i,j \in I}$$ is a matrix encoding a Coxeter system $$(W, S)$$, where the relations are given by $$(s_i s_j)^{m_{ij}}$$. Thus $$M$$ is symmetric and has entries in $$\{1, 2, 3, \ldots, \infty\}$$ with $$m_{ij} = 1$$ if and only if $$i = j$$.

We represent $$m_{ij} = \infty$$ by any number $$m_{ij} \leq -1$$. In particular, we can construct a bilinear form $$B = (b_{ij})_{i,j \in I}$$ from $$M$$ by

$\begin{split}b_{ij} = \begin{cases} m_{ij} & m_{ij} < 0\ (\text{i.e., } m_{ij} = \infty), \\ -\cos\left( \frac{\pi}{m_{ij}} \right) & \text{otherwise}. \end{cases}\end{split}$

EXAMPLES:

sage: CoxeterMatrix(['A', 4])
[1 3 2 2]
[3 1 3 2]
[2 3 1 3]
[2 2 3 1]
sage: CoxeterMatrix(['B', 4])
[1 3 2 2]
[3 1 3 2]
[2 3 1 4]
[2 2 4 1]
sage: CoxeterMatrix(['C', 4])
[1 3 2 2]
[3 1 3 2]
[2 3 1 4]
[2 2 4 1]
sage: CoxeterMatrix(['D', 4])
[1 3 2 2]
[3 1 3 3]
[2 3 1 2]
[2 3 2 1]

sage: CoxeterMatrix(['E', 6])
[1 2 3 2 2 2]
[2 1 2 3 2 2]
[3 2 1 3 2 2]
[2 3 3 1 3 2]
[2 2 2 3 1 3]
[2 2 2 2 3 1]

sage: CoxeterMatrix(['F', 4])
[1 3 2 2]
[3 1 4 2]
[2 4 1 3]
[2 2 3 1]

sage: CoxeterMatrix(['G', 2])
[1 6]
[6 1]

>>> from sage.all import *
>>> CoxeterMatrix(['A', Integer(4)])
[1 3 2 2]
[3 1 3 2]
[2 3 1 3]
[2 2 3 1]
>>> CoxeterMatrix(['B', Integer(4)])
[1 3 2 2]
[3 1 3 2]
[2 3 1 4]
[2 2 4 1]
>>> CoxeterMatrix(['C', Integer(4)])
[1 3 2 2]
[3 1 3 2]
[2 3 1 4]
[2 2 4 1]
>>> CoxeterMatrix(['D', Integer(4)])
[1 3 2 2]
[3 1 3 3]
[2 3 1 2]
[2 3 2 1]

>>> CoxeterMatrix(['E', Integer(6)])
[1 2 3 2 2 2]
[2 1 2 3 2 2]
[3 2 1 3 2 2]
[2 3 3 1 3 2]
[2 2 2 3 1 3]
[2 2 2 2 3 1]

>>> CoxeterMatrix(['F', Integer(4)])
[1 3 2 2]
[3 1 4 2]
[2 4 1 3]
[2 2 3 1]

>>> CoxeterMatrix(['G', Integer(2)])
[1 6]
[6 1]


By default, entries representing $$\infty$$ are given by $$-1$$ in the Coxeter matrix:

sage: G = Graph([(0,1,None), (1,2,4), (0,2,oo)])
sage: CoxeterMatrix(G)
[ 1  3 -1]
[ 3  1  4]
[-1  4  1]

>>> from sage.all import *
>>> G = Graph([(Integer(0),Integer(1),None), (Integer(1),Integer(2),Integer(4)), (Integer(0),Integer(2),oo)])
>>> CoxeterMatrix(G)
[ 1  3 -1]
[ 3  1  4]
[-1  4  1]


It is possible to give a number $$\leq -1$$ to represent an infinite label:

sage: CoxeterMatrix([[1,-1],[-1,1]])
[ 1 -1]
[-1  1]
sage: CoxeterMatrix([[1,-3/2],[-3/2,1]])
[   1 -3/2]
[-3/2    1]

>>> from sage.all import *
>>> CoxeterMatrix([[Integer(1),-Integer(1)],[-Integer(1),Integer(1)]])
[ 1 -1]
[-1  1]
>>> CoxeterMatrix([[Integer(1),-Integer(3)/Integer(2)],[-Integer(3)/Integer(2),Integer(1)]])
[   1 -3/2]
[-3/2    1]

bilinear_form(R=None)[source]#

Return the bilinear form of self.

EXAMPLES:

sage: # needs sage.libs.gap
sage: CoxeterType(['A', 2, 1]).bilinear_form()
[   1 -1/2 -1/2]
[-1/2    1 -1/2]
[-1/2 -1/2    1]
sage: CoxeterType(['H', 3]).bilinear_form()
[                      1                    -1/2                       0]
[                   -1/2                       1 1/2*E(5)^2 + 1/2*E(5)^3]
[                      0 1/2*E(5)^2 + 1/2*E(5)^3                       1]
sage: C = CoxeterMatrix([[1,-1,-1],[-1,1,-1],[-1,-1,1]])
sage: C.bilinear_form()
[ 1 -1 -1]
[-1  1 -1]
[-1 -1  1]

>>> from sage.all import *
>>> # needs sage.libs.gap
>>> CoxeterType(['A', Integer(2), Integer(1)]).bilinear_form()
[   1 -1/2 -1/2]
[-1/2    1 -1/2]
[-1/2 -1/2    1]
>>> CoxeterType(['H', Integer(3)]).bilinear_form()
[                      1                    -1/2                       0]
[                   -1/2                       1 1/2*E(5)^2 + 1/2*E(5)^3]
[                      0 1/2*E(5)^2 + 1/2*E(5)^3                       1]
>>> C = CoxeterMatrix([[Integer(1),-Integer(1),-Integer(1)],[-Integer(1),Integer(1),-Integer(1)],[-Integer(1),-Integer(1),Integer(1)]])
>>> C.bilinear_form()
[ 1 -1 -1]
[-1  1 -1]
[-1 -1  1]

coxeter_graph()[source]#

Return the Coxeter graph of self.

EXAMPLES:

sage: C = CoxeterMatrix(['A',3])
sage: C.coxeter_graph()
Graph on 3 vertices

sage: C = CoxeterMatrix([['A',3],['A',1]])
sage: C.coxeter_graph()
Graph on 4 vertices

>>> from sage.all import *
>>> C = CoxeterMatrix(['A',Integer(3)])
>>> C.coxeter_graph()
Graph on 3 vertices

>>> C = CoxeterMatrix([['A',Integer(3)],['A',Integer(1)]])
>>> C.coxeter_graph()
Graph on 4 vertices

coxeter_matrix()[source]#

Return the Coxeter matrix of self.

EXAMPLES:

sage: CoxeterMatrix(['C',3]).coxeter_matrix()
[1 3 2]
[3 1 4]
[2 4 1]

>>> from sage.all import *
>>> CoxeterMatrix(['C',Integer(3)]).coxeter_matrix()
[1 3 2]
[3 1 4]
[2 4 1]

coxeter_type()[source]#

Return the Coxeter type of self or self if unknown.

EXAMPLES:

sage: C = CoxeterMatrix(['A',4,1])
sage: C.coxeter_type()
Coxeter type of ['A', 4, 1]

>>> from sage.all import *
>>> C = CoxeterMatrix(['A',Integer(4),Integer(1)])
>>> C.coxeter_type()
Coxeter type of ['A', 4, 1]


If the Coxeter type is unknown:

sage: C = CoxeterMatrix([[1,3,4], [3,1,-1], [4,-1,1]])
sage: C.coxeter_type()
[ 1  3  4]
[ 3  1 -1]
[ 4 -1  1]

>>> from sage.all import *
>>> C = CoxeterMatrix([[Integer(1),Integer(3),Integer(4)], [Integer(3),Integer(1),-Integer(1)], [Integer(4),-Integer(1),Integer(1)]])
>>> C.coxeter_type()
[ 1  3  4]
[ 3  1 -1]
[ 4 -1  1]

index_set()[source]#

Return the index set of self.

EXAMPLES:

sage: C = CoxeterMatrix(['A',1,1])
sage: C.index_set()
(0, 1)
sage: C = CoxeterMatrix(['E',6])
sage: C.index_set()
(1, 2, 3, 4, 5, 6)

>>> from sage.all import *
>>> C = CoxeterMatrix(['A',Integer(1),Integer(1)])
>>> C.index_set()
(0, 1)
>>> C = CoxeterMatrix(['E',Integer(6)])
>>> C.index_set()
(1, 2, 3, 4, 5, 6)

is_affine()[source]#

Return if self is an affine type or False if unknown.

EXAMPLES:

sage: M = CoxeterMatrix(['C',4])
sage: M.is_affine()
False
sage: M = CoxeterMatrix(['D',4,1])
sage: M.is_affine()
True
sage: M = CoxeterMatrix([[1, 3],[3,1]])
sage: M.is_affine()
False
sage: M = CoxeterMatrix([[1, -1, 7], [-1, 1, 3], [7, 3, 1]])
sage: M.is_affine()
False

>>> from sage.all import *
>>> M = CoxeterMatrix(['C',Integer(4)])
>>> M.is_affine()
False
>>> M = CoxeterMatrix(['D',Integer(4),Integer(1)])
>>> M.is_affine()
True
>>> M = CoxeterMatrix([[Integer(1), Integer(3)],[Integer(3),Integer(1)]])
>>> M.is_affine()
False
>>> M = CoxeterMatrix([[Integer(1), -Integer(1), Integer(7)], [-Integer(1), Integer(1), Integer(3)], [Integer(7), Integer(3), Integer(1)]])
>>> M.is_affine()
False

is_crystallographic()[source]#

Return whether self is crystallographic.

A Coxeter matrix is crystallographic if all non-diagonal entries are either 2, 3, 4, or 6.

EXAMPLES:

sage: CoxeterMatrix(['F',4]).is_crystallographic()
True
sage: CoxeterMatrix(['H',3]).is_crystallographic()
False

>>> from sage.all import *
>>> CoxeterMatrix(['F',Integer(4)]).is_crystallographic()
True
>>> CoxeterMatrix(['H',Integer(3)]).is_crystallographic()
False

is_finite()[source]#

Return if self is a finite type or False if unknown.

EXAMPLES:

sage: M = CoxeterMatrix(['C',4])
sage: M.is_finite()
True
sage: M = CoxeterMatrix(['D',4,1])
sage: M.is_finite()
False
sage: M = CoxeterMatrix([[1, -1], [-1, 1]])
sage: M.is_finite()
False

>>> from sage.all import *
>>> M = CoxeterMatrix(['C',Integer(4)])
>>> M.is_finite()
True
>>> M = CoxeterMatrix(['D',Integer(4),Integer(1)])
>>> M.is_finite()
False
>>> M = CoxeterMatrix([[Integer(1), -Integer(1)], [-Integer(1), Integer(1)]])
>>> M.is_finite()
False

is_irreducible()[source]#

Return whether self is irreducible.

A Coxeter matrix is irreducible if the Coxeter graph is connected.

EXAMPLES:

sage: CoxeterMatrix([['F',4],['A',1]]).is_irreducible()
False
sage: CoxeterMatrix(['H',3]).is_irreducible()
True

>>> from sage.all import *
>>> CoxeterMatrix([['F',Integer(4)],['A',Integer(1)]]).is_irreducible()
False
>>> CoxeterMatrix(['H',Integer(3)]).is_irreducible()
True

is_simply_laced()[source]#

Return if self is simply-laced.

A Coxeter matrix is simply-laced if all non-diagonal entries are either 2 or 3.

EXAMPLES:

sage: cm = CoxeterMatrix([[1,3,3,3], [3,1,3,3], [3,3,1,3], [3,3,3,1]])
sage: cm.is_simply_laced()
True

>>> from sage.all import *
>>> cm = CoxeterMatrix([[Integer(1),Integer(3),Integer(3),Integer(3)], [Integer(3),Integer(1),Integer(3),Integer(3)], [Integer(3),Integer(3),Integer(1),Integer(3)], [Integer(3),Integer(3),Integer(3),Integer(1)]])
>>> cm.is_simply_laced()
True

rank()[source]#

Return the rank of self.

EXAMPLES:

sage: CoxeterMatrix(['C',3]).rank()
3
sage: CoxeterMatrix(["A2","B2","F4"]).rank()
8

>>> from sage.all import *
>>> CoxeterMatrix(['C',Integer(3)]).rank()
3
>>> CoxeterMatrix(["A2","B2","F4"]).rank()
8

relabel(relabelling)[source]#

Return a relabelled copy of this Coxeter matrix.

INPUT:

• relabelling – a function (or dictionary)

OUTPUT:

an isomorphic Coxeter type obtained by relabelling the nodes of the Coxeter graph. Namely, the node with label i is relabelled f(i) (or, by f[i] if f is a dictionary).

EXAMPLES:

sage: CoxeterMatrix(['F',4]).relabel({ 1:2, 2:3, 3:4, 4:1})
[1 4 2 3]
[4 1 3 2]
[2 3 1 2]
[3 2 2 1]
sage: CoxeterMatrix(['F',4]).relabel(lambda x: x+1 if x<4 else 1)
[1 4 2 3]
[4 1 3 2]
[2 3 1 2]
[3 2 2 1]

>>> from sage.all import *
>>> CoxeterMatrix(['F',Integer(4)]).relabel({ Integer(1):Integer(2), Integer(2):Integer(3), Integer(3):Integer(4), Integer(4):Integer(1)})
[1 4 2 3]
[4 1 3 2]
[2 3 1 2]
[3 2 2 1]
>>> CoxeterMatrix(['F',Integer(4)]).relabel(lambda x: x+Integer(1) if x<Integer(4) else Integer(1))
[1 4 2 3]
[4 1 3 2]
[2 3 1 2]
[3 2 2 1]

classmethod samples(finite=None, affine=None, crystallographic=None, higher_rank=None)[source]#

Return a sample of the available Coxeter types.

INPUT:

• finite – (default: None) a boolean or None

• affine – (default: None) a boolean or None

• crystallographic – (default: None) a boolean or None

• higher_rank – (default: None) a boolean or None

The sample contains all the exceptional finite and affine Coxeter types, as well as typical representatives of the infinite families.

Here the higher_rank term denotes non-finite, non-affine, Coxeter groups (including hyperbolic types).

Todo

Implement the hyperbolic and compact hyperbolic in the samples.

EXAMPLES:

sage: [CM.coxeter_type() for CM in CoxeterMatrix.samples()]
[
Coxeter type of ['A', 1], Coxeter type of ['A', 5],

Coxeter type of ['B', 5], Coxeter type of ['D', 4],

Coxeter type of ['D', 5], Coxeter type of ['E', 6],

Coxeter type of ['E', 7], Coxeter type of ['E', 8],

Coxeter type of ['F', 4], Coxeter type of ['H', 3],

Coxeter type of ['H', 4], Coxeter type of ['I', 10],

Coxeter type of ['A', 2, 1], Coxeter type of ['B', 5, 1],

Coxeter type of ['C', 5, 1], Coxeter type of ['D', 5, 1],

Coxeter type of ['E', 6, 1], Coxeter type of ['E', 7, 1],

Coxeter type of ['E', 8, 1], Coxeter type of ['F', 4, 1],

[ 1 -1 -1]
[-1  1 -1]
Coxeter type of ['G', 2, 1], Coxeter type of ['A', 1, 1], [-1 -1  1],

[ 1 -2  3  2]
[1 2 3]  [-2  1  2  3]
[2 1 7]  [ 3  2  1 -8]
[3 7 1], [ 2  3 -8  1]
]

>>> from sage.all import *
>>> [CM.coxeter_type() for CM in CoxeterMatrix.samples()]
[
Coxeter type of ['A', 1], Coxeter type of ['A', 5],
<BLANKLINE>
Coxeter type of ['B', 5], Coxeter type of ['D', 4],
<BLANKLINE>
Coxeter type of ['D', 5], Coxeter type of ['E', 6],
<BLANKLINE>
Coxeter type of ['E', 7], Coxeter type of ['E', 8],
<BLANKLINE>
Coxeter type of ['F', 4], Coxeter type of ['H', 3],
<BLANKLINE>
Coxeter type of ['H', 4], Coxeter type of ['I', 10],
<BLANKLINE>
Coxeter type of ['A', 2, 1], Coxeter type of ['B', 5, 1],
<BLANKLINE>
Coxeter type of ['C', 5, 1], Coxeter type of ['D', 5, 1],
<BLANKLINE>
Coxeter type of ['E', 6, 1], Coxeter type of ['E', 7, 1],
<BLANKLINE>
Coxeter type of ['E', 8, 1], Coxeter type of ['F', 4, 1],
<BLANKLINE>
[ 1 -1 -1]
[-1  1 -1]
Coxeter type of ['G', 2, 1], Coxeter type of ['A', 1, 1], [-1 -1  1],
<BLANKLINE>
[ 1 -2  3  2]
[1 2 3]  [-2  1  2  3]
[2 1 7]  [ 3  2  1 -8]
[3 7 1], [ 2  3 -8  1]
]


The finite, affine and crystallographic options allow respectively for restricting to (non) finite, (non) affine, and (non) crystallographic Cartan types:

sage: [CM.coxeter_type() for CM in CoxeterMatrix.samples(finite=True)]
[Coxeter type of ['A', 1], Coxeter type of ['A', 5],
Coxeter type of ['B', 5], Coxeter type of ['D', 4],
Coxeter type of ['D', 5], Coxeter type of ['E', 6],
Coxeter type of ['E', 7], Coxeter type of ['E', 8],
Coxeter type of ['F', 4], Coxeter type of ['H', 3],
Coxeter type of ['H', 4], Coxeter type of ['I', 10]]

sage: [CM.coxeter_type() for CM in CoxeterMatrix.samples(affine=True)]
[Coxeter type of ['A', 2, 1], Coxeter type of ['B', 5, 1],
Coxeter type of ['C', 5, 1], Coxeter type of ['D', 5, 1],
Coxeter type of ['E', 6, 1], Coxeter type of ['E', 7, 1],
Coxeter type of ['E', 8, 1], Coxeter type of ['F', 4, 1],
Coxeter type of ['G', 2, 1], Coxeter type of ['A', 1, 1]]

sage: [CM.coxeter_type() for CM in CoxeterMatrix.samples(crystallographic=True)]
[Coxeter type of ['A', 1], Coxeter type of ['A', 5],
Coxeter type of ['B', 5], Coxeter type of ['D', 4],
Coxeter type of ['D', 5], Coxeter type of ['E', 6],
Coxeter type of ['E', 7], Coxeter type of ['E', 8],
Coxeter type of ['F', 4], Coxeter type of ['A', 2, 1],
Coxeter type of ['B', 5, 1], Coxeter type of ['C', 5, 1],
Coxeter type of ['D', 5, 1], Coxeter type of ['E', 6, 1],
Coxeter type of ['E', 7, 1], Coxeter type of ['E', 8, 1],
Coxeter type of ['F', 4, 1], Coxeter type of ['G', 2, 1]]

sage: CoxeterMatrix.samples(crystallographic=False)
[
[1 3 2 2]
[1 3 2]  [3 1 3 2]                    [ 1 -1 -1]  [1 2 3]
[3 1 5]  [2 3 1 5]  [ 1 10]  [ 1 -1]  [-1  1 -1]  [2 1 7]
[2 5 1], [2 2 5 1], [10  1], [-1  1], [-1 -1  1], [3 7 1],

[ 1 -2  3  2]
[-2  1  2  3]
[ 3  2  1 -8]
[ 2  3 -8  1]
]

>>> from sage.all import *
>>> [CM.coxeter_type() for CM in CoxeterMatrix.samples(finite=True)]
[Coxeter type of ['A', 1], Coxeter type of ['A', 5],
Coxeter type of ['B', 5], Coxeter type of ['D', 4],
Coxeter type of ['D', 5], Coxeter type of ['E', 6],
Coxeter type of ['E', 7], Coxeter type of ['E', 8],
Coxeter type of ['F', 4], Coxeter type of ['H', 3],
Coxeter type of ['H', 4], Coxeter type of ['I', 10]]

>>> [CM.coxeter_type() for CM in CoxeterMatrix.samples(affine=True)]
[Coxeter type of ['A', 2, 1], Coxeter type of ['B', 5, 1],
Coxeter type of ['C', 5, 1], Coxeter type of ['D', 5, 1],
Coxeter type of ['E', 6, 1], Coxeter type of ['E', 7, 1],
Coxeter type of ['E', 8, 1], Coxeter type of ['F', 4, 1],
Coxeter type of ['G', 2, 1], Coxeter type of ['A', 1, 1]]

>>> [CM.coxeter_type() for CM in CoxeterMatrix.samples(crystallographic=True)]
[Coxeter type of ['A', 1], Coxeter type of ['A', 5],
Coxeter type of ['B', 5], Coxeter type of ['D', 4],
Coxeter type of ['D', 5], Coxeter type of ['E', 6],
Coxeter type of ['E', 7], Coxeter type of ['E', 8],
Coxeter type of ['F', 4], Coxeter type of ['A', 2, 1],
Coxeter type of ['B', 5, 1], Coxeter type of ['C', 5, 1],
Coxeter type of ['D', 5, 1], Coxeter type of ['E', 6, 1],
Coxeter type of ['E', 7, 1], Coxeter type of ['E', 8, 1],
Coxeter type of ['F', 4, 1], Coxeter type of ['G', 2, 1]]

>>> CoxeterMatrix.samples(crystallographic=False)
[
[1 3 2 2]
[1 3 2]  [3 1 3 2]                    [ 1 -1 -1]  [1 2 3]
[3 1 5]  [2 3 1 5]  [ 1 10]  [ 1 -1]  [-1  1 -1]  [2 1 7]
[2 5 1], [2 2 5 1], [10  1], [-1  1], [-1 -1  1], [3 7 1],
<BLANKLINE>
[ 1 -2  3  2]
[-2  1  2  3]
[ 3  2  1 -8]
[ 2  3 -8  1]
]


Todo

add some reducible Coxeter types (suggestions?)

sage.combinat.root_system.coxeter_matrix.check_coxeter_matrix(m)[source]#

Check if m represents a generalized Coxeter matrix and raise and error if not.

EXAMPLES:

sage: from sage.combinat.root_system.coxeter_matrix import check_coxeter_matrix
sage: m = matrix([[1,3,2],[3,1,-1],[2,-1,1]])
sage: check_coxeter_matrix(m)

sage: m = matrix([[1,3],[3,1],[2,-1]])
sage: check_coxeter_matrix(m)
Traceback (most recent call last):
...
ValueError: not a square matrix

sage: m = matrix([[1,3,2],[3,1,-1],[2,-1,2]])
sage: check_coxeter_matrix(m)
Traceback (most recent call last):
...
ValueError: the matrix diagonal is not all 1

sage: m = matrix([[1,3,3],[3,1,-1],[2,-1,1]])
sage: check_coxeter_matrix(m)
Traceback (most recent call last):
...
ValueError: the matrix is not symmetric

sage: m = matrix([[1,3,1/2],[3,1,-1],[1/2,-1,1]])
sage: check_coxeter_matrix(m)
Traceback (most recent call last):
...
ValueError: invalid Coxeter label 1/2

sage: m = matrix([[1,3,1],[3,1,-1],[1,-1,1]])
sage: check_coxeter_matrix(m)
Traceback (most recent call last):
...
ValueError: invalid Coxeter label 1

>>> from sage.all import *
>>> from sage.combinat.root_system.coxeter_matrix import check_coxeter_matrix
>>> m = matrix([[Integer(1),Integer(3),Integer(2)],[Integer(3),Integer(1),-Integer(1)],[Integer(2),-Integer(1),Integer(1)]])
>>> check_coxeter_matrix(m)

>>> m = matrix([[Integer(1),Integer(3)],[Integer(3),Integer(1)],[Integer(2),-Integer(1)]])
>>> check_coxeter_matrix(m)
Traceback (most recent call last):
...
ValueError: not a square matrix

>>> m = matrix([[Integer(1),Integer(3),Integer(2)],[Integer(3),Integer(1),-Integer(1)],[Integer(2),-Integer(1),Integer(2)]])
>>> check_coxeter_matrix(m)
Traceback (most recent call last):
...
ValueError: the matrix diagonal is not all 1

>>> m = matrix([[Integer(1),Integer(3),Integer(3)],[Integer(3),Integer(1),-Integer(1)],[Integer(2),-Integer(1),Integer(1)]])
>>> check_coxeter_matrix(m)
Traceback (most recent call last):
...
ValueError: the matrix is not symmetric

>>> m = matrix([[Integer(1),Integer(3),Integer(1)/Integer(2)],[Integer(3),Integer(1),-Integer(1)],[Integer(1)/Integer(2),-Integer(1),Integer(1)]])
>>> check_coxeter_matrix(m)
Traceback (most recent call last):
...
ValueError: invalid Coxeter label 1/2

>>> m = matrix([[Integer(1),Integer(3),Integer(1)],[Integer(3),Integer(1),-Integer(1)],[Integer(1),-Integer(1),Integer(1)]])
>>> check_coxeter_matrix(m)
Traceback (most recent call last):
...
ValueError: invalid Coxeter label 1

sage.combinat.root_system.coxeter_matrix.coxeter_matrix_as_function(t)[source]#

Return the Coxeter matrix, as a function.

INPUT:

• t – a Cartan type

EXAMPLES:

sage: from sage.combinat.root_system.coxeter_matrix import coxeter_matrix_as_function
sage: f = coxeter_matrix_as_function(['A',4])
sage: matrix([[f(i,j) for j in range(1,5)] for i in range(1,5)])
[1 3 2 2]
[3 1 3 2]
[2 3 1 3]
[2 2 3 1]

>>> from sage.all import *
>>> from sage.combinat.root_system.coxeter_matrix import coxeter_matrix_as_function
>>> f = coxeter_matrix_as_function(['A',Integer(4)])
>>> matrix([[f(i,j) for j in range(Integer(1),Integer(5))] for i in range(Integer(1),Integer(5))])
[1 3 2 2]
[3 1 3 2]
[2 3 1 3]
[2 2 3 1]

sage.combinat.root_system.coxeter_matrix.recognize_coxeter_type_from_matrix(coxeter_matrix, index_set)[source]#

Return the Coxeter type of coxeter_matrix if known, otherwise return None.

EXAMPLES:

Some infinite ones:

sage: C = CoxeterMatrix([[1,3,2],[3,1,-1],[2,-1,1]])
sage: C.is_finite()  # indirect doctest
False
sage: C = CoxeterMatrix([[1,-1,-1],[-1,1,-1],[-1,-1,1]])
sage: C.is_finite()  # indirect doctest
False

>>> from sage.all import *
>>> C = CoxeterMatrix([[Integer(1),Integer(3),Integer(2)],[Integer(3),Integer(1),-Integer(1)],[Integer(2),-Integer(1),Integer(1)]])
>>> C.is_finite()  # indirect doctest
False
>>> C = CoxeterMatrix([[Integer(1),-Integer(1),-Integer(1)],[-Integer(1),Integer(1),-Integer(1)],[-Integer(1),-Integer(1),Integer(1)]])
>>> C.is_finite()  # indirect doctest
False


Some finite ones:

sage: m = matrix(CoxeterMatrix(['D', 4]))
sage: CoxeterMatrix(m).is_finite()  # indirect doctest
True
sage: m = matrix(CoxeterMatrix(['H', 4]))
sage: CoxeterMatrix(m).is_finite()  # indirect doctest
True

sage: CoxeterMatrix(CoxeterType(['A',10]).coxeter_graph()).coxeter_type()
Coxeter type of ['A', 10]
sage: CoxeterMatrix(CoxeterType(['B',10]).coxeter_graph()).coxeter_type()
Coxeter type of ['B', 10]
sage: CoxeterMatrix(CoxeterType(['C',10]).coxeter_graph()).coxeter_type()
Coxeter type of ['B', 10]
sage: CoxeterMatrix(CoxeterType(['D',10]).coxeter_graph()).coxeter_type()
Coxeter type of ['D', 10]
sage: CoxeterMatrix(CoxeterType(['E',6]).coxeter_graph()).coxeter_type()
Coxeter type of ['E', 6]
sage: CoxeterMatrix(CoxeterType(['E',7]).coxeter_graph()).coxeter_type()
Coxeter type of ['E', 7]
sage: CoxeterMatrix(CoxeterType(['E',8]).coxeter_graph()).coxeter_type()
Coxeter type of ['E', 8]
sage: CoxeterMatrix(CoxeterType(['F',4]).coxeter_graph()).coxeter_type()
Coxeter type of ['F', 4]
sage: CoxeterMatrix(CoxeterType(['G',2]).coxeter_graph()).coxeter_type()
Coxeter type of ['G', 2]
sage: CoxeterMatrix(CoxeterType(['H',3]).coxeter_graph()).coxeter_type()
Coxeter type of ['H', 3]
sage: CoxeterMatrix(CoxeterType(['H',4]).coxeter_graph()).coxeter_type()
Coxeter type of ['H', 4]
sage: CoxeterMatrix(CoxeterType(['I',100]).coxeter_graph()).coxeter_type()
Coxeter type of ['I', 100]

>>> from sage.all import *
>>> m = matrix(CoxeterMatrix(['D', Integer(4)]))
>>> CoxeterMatrix(m).is_finite()  # indirect doctest
True
>>> m = matrix(CoxeterMatrix(['H', Integer(4)]))
>>> CoxeterMatrix(m).is_finite()  # indirect doctest
True

>>> CoxeterMatrix(CoxeterType(['A',Integer(10)]).coxeter_graph()).coxeter_type()
Coxeter type of ['A', 10]
>>> CoxeterMatrix(CoxeterType(['B',Integer(10)]).coxeter_graph()).coxeter_type()
Coxeter type of ['B', 10]
>>> CoxeterMatrix(CoxeterType(['C',Integer(10)]).coxeter_graph()).coxeter_type()
Coxeter type of ['B', 10]
>>> CoxeterMatrix(CoxeterType(['D',Integer(10)]).coxeter_graph()).coxeter_type()
Coxeter type of ['D', 10]
>>> CoxeterMatrix(CoxeterType(['E',Integer(6)]).coxeter_graph()).coxeter_type()
Coxeter type of ['E', 6]
>>> CoxeterMatrix(CoxeterType(['E',Integer(7)]).coxeter_graph()).coxeter_type()
Coxeter type of ['E', 7]
>>> CoxeterMatrix(CoxeterType(['E',Integer(8)]).coxeter_graph()).coxeter_type()
Coxeter type of ['E', 8]
>>> CoxeterMatrix(CoxeterType(['F',Integer(4)]).coxeter_graph()).coxeter_type()
Coxeter type of ['F', 4]
>>> CoxeterMatrix(CoxeterType(['G',Integer(2)]).coxeter_graph()).coxeter_type()
Coxeter type of ['G', 2]
>>> CoxeterMatrix(CoxeterType(['H',Integer(3)]).coxeter_graph()).coxeter_type()
Coxeter type of ['H', 3]
>>> CoxeterMatrix(CoxeterType(['H',Integer(4)]).coxeter_graph()).coxeter_type()
Coxeter type of ['H', 4]
>>> CoxeterMatrix(CoxeterType(['I',Integer(100)]).coxeter_graph()).coxeter_type()
Coxeter type of ['I', 100]


Some affine graphs:

sage: CoxeterMatrix(CoxeterType(['A',1,1]).coxeter_graph()).coxeter_type()
Coxeter type of ['A', 1, 1]
sage: CoxeterMatrix(CoxeterType(['A',10,1]).coxeter_graph()).coxeter_type()
Coxeter type of ['A', 10, 1]
sage: CoxeterMatrix(CoxeterType(['B',10,1]).coxeter_graph()).coxeter_type()
Coxeter type of ['B', 10, 1]
sage: CoxeterMatrix(CoxeterType(['C',10,1]).coxeter_graph()).coxeter_type()
Coxeter type of ['C', 10, 1]
sage: CoxeterMatrix(CoxeterType(['D',10,1]).coxeter_graph()).coxeter_type()
Coxeter type of ['D', 10, 1]
sage: CoxeterMatrix(CoxeterType(['E',6,1]).coxeter_graph()).coxeter_type()
Coxeter type of ['E', 6, 1]
sage: CoxeterMatrix(CoxeterType(['E',7,1]).coxeter_graph()).coxeter_type()
Coxeter type of ['E', 7, 1]
sage: CoxeterMatrix(CoxeterType(['E',8,1]).coxeter_graph()).coxeter_type()
Coxeter type of ['E', 8, 1]
sage: CoxeterMatrix(CoxeterType(['F',4,1]).coxeter_graph()).coxeter_type()
Coxeter type of ['F', 4, 1]
sage: CoxeterMatrix(CoxeterType(['G',2,1]).coxeter_graph()).coxeter_type()
Coxeter type of ['G', 2, 1]

>>> from sage.all import *
>>> CoxeterMatrix(CoxeterType(['A',Integer(1),Integer(1)]).coxeter_graph()).coxeter_type()
Coxeter type of ['A', 1, 1]
>>> CoxeterMatrix(CoxeterType(['A',Integer(10),Integer(1)]).coxeter_graph()).coxeter_type()
Coxeter type of ['A', 10, 1]
>>> CoxeterMatrix(CoxeterType(['B',Integer(10),Integer(1)]).coxeter_graph()).coxeter_type()
Coxeter type of ['B', 10, 1]
>>> CoxeterMatrix(CoxeterType(['C',Integer(10),Integer(1)]).coxeter_graph()).coxeter_type()
Coxeter type of ['C', 10, 1]
>>> CoxeterMatrix(CoxeterType(['D',Integer(10),Integer(1)]).coxeter_graph()).coxeter_type()
Coxeter type of ['D', 10, 1]
>>> CoxeterMatrix(CoxeterType(['E',Integer(6),Integer(1)]).coxeter_graph()).coxeter_type()
Coxeter type of ['E', 6, 1]
>>> CoxeterMatrix(CoxeterType(['E',Integer(7),Integer(1)]).coxeter_graph()).coxeter_type()
Coxeter type of ['E', 7, 1]
>>> CoxeterMatrix(CoxeterType(['E',Integer(8),Integer(1)]).coxeter_graph()).coxeter_type()
Coxeter type of ['E', 8, 1]
>>> CoxeterMatrix(CoxeterType(['F',Integer(4),Integer(1)]).coxeter_graph()).coxeter_type()
Coxeter type of ['F', 4, 1]
>>> CoxeterMatrix(CoxeterType(['G',Integer(2),Integer(1)]).coxeter_graph()).coxeter_type()
Coxeter type of ['G', 2, 1]