AUTHORS:
Bases: sage.matrix.matrix_integer_sparse.Matrix_integer_sparse, sage.combinat.root_system.cartan_type.CartanType_abstract
A (generalized) Cartan matrix.
A matrix for some index set
is a
generalized Cartan matrix if it satisfies the following properties:
Additionally some reference assume that a Cartan matrix is symmetrizable (see is_symmetrizable()). However following Kac, we do not make that assumption here.
INPUT:
Can be anything which is accepted by CartanType or a matrix.
If given a matrix, one can also use the keyword cartan_type when giving a matrix to explicitly state the type. Otherwise this will try to check the input matrix against possible standard types of Cartan matrices. To disable this check, use the keyword cartan_type_check = False.
EXAMPLES:
sage: CartanMatrix(['A', 4])
[ 2 -1 0 0]
[-1 2 -1 0]
[ 0 -1 2 -1]
[ 0 0 -1 2]
sage: CartanMatrix(['B', 6])
[ 2 -1 0 0 0 0]
[-1 2 -1 0 0 0]
[ 0 -1 2 -1 0 0]
[ 0 0 -1 2 -1 0]
[ 0 0 0 -1 2 -1]
[ 0 0 0 0 -2 2]
sage: CartanMatrix(['C', 4])
[ 2 -1 0 0]
[-1 2 -1 0]
[ 0 -1 2 -2]
[ 0 0 -1 2]
sage: CartanMatrix(['D', 6])
[ 2 -1 0 0 0 0]
[-1 2 -1 0 0 0]
[ 0 -1 2 -1 0 0]
[ 0 0 -1 2 -1 -1]
[ 0 0 0 -1 2 0]
[ 0 0 0 -1 0 2]
sage: CartanMatrix(['E',6])
[ 2 0 -1 0 0 0]
[ 0 2 0 -1 0 0]
[-1 0 2 -1 0 0]
[ 0 -1 -1 2 -1 0]
[ 0 0 0 -1 2 -1]
[ 0 0 0 0 -1 2]
sage: CartanMatrix(['E',7])
[ 2 0 -1 0 0 0 0]
[ 0 2 0 -1 0 0 0]
[-1 0 2 -1 0 0 0]
[ 0 -1 -1 2 -1 0 0]
[ 0 0 0 -1 2 -1 0]
[ 0 0 0 0 -1 2 -1]
[ 0 0 0 0 0 -1 2]
sage: CartanMatrix(['E', 8])
[ 2 0 -1 0 0 0 0 0]
[ 0 2 0 -1 0 0 0 0]
[-1 0 2 -1 0 0 0 0]
[ 0 -1 -1 2 -1 0 0 0]
[ 0 0 0 -1 2 -1 0 0]
[ 0 0 0 0 -1 2 -1 0]
[ 0 0 0 0 0 -1 2 -1]
[ 0 0 0 0 0 0 -1 2]
sage: CartanMatrix(['F', 4])
[ 2 -1 0 0]
[-1 2 -1 0]
[ 0 -2 2 -1]
[ 0 0 -1 2]
This is different from MuPAD-Combinat, due to different node convention?
sage: CartanMatrix(['G', 2])
[ 2 -3]
[-1 2]
sage: CartanMatrix(['A',1,1])
[ 2 -2]
[-2 2]
sage: CartanMatrix(['A', 3, 1])
[ 2 -1 0 -1]
[-1 2 -1 0]
[ 0 -1 2 -1]
[-1 0 -1 2]
sage: CartanMatrix(['B', 3, 1])
[ 2 0 -1 0]
[ 0 2 -1 0]
[-1 -1 2 -1]
[ 0 0 -2 2]
sage: CartanMatrix(['C', 3, 1])
[ 2 -1 0 0]
[-2 2 -1 0]
[ 0 -1 2 -2]
[ 0 0 -1 2]
sage: CartanMatrix(['D', 4, 1])
[ 2 0 -1 0 0]
[ 0 2 -1 0 0]
[-1 -1 2 -1 -1]
[ 0 0 -1 2 0]
[ 0 0 -1 0 2]
sage: CartanMatrix(['E', 6, 1])
[ 2 0 -1 0 0 0 0]
[ 0 2 0 -1 0 0 0]
[-1 0 2 0 -1 0 0]
[ 0 -1 0 2 -1 0 0]
[ 0 0 -1 -1 2 -1 0]
[ 0 0 0 0 -1 2 -1]
[ 0 0 0 0 0 -1 2]
sage: CartanMatrix(['E', 7, 1])
[ 2 -1 0 0 0 0 0 0]
[-1 2 0 -1 0 0 0 0]
[ 0 0 2 0 -1 0 0 0]
[ 0 -1 0 2 -1 0 0 0]
[ 0 0 -1 -1 2 -1 0 0]
[ 0 0 0 0 -1 2 -1 0]
[ 0 0 0 0 0 -1 2 -1]
[ 0 0 0 0 0 0 -1 2]
sage: CartanMatrix(['E', 8, 1])
[ 2 0 0 0 0 0 0 0 -1]
[ 0 2 0 -1 0 0 0 0 0]
[ 0 0 2 0 -1 0 0 0 0]
[ 0 -1 0 2 -1 0 0 0 0]
[ 0 0 -1 -1 2 -1 0 0 0]
[ 0 0 0 0 -1 2 -1 0 0]
[ 0 0 0 0 0 -1 2 -1 0]
[ 0 0 0 0 0 0 -1 2 -1]
[-1 0 0 0 0 0 0 -1 2]
sage: CartanMatrix(['F', 4, 1])
[ 2 -1 0 0 0]
[-1 2 -1 0 0]
[ 0 -1 2 -1 0]
[ 0 0 -2 2 -1]
[ 0 0 0 -1 2]
sage: CartanMatrix(['G', 2, 1])
[ 2 0 -1]
[ 0 2 -3]
[-1 -1 2]
Note
Since this is a matrix, row() and column() will return the standard row and column respectively. To get the row with the indices as in Dynkin diagrams/Cartan types, use row_with_indices() and column_with_indices() respectively.
Return the Cartan matrix of self.
EXAMPLES:
sage: CartanMatrix(['C',3]).cartan_matrix()
[ 2 -1 0]
[-1 2 -2]
[ 0 -1 2]
Return the Cartan type of self or self if unknown.
EXAMPLES:
sage: C = CartanMatrix(['A',4,1])
sage: C.cartan_type()
['A', 4, 1]
If the Cartan type is unknown:
sage: C = CartanMatrix([[2,-1,-2], [-1,2,-1], [-2,-1,2]])
sage: C.cartan_type()
[ 2 -1 -2]
[-1 2 -1]
[-2 -1 2]
Return the column
of self as a container
(or iterator) of tuples
EXAMPLES:
sage: M = CartanMatrix(['B',4])
sage: [ (i,a) for (i,a) in M.column_with_indices(3) ]
[(3, 2), (2, -1), (4, -2)]
Return the dual Cartan matrix of self, which is obtained by taking the transpose.
EXAMPLES:
sage: ct = CartanType(['C',3])
sage: M = CartanMatrix(ct); M
[ 2 -1 0]
[-1 2 -2]
[ 0 -1 2]
sage: M.dual()
[ 2 -1 0]
[-1 2 -1]
[ 0 -2 2]
sage: M.dual() == CartanMatrix(ct.dual())
True
sage: M.dual().cartan_type() == ct.dual()
True
An example with arbitrary Cartan matrices:
sage: cm = CartanMatrix([[2,-5], [-2, 2]]); cm
[ 2 -5]
[-2 2]
sage: cm.dual()
[ 2 -2]
[-5 2]
sage: cm.dual() == CartanMatrix(cm.transpose())
True
sage: cm.dual().dual() == cm
True
Return the Dynkin diagram corresponding to self.
EXAMPLES:
sage: C = CartanMatrix(['A',2])
sage: C.dynkin_diagram()
O---O
1 2
A2
sage: C = CartanMatrix(['F',4,1])
sage: C.dynkin_diagram()
O---O---O=>=O---O
0 1 2 3 4
F4~
sage: C = CartanMatrix([[2,-4],[-4,2]])
sage: C.dynkin_diagram()
Dynkin diagram of rank 2
Return the index set of self.
EXAMPLES:
sage: C = CartanMatrix(['A',1,1])
sage: C.index_set()
(0, 1)
sage: C = CartanMatrix(['E',6])
sage: C.index_set()
(1, 2, 3, 4, 5, 6)
Return if self is an affine type or False if unknown.
EXAMPLES:
sage: M = CartanMatrix(['C',4])
sage: M.is_affine()
False
sage: M = CartanMatrix(['D',4,1])
sage: M.is_affine()
True
sage: M = CartanMatrix([[2, -4], [-3, 2]])
sage: M.is_affine()
False
Implements CartanType_abstract.is_crystallographic().
A Cartan matrix is crystallographic if it is symmetrizable.
EXAMPLES:
sage: CartanMatrix(['F',4]).is_crystallographic()
True
Return if self is a finite type or False if unknown.
EXAMPLES:
sage: M = CartanMatrix(['C',4])
sage: M.is_finite()
True
sage: M = CartanMatrix(['D',4,1])
sage: M.is_finite()
False
sage: M = CartanMatrix([[2, -4], [-3, 2]])
sage: M.is_finite()
False
Implements CartanType_abstract.is_simply_laced().
A Cartan matrix is simply-laced if all non diagonal entries are
or
.
EXAMPLES:
sage: cm = CartanMatrix([[2, -1, -1, -1], [-1, 2, -1, -1], [-1, -1, 2, -1], [-1, -1, -1, 2]])
sage: cm.is_simply_laced()
True
Return the rank of self.
EXAMPLES:
sage: CartanMatrix(['C',3]).rank()
3
sage: CartanMatrix(["A2","B2","F4"]).rank()
8
Return the reflection group corresponding to self.
EXAMPLES:
sage: C = CartanMatrix(['A',3])
sage: C.reflection_group()
Weyl Group of type ['A', 3] (as a matrix group acting on the root space)
Return the root space corresponding to self.
EXAMPLES:
sage: C = CartanMatrix(['A',3])
sage: C.root_space()
Root space over the Rational Field of the Root system of type ['A', 3]
Return the root system corresponding to self.
EXAMPLES:
sage: C = CartanMatrix(['A',3])
sage: C.root_system()
Root system of type ['A', 3]
Return the row
of self as a container
(or iterator) of tuples
EXAMPLES:
sage: M = CartanMatrix(['C',4])
sage: [ (i,a) for (i,a) in M.row_with_indices(3) ]
[(3, 2), (2, -1), (4, -2)]
Return the symmetrized matrix of self if symmetrizable.
EXAMPLES:
sage: cm = CartanMatrix(['B',4,1])
sage: cm.symmetrized_matrix()
[ 4 0 -2 0 0]
[ 0 4 -2 0 0]
[-2 -2 4 -2 0]
[ 0 0 -2 4 -2]
[ 0 0 0 -2 2]
Return the symmetrizer of self.
EXAMPLES:
sage: cm = CartanMatrix([[2,-5],[-2,2]])
sage: cm.symmetrizer()
Finite family {0: 2, 1: 5}
TESTS:
Check that the symmetrizer computed from the Cartan matrix agrees with the values given by the Cartan type:
sage: ct = CartanType(['B',4,1])
sage: ct.symmetrizer()
Finite family {0: 2, 1: 2, 2: 2, 3: 2, 4: 1}
sage: ct.cartan_matrix().symmetrizer()
Finite family {0: 2, 1: 2, 2: 2, 3: 2, 4: 1}
Return the Cartan matrix of type .
Note
This function is deprecated in favor of CartanMatrix(...), to avoid polluting the global namespace.
EXAMPLES:
sage: cartan_matrix(['A', 4])
doctest:...: DeprecationWarning: cartan_matrix() is deprecated. Use CartanMatrix() instead
See http://trac.sagemath.org/14137 for details.
[ 2 -1 0 0]
[-1 2 -1 0]
[ 0 -1 2 -1]
[ 0 0 -1 2]
Find a Cartan type by direct comparison of matrices given from the generalized Cartan matrix CM and return None if not found.
INPUT:
EXAMPLES:
sage: from sage.combinat.root_system.cartan_matrix import find_cartan_type_from_matrix
sage: M = matrix([[2,-1,-1], [-1,2,-1], [-1,-1,2]])
sage: find_cartan_type_from_matrix(M)
['A', 2, 1]
sage: M = matrix([[2,-1,0], [-1,2,-2], [0,-1,2]])
sage: find_cartan_type_from_matrix(M)
['C', 3]
sage: M = matrix([[2,-1,-2], [-1,2,-1], [-2,-1,2]])
sage: find_cartan_type_from_matrix(M)
Return True if M is a generalized Cartan matrix. For a definition of a generalized Cartan matrix, see CartanMatrix.
EXAMPLES:
sage: from sage.combinat.root_system.cartan_matrix import is_generalized_cartan_matrix
sage: M = matrix([[2,-1,-2], [-1,2,-1], [-2,-1,2]])
sage: is_generalized_cartan_matrix(M)
True
sage: M = matrix([[2,-1,-2], [-1,2,-1], [0,-1,2]])
sage: is_generalized_cartan_matrix(M)
False
sage: M = matrix([[1,-1,-2], [-1,2,-1], [-2,-1,2]])
sage: is_generalized_cartan_matrix(M)
False
A non-symmetrizable example:
sage: M = matrix([[2,-1,-2], [-1,2,-1], [-1,-1,2]])
sage: is_generalized_cartan_matrix(M)
True