BGGComplex¶
This module implements the BGG complex.
Example usage:
>>> bgg = BGGComplex('A2')
>>> bgg.plot_graph() # Show the Bruhat graph
>>> bgg.display_maps((0,0)) # Give the maps of the BGG complex (without sing)
>>> bgg.compute_signs() # Give signs in the complex, turning maps into differential
-
class
bggcohomology.bggcomplex.
BGGComplex
(root_system, pickle_directory=None)[source]¶ A class encoding all the things we need of the BGG complex.
Parameters: - root_system (str) – String encoding the Dynkin diagram of the root system (e.g. ‘A3’)
- pickle_directory (str (optional)) – Directory where to store .pkl files to save computations regarding maps in the BGG complex. If None, maps are not saved. (default: None)
Variables: - root_system (str) – String encoding Dynkin diagram.
- W (WeylGroup) – Object encoding the Weyl group.
- LA (LieAlgebraChevalleyBasis) – Object encoding the Lie algebra in the Chevalley basis over Q
- PBW (PoincareBirkhoffWittBasis) – Poincaré-Birkhoff-Witt basis of the universal enveloping algebra. The maps in the BGG complex are elements of this basis. This package uses a slight modification of the PBW class as implemented in Sagemath proper.
- lattice (RootSpace) – The space of roots
- S (FiniteFamily) – Set of simple reflections in the Weyl group
- T (FIniteFamily) – Set of reflections in the Weyl group
- cycles (List) – List of 4-tuples encoding the length-4 cycles in the Bruhat graph
- simple_roots (List) – (Ordered) list of the simple roots as elements of lattice
- rank (int) – Rank of the root system
- neg_roots (list) – List of the negative roots in the root system, encoded as numpy.ndarray.
- alpha_to_index (dict) – Dictionary mapping negative roots (as elements of lattice) to an ordered index encoding the negative root as basis element of the lie algebra $n$ spanned by the negative roots.
- zero_root (element of lattice) – The zero root
- rho (element of lattice) – Half the sum of all positive roots
-
compute_maps
(root, column=None, check=False, pbar=None)[source]¶ Compute the (unsigned) maps of the BGG complex for a given weight.
Parameters: - root (tuple(int)) – root for which to compute the maps.
- column (int or None (default: None)) – Try to only compute the maps up to this particular column if not None. This is faster in particular for small or large values of column.
- check (bool (default: False)) – After computing all the maps, perform a check whether they are correct for debugging purposes.
- pbar (tqdm (default: None)) – tqdm progress bar to give status updates about the progress. If None this feature is disabled.
Returns: Return type: dict mapping edges (in form (‘w1’, ‘w2’)) to elements of self.PBW.
-
compute_signs
(force_recompute=False)[source]¶ Compute signs making making product of signs around all squares equal to -1.
Returns: Dictionary mapping edges in the Bruhat graph to {+1,-1} Return type: dict[tuple(str,str), int]
-
display_maps
(mu)[source]¶ Display all the maps of the BGG complex for a given mu, in appropriate order.
Parameters: mu (tuple) – tuple encoding the weight as linear combination of simple roots
-
display_pbw
(f, notebook=True)[source]¶ Typesets an element of PBW of the universal enveloping algebra with LaTeX.
Parameters: - f (PoincareBirkhoffWittBasis.element_class) – The element to display
- notebook (bool (optional, default: True)) – Uses IPython display with math if True, otherwise just returns the LaTeX code as string.
compute_maps.py¶
Compute the maps in the BGG complex.
Uses a PBW basis for the universal envoloping algebra of n together with some basic linear algebra. Works for any dominant weight. Typically the methods in this module are called directly from a BGGComplex instance.
-
class
bggcohomology.compute_maps.
BGGMapSolver
(BGG, weight, pbar=None, cached_results=None)[source]¶ Class encoding the methods to compute all the maps in the BGG complex.
Parameters: - BGG (BGGComplex) –
- weight (RootSpace.element_class) –
- pbar (tqdm or None (default: None)) –
- cached_results (dict(tuple(str, str), PoincareBirkhoffWittBasis.element_class)) – Partial computation of maps
Variables: - BGG (BGGComplex) –
- pbar (tqdm or None) –
- action_dic (dict(str, array(int))) – Dictionary encoding action of Weyl group elements on simple roots
- max_len (int) – Length of longest word in Weyl group
- maps (dict(tuple(str, str), PoincareBirkhoffWittBasis.element_class)) – For each edge in the Bruhat graph, an element of the universal enveloping algebra representing the map in the BGG complex.
- num_trivial_maps (int) – The number of edges where the difference in weights between the vertices is a multiple of a simple root.
- n_non_trivial_maps (int) – The complement of num_trivial_maps
- problem_dic (dict) – Dictionary storing all the information needed to solve the problem of computing the universal enveloping algebra element associated to a particular edge in the Bruhat graph, given three surrounding edges for which we already know the element.
compute_signs.py¶
Compute signs for the BGG complex.
For every edge in the Bruhat graph, we need to find a sign such that the product of signs in every square is -1. Mutliplying the maps in the BGG complex by these signs ensures that the differential squares to zero.
The algorithm used to compute this is a randomized greedy algorithms. We start with a random configuration of signs. Then we flip the sign of an edge if it reduces the number of squares where the product of signs is -1. We keep up with this procedure until there is nothing left, in which case we are either done, or we got stuck and we flip the signs of some random edges.
-
bggcohomology.compute_signs.
compute_signs
(BGG)[source]¶ Compute signs for all the edges in Bruhat graph.
Parameters: BGG (BGGComplex) – Returns: An int (+1 or -1) describing the sign of each edge in the Bruhat graph. Return type: dict(tuple(str, str), int)