Root lattices and root spaces

class sage.combinat.root_system.root_space.RootSpace(root_system, base_ring)[source]

Bases: CombinatorialFreeModule

The root space of a root system over a given base ring.

INPUT:

  • root_system – a root system

  • base_ring – a ring \(R\)

The root space (or lattice if base_ring is \(\ZZ\)) of a root system is the formal free module \(\bigoplus_i R \alpha_i\) generated by the simple roots \((\alpha_i)_{i\in I}\) of the root system.

This class is also used for coroot spaces (or lattices).

Todo: standardize the variable used for the root space in the examples (P?)

Element[source]

alias of RootSpaceElement

simple_root()[source]

Return the basis element indexed by i.

INPUT:

  • i – an element of the index set

EXAMPLES:

sage: F = CombinatorialFreeModule(QQ, ['a', 'b', 'c'])
sage: F.monomial('a')
B['a']
>>> from sage.all import *
>>> F = CombinatorialFreeModule(QQ, ['a', 'b', 'c'])
>>> F.monomial('a')
B['a']

F.monomial is in fact (almost) a map:

sage: F.monomial
Term map from {'a', 'b', 'c'} to Free module generated by {'a', 'b', 'c'} over Rational Field
>>> from sage.all import *
>>> F.monomial
Term map from {'a', 'b', 'c'} to Free module generated by {'a', 'b', 'c'} over Rational Field
to_ambient_space_morphism()[source]

The morphism from self to its associated ambient space.

EXAMPLES:

sage: CartanType(['A',2]).root_system().root_lattice().to_ambient_space_morphism()
Generic morphism:
From: Root lattice of the Root system of type ['A', 2]
To:   Ambient space of the Root system of type ['A', 2]
>>> from sage.all import *
>>> CartanType(['A',Integer(2)]).root_system().root_lattice().to_ambient_space_morphism()
Generic morphism:
From: Root lattice of the Root system of type ['A', 2]
To:   Ambient space of the Root system of type ['A', 2]
to_coroot_space_morphism()[source]

Return the nu map to the coroot space over the same base ring, using the symmetrizer of the Cartan matrix.

It does not map the root lattice to the coroot lattice, but has the property that any root is mapped to some scalar multiple of its associated coroot.

EXAMPLES:

sage: R = RootSystem(['A',3]).root_space()
sage: alpha = R.simple_roots()
sage: f = R.to_coroot_space_morphism()                                      # needs sage.graphs
sage: f(alpha[1])                                                           # needs sage.graphs
alphacheck[1]
sage: f(alpha[1] + alpha[2])                                                # needs sage.graphs
alphacheck[1] + alphacheck[2]

sage: R = RootSystem(['A',3]).root_lattice()
sage: alpha = R.simple_roots()
sage: f = R.to_coroot_space_morphism()                                      # needs sage.graphs
sage: f(alpha[1])                                                           # needs sage.graphs
alphacheck[1]
sage: f(alpha[1] + alpha[2])                                                # needs sage.graphs
alphacheck[1] + alphacheck[2]

sage: S = RootSystem(['G',2]).root_space()
sage: alpha = S.simple_roots()
sage: f = S.to_coroot_space_morphism()                                      # needs sage.graphs
sage: f(alpha[1])                                                           # needs sage.graphs
alphacheck[1]
sage: f(alpha[1] + alpha[2])                                                # needs sage.graphs
alphacheck[1] + 3*alphacheck[2]
>>> from sage.all import *
>>> R = RootSystem(['A',Integer(3)]).root_space()
>>> alpha = R.simple_roots()
>>> f = R.to_coroot_space_morphism()                                      # needs sage.graphs
>>> f(alpha[Integer(1)])                                                           # needs sage.graphs
alphacheck[1]
>>> f(alpha[Integer(1)] + alpha[Integer(2)])                                                # needs sage.graphs
alphacheck[1] + alphacheck[2]

>>> R = RootSystem(['A',Integer(3)]).root_lattice()
>>> alpha = R.simple_roots()
>>> f = R.to_coroot_space_morphism()                                      # needs sage.graphs
>>> f(alpha[Integer(1)])                                                           # needs sage.graphs
alphacheck[1]
>>> f(alpha[Integer(1)] + alpha[Integer(2)])                                                # needs sage.graphs
alphacheck[1] + alphacheck[2]

>>> S = RootSystem(['G',Integer(2)]).root_space()
>>> alpha = S.simple_roots()
>>> f = S.to_coroot_space_morphism()                                      # needs sage.graphs
>>> f(alpha[Integer(1)])                                                           # needs sage.graphs
alphacheck[1]
>>> f(alpha[Integer(1)] + alpha[Integer(2)])                                                # needs sage.graphs
alphacheck[1] + 3*alphacheck[2]
class sage.combinat.root_system.root_space.RootSpaceElement[source]

Bases: IndexedFreeModuleElement

associated_coroot()[source]

Return the coroot associated to this root.

OUTPUT:

An element of the coroot space over the same base ring; in particular the result is in the coroot lattice whenever self is in the root lattice.

EXAMPLES:

sage: L = RootSystem(["B", 3]).root_space()
sage: alpha = L.simple_roots()
sage: alpha[1].associated_coroot()                                          # needs sage.graphs
alphacheck[1]
sage: alpha[1].associated_coroot().parent()                                 # needs sage.graphs
Coroot space over the Rational Field of the Root system of type ['B', 3]

sage: L.highest_root()                                                      # needs sage.graphs
alpha[1] + 2*alpha[2] + 2*alpha[3]
sage: L.highest_root().associated_coroot()                                  # needs sage.graphs
alphacheck[1] + 2*alphacheck[2] + alphacheck[3]

sage: alpha = RootSystem(["B", 3]).root_lattice().simple_roots()
sage: alpha[1].associated_coroot()                                          # needs sage.graphs
alphacheck[1]
sage: alpha[1].associated_coroot().parent()                                 # needs sage.graphs
Coroot lattice of the Root system of type ['B', 3]
>>> from sage.all import *
>>> L = RootSystem(["B", Integer(3)]).root_space()
>>> alpha = L.simple_roots()
>>> alpha[Integer(1)].associated_coroot()                                          # needs sage.graphs
alphacheck[1]
>>> alpha[Integer(1)].associated_coroot().parent()                                 # needs sage.graphs
Coroot space over the Rational Field of the Root system of type ['B', 3]

>>> L.highest_root()                                                      # needs sage.graphs
alpha[1] + 2*alpha[2] + 2*alpha[3]
>>> L.highest_root().associated_coroot()                                  # needs sage.graphs
alphacheck[1] + 2*alphacheck[2] + alphacheck[3]

>>> alpha = RootSystem(["B", Integer(3)]).root_lattice().simple_roots()
>>> alpha[Integer(1)].associated_coroot()                                          # needs sage.graphs
alphacheck[1]
>>> alpha[Integer(1)].associated_coroot().parent()                                 # needs sage.graphs
Coroot lattice of the Root system of type ['B', 3]
is_positive_root()[source]

Check whether an element in the root space lies in the nonnegative cone spanned by the simple roots.

EXAMPLES:

sage: R = RootSystem(['A',3,1]).root_space()
sage: B = R.basis()
sage: w = B[0] + B[3]
sage: w.is_positive_root()
True
sage: w = B[1] - B[2]
sage: w.is_positive_root()
False
>>> from sage.all import *
>>> R = RootSystem(['A',Integer(3),Integer(1)]).root_space()
>>> B = R.basis()
>>> w = B[Integer(0)] + B[Integer(3)]
>>> w.is_positive_root()
True
>>> w = B[Integer(1)] - B[Integer(2)]
>>> w.is_positive_root()
False
max_coroot_le()[source]

Return the highest positive coroot whose associated root is less than or equal to self.

INPUT:

  • self – an element of the nonnegative integer span of simple roots

Returns None for the zero element.

Really self is an element of a coroot lattice and this method returns the highest root whose associated coroot is <= self.

Warning

This implementation only handles finite Cartan types

EXAMPLES:

sage: # needs sage.graphs
sage: root_lattice = RootSystem(['C',2]).root_lattice()
sage: root_lattice.from_vector(vector([1,1])).max_coroot_le()
alphacheck[1] + 2*alphacheck[2]
sage: root_lattice.from_vector(vector([2,1])).max_coroot_le()
alphacheck[1] + 2*alphacheck[2]
sage: root_lattice = RootSystem(['B',2]).root_lattice()
sage: root_lattice.from_vector(vector([1,1])).max_coroot_le()
2*alphacheck[1] + alphacheck[2]
sage: root_lattice.from_vector(vector([1,2])).max_coroot_le()
2*alphacheck[1] + alphacheck[2]

sage: root_lattice.zero().max_coroot_le() is None                           # needs sage.graphs
True
sage: root_lattice.from_vector(vector([-1,0])).max_coroot_le()              # needs sage.graphs
Traceback (most recent call last):
...
ValueError: -alpha[1] is not in the positive cone of roots
sage: root_lattice = RootSystem(['A',2,1]).root_lattice()
sage: root_lattice.simple_root(1).max_coroot_le()                           # needs sage.graphs
Traceback (most recent call last):
...
NotImplementedError: Only implemented for finite Cartan type
>>> from sage.all import *
>>> # needs sage.graphs
>>> root_lattice = RootSystem(['C',Integer(2)]).root_lattice()
>>> root_lattice.from_vector(vector([Integer(1),Integer(1)])).max_coroot_le()
alphacheck[1] + 2*alphacheck[2]
>>> root_lattice.from_vector(vector([Integer(2),Integer(1)])).max_coroot_le()
alphacheck[1] + 2*alphacheck[2]
>>> root_lattice = RootSystem(['B',Integer(2)]).root_lattice()
>>> root_lattice.from_vector(vector([Integer(1),Integer(1)])).max_coroot_le()
2*alphacheck[1] + alphacheck[2]
>>> root_lattice.from_vector(vector([Integer(1),Integer(2)])).max_coroot_le()
2*alphacheck[1] + alphacheck[2]

>>> root_lattice.zero().max_coroot_le() is None                           # needs sage.graphs
True
>>> root_lattice.from_vector(vector([-Integer(1),Integer(0)])).max_coroot_le()              # needs sage.graphs
Traceback (most recent call last):
...
ValueError: -alpha[1] is not in the positive cone of roots
>>> root_lattice = RootSystem(['A',Integer(2),Integer(1)]).root_lattice()
>>> root_lattice.simple_root(Integer(1)).max_coroot_le()                           # needs sage.graphs
Traceback (most recent call last):
...
NotImplementedError: Only implemented for finite Cartan type
max_quantum_element()[source]

Return a reduced word for the longest element of the Weyl group whose shortest path in the quantum Bruhat graph to the identity has sum of quantum coroots at most self.

INPUT:

  • self – an element of the nonnegative integer span of simple roots

Really self is an element of a coroot lattice.

Warning

This implementation only handles finite Cartan types

EXAMPLES:

sage: # needs sage.graphs sage.libs.gap
sage: Qvee = RootSystem(['C',2]).coroot_lattice()
sage: Qvee.from_vector(vector([1,2])).max_quantum_element()
[2, 1, 2, 1]
sage: Qvee.from_vector(vector([1,1])).max_quantum_element()
[1, 2, 1]
sage: Qvee.from_vector(vector([0,2])).max_quantum_element()
[2]
>>> from sage.all import *
>>> # needs sage.graphs sage.libs.gap
>>> Qvee = RootSystem(['C',Integer(2)]).coroot_lattice()
>>> Qvee.from_vector(vector([Integer(1),Integer(2)])).max_quantum_element()
[2, 1, 2, 1]
>>> Qvee.from_vector(vector([Integer(1),Integer(1)])).max_quantum_element()
[1, 2, 1]
>>> Qvee.from_vector(vector([Integer(0),Integer(2)])).max_quantum_element()
[2]
quantum_root()[source]

Check whether self is a quantum root.

INPUT:

  • self – an element of the nonnegative integer span of simple roots

A root \(\alpha\) is a quantum root if \(\ell(s_\alpha) = \langle 2 \rho, \alpha^\vee \rangle - 1\) where \(\ell\) is the length function, \(s_\alpha\) is the reflection across the hyperplane orthogonal to \(\alpha\), and \(2\rho\) is the sum of positive roots.

Warning

This implementation only handles finite Cartan types and assumes that self is a root.

Todo

Rename to is_quantum_root

EXAMPLES:

sage: Q = RootSystem(['C',2]).root_lattice()
sage: positive_roots = Q.positive_roots()
sage: for x in sorted(positive_roots):                                      # needs sage.graphs
....:     print("{} {}".format(x, x.quantum_root()))
alpha[1] True
alpha[1] + alpha[2] False
2*alpha[1] + alpha[2] True
alpha[2] True
>>> from sage.all import *
>>> Q = RootSystem(['C',Integer(2)]).root_lattice()
>>> positive_roots = Q.positive_roots()
>>> for x in sorted(positive_roots):                                      # needs sage.graphs
...     print("{} {}".format(x, x.quantum_root()))
alpha[1] True
alpha[1] + alpha[2] False
2*alpha[1] + alpha[2] True
alpha[2] True
scalar(lambdacheck)[source]

The scalar product between the root lattice and the coroot lattice.

EXAMPLES:

sage: L = RootSystem(['B',4]).root_lattice()
sage: alpha      = L.simple_roots()
sage: alphacheck = L.simple_coroots()
sage: alpha[1].scalar(alphacheck[1])                                        # needs sage.graphs
2
sage: alpha[1].scalar(alphacheck[2])                                        # needs sage.graphs
-1
>>> from sage.all import *
>>> L = RootSystem(['B',Integer(4)]).root_lattice()
>>> alpha      = L.simple_roots()
>>> alphacheck = L.simple_coroots()
>>> alpha[Integer(1)].scalar(alphacheck[Integer(1)])                                        # needs sage.graphs
2
>>> alpha[Integer(1)].scalar(alphacheck[Integer(2)])                                        # needs sage.graphs
-1

The scalar products between the roots and coroots are given by the Cartan matrix:

sage: matrix([ [ alpha[i].scalar(alphacheck[j])                             # needs sage.graphs
....:            for i in L.index_set() ]
....:          for j in L.index_set() ])
[ 2 -1  0  0]
[-1  2 -1  0]
[ 0 -1  2 -1]
[ 0  0 -2  2]

sage: L.cartan_type().cartan_matrix()                                       # needs sage.graphs
[ 2 -1  0  0]
[-1  2 -1  0]
[ 0 -1  2 -1]
[ 0  0 -2  2]
>>> from sage.all import *
>>> matrix([ [ alpha[i].scalar(alphacheck[j])                             # needs sage.graphs
...            for i in L.index_set() ]
...          for j in L.index_set() ])
[ 2 -1  0  0]
[-1  2 -1  0]
[ 0 -1  2 -1]
[ 0  0 -2  2]

>>> L.cartan_type().cartan_matrix()                                       # needs sage.graphs
[ 2 -1  0  0]
[-1  2 -1  0]
[ 0 -1  2 -1]
[ 0  0 -2  2]
to_ambient()[source]

Map self to the ambient space.

EXAMPLES:

sage: alpha = CartanType(['B',2]).root_system().root_lattice().an_element(); alpha
2*alpha[1] + 2*alpha[2]
sage: alpha.to_ambient()
(2, 0)
sage: alphavee = CartanType(['B',2]).root_system().coroot_lattice().an_element(); alphavee
2*alphacheck[1] + 2*alphacheck[2]
sage: alphavee.to_ambient()
(2, 2)
>>> from sage.all import *
>>> alpha = CartanType(['B',Integer(2)]).root_system().root_lattice().an_element(); alpha
2*alpha[1] + 2*alpha[2]
>>> alpha.to_ambient()
(2, 0)
>>> alphavee = CartanType(['B',Integer(2)]).root_system().coroot_lattice().an_element(); alphavee
2*alphacheck[1] + 2*alphacheck[2]
>>> alphavee.to_ambient()
(2, 2)