jupyter workbook developing Python functions to make bases for Lie algebras and Lie coalgebras
License: GPL3
Making Bases!
Below, I'll convert my old pairing.html javascript code from the Lie Algebra / coalgebra pairing calculator to python. I'll also write a new algorithm to generate the star basis for symbols.
This section will mostly target Lie algebra - coalgebra pairings. The next section will look at finitely presented groups and bases for configuration braiding invariants.
Note: this code requires the coLie.py library of coLie objects.
Lyndon-Shirshov words
The Lyndon words (or Lyndon-Shirshov acknowledging Anatoly Shirshov using them in 1953 vs Roger Lyndon's use in 1954) appear in algebra, combinatorics, and computer science. They can be used for data compression, are a basis for the shuffle algebra, index irreducible monic polynomials, and give rise to a Hall basis for Lie algebras.
Given an ordered alphabet, we consider necklaces -- words modulo cyclic permutation. We identify necklaces by writing a representative (modulo cyclic permutation) which is minimal in lexicographic ordering.
A necklace is periodic if there is so that for all (where this makes sense). This implies that the necklace is a repetition of multiple copies of some (letter or) subword .
An LS-word is a representative of an aperiodic necklace. Note that in this case, the representative choice is unique!
Two other characterizations of Lyndon words are helpful when making proofs:
is LS iff for any (nontrivial) factorization we have lexicographically
is LS iff for any (nontrivial) factorization we have lexicographically (" less than its suffixes")
Using the characterizations above we define the "standard factorization" of an LS word to be where is the maximal length LS suffix (in which case is also LS). This is used to make the standard bracketing... though there are other good factorizations which lead to interesting bracketings as well.
There are a couple of different ways to generate LS words.
In 1988 Duval proposed an algorithm which generates all words of length by repeating a prefix string and then incrementing the final letter. This will generate all LS words in increasing order. This algorithm frequently generates words which are too small during its search, but the average cost of generating the next letter is linear.
In 2000 Cattal et al propose an alternate algorithm which generates all LS words up to a given length in reverse order, modifying one letter at a time. This algorithm uses the factorization characterization of LS words to iteratively build words which could be prefixes of an LS word.
Afterwards the coauthor J.Sawada modified the algorithm to efficiently target only LS words which contain specified multiplicities of letters. This is best for our purposes, and is considerably faster than generating all LS words and then tossing out the ones with the wrong multiplicities.
There are other algorithms as well - see Kopparty et al
Lyndon words are pretty nice and extensively studied and used, but there are also other ways to choose representatives of words modulo shuffles... which can lead to useful and interesting constructions. Probably any basis of coLie (Eil) words must give a complete set of representatives. So hunting for bases could be a fruitful way to look for / prove that you've found other rules for making representatives. The "deg-lex minimal" (DL) words is one other choice (natural from the viewpoint of left-greedy brackets and star symbols).
Test the code!
Making Lie bases from LS words!
Once you have a list of LS words basically any reasonable method you come up with for systematically creating (nonzero) brackets will yield a Lie basis. There is a long and honorable tradition in algebra of coming up with new Lie bases. There are lots of different ones.
Test the code!
Note that the pairing matrices above are all upper triangular. This is a general fact, and is the essential ingredient in the proof that they are bases (though the original authors didn't use this language).
Symbol Bases
The LS and deg-lex LS words are bases for Eil words.
Alternatively we can use the "Star Symbol" basis for Eil symbols!
The star symbol basis is connected to the left-greedy recursive partitioning of a word (and the left-greedy Lie bracketing above).
An -simple word is where
An -simple partition of a word is where each is an -simple word. Note that LS words have unique -simple partitions.
Viewing -simple words as a new alphabet we can repeat (if you order lexicographically then -simple partitions are themselves LS words in the alphabet of -simple words.)
The left greedy bracketing is defined (recursively) by
The star symbol is defined (recursively) by
Note: We can make star symbols out of non-LS words as well!
Note: Star symbols have the very special property that their cobrackets are also star symbols! (Compare to LS words, whose cobrackets will usually not be LS!)
Other symbol bases???
I don't know... I showed that the star symbols make a basis. They should also be a "dual monomial basis" to left greedy brackets (we'll test this in the code below!). I was satisfied enough with that, so I didn't search for any other bases.... I guess, the star symbols are so perfect that I didn't bother looking for others.
Test the code!
Projection onto Basis!
Note that the pairing matrix for star symbols and left greedy brackets is diagonal! This means we can quickly write general brackets in terms of left greedy brackets by computing pairings with corresponding star symbols.
For other Lie bases we would need to invert the upper-triangular pairing matrix. But for star and left greedy we are doing orthogonal projection!