Project Description

Sage (http://www.sagemath.org/) is a completely open source general purpose mathe- matical software system, which appeared under the leadership of co-PI Stein (University of Washington) and has developed explosively within the last ten years among research mathe- maticians. It is similar to Maple, MuPAD, Mathematica, magma, and (via the third-party packages Numpy and Scipy) Matlab, and is based on the popular Python programming lan- guage. Sage has gained strong momentum in the mathematics community far beyond its initial focus in number theory, in particular in the field of combinatorics. To date, Sage probably has the strongest support for combinatorics of all mathematical software systems. The additional features that we plan to implement as part of this project heavily rely on the fact that Sage has already a large hierarchy of abstract classes, in the form of categories and axioms. This makes it possible to implement morphisms and maps between various objects, which will be essential for our projects. In addition, with the development of SageMathCloud and thematic tutorials, Sage is becoming more and more appealing, accessible, and easier to use for teaching purposes. This project will work in close collaboration with OpenDreamKit (http://opendreamkit. org/), a recently funded Horizon 2020 European Research Infrastructure project, whose mission includes support for Sage by streamlining access, distribution, portability on a wide range of platforms, including High Performance Computers or cloud services, and to improve user interfaces for example through SageMathCloud. The total budget for OpenDreamKit is about 7.6 million Euros, which includes salary for an average of 11 full time developers for various open source software systems. Since this project will support Sage through new and improved user platforms, this will make our code highly visible in an interdisciplinary framework.

1 Results of Prior NSF Support

We will report on grant NSF OCI-1147247 entitled “Collaborative Research: SI2-SSE: Sage- combinat: Developing and Sharing Open Source Software for Algebraic Combinatorics” 2012- 2015 with Daniel Bump, Gregg Musiker, Anne Schilling, and William Stein as PIs. Of course, numerous other NSF grants have supported the general development of Sage over the past 10 years (see http://sagemath.org/development-ack.html). Sage-Combinat is a subproject of Sage whose mission is “to improve Sage as an ex- tensible toolbox for computer exploration in (algebraic) combinatorics, and foster code sharing between researchers in this area”. There is a long tradition of software packages for algebraic combinatorics. These have been crucial in the development of combinatorics since the 1960s. The originality of the Sage-Combinat project lies in successfully addressing the following si- multaneous objectives. It offers a wide variety of interoperable and extensible tools, integrated in general purpose mathematical software, as needed for daily computer exploration in algebraic combinatorics; it is developed by a community of researchers spread around the world and across

1 institutions; and it is open source and depends only on open source software. Developing Sage- Combinat has required both mathematical and computer science expertise. For example, great emphasis is placed on high-level programming techniques (object orientation and polymorphism, iterators, ) to obtain concise, expressive, general, and easily maintained code. As part of this grant, we have co-organized and/or supported 8 Sage Days. Sage Days are usually one week workshops aimed to teach Sage to new users, introduce new developers to the development tools and walk them through the development process, and most of all collaboratively develop new features. Sage Days are extremely interactive with a lot of time devoted to design discussions and coding sprints. Most of the Sage Days that we organized had about 25-40 participants (depending on the topic), with the Sage Days in Paris having over 50 participants.

• Sage Days 40: Algebraic Combinatorics, Institute for Mathematics and Its Applications (IMA), University of Minnesota, July 9–13, 2012 organized by Gregg Musiker, Franco Saliola, Anne Schilling, and Nicolas M. Thi´ery

• Sage Days: Multiple Dirichlet Series, Combinatorics, and Representation Theory, ICERM, February 11–15, 2013 organized by Franco Saliola, Anne Schilling, and Nicolas M. Thi´ery

• Sage Days 49: Free and Practical Software for (Algebraic) Combinatorics, June 17–21, 2013, Orsay (France) organized by Alejandro Morales, Anne Schilling, and Nicolas M. Thi´ery

• Sage Days 54: Sage Developer Days, UC Davis, November 4–8, 2013 organized by Daniel Bump, Anne Schilling, and Travis Scrimshaw

• Sage Days 60: Sage Days in Chennai (India), August 14–17, 2014 organized by Arvind Ayyer, Amritanshu Prasad, and S. Viswanath

• Sage Days 64: Algebraic Combinatorics, UC Davis, March 17–20, 2015 organized by Daniel Bump, Anne Schilling, and Travis Scrimshaw

• Sage Days 64.5: Cluster Algebras, University of Minnesota, June 1–5, 2015 organized by Gregg Musiker, Dylan Rupel, Salvatore Stella, and Christian Stump

• Sage Days 65: Crystal bases and Hopf algebras, Loyola University Chicago, June 8–12, 2015 organized by Mark Albert, Aaron Lauve, and Peter Tingley

In addition to the Sage Days, many new features were implemented as part of this project including rigged configurations, new models for crystal bases, puzzles (used to count Littlewood– Richardson coefficients), various tableaux that arise in the combinatorics of the affine Grassman- nian, branching rules for Lie algebras, integrable representations of affine Lie algebras and the category framework. We would like to highlight in particular http://trac.sagemath.org/ticket/14102, which implements nonsymmetric Macdonald polynomials. As far as we are aware, there is no other mathematical software system which currently computes nonsymmetric Macdonald polynomials in this generality. This ticket was a truly collaborative effort carried out by many people at the ICERM program “Automorphic Forms, Combinatorial Representation Theory and Multiple Dirichlet Series” http://icerm.brown.edu/sp-s13/ in the Spring of 2013. Mathematical input

2 about the algorithms and definitions were given by Bogdan Ion, Siddhartha Sahi, Arun Ram, Dan Orr, and Mark Shimozono followed by several weeks of implementation of the infrastructure by Nicolas Thi´eryand Anne Schilling, and cross checking all details and testing the code with Mark Shimozono and Bogdan Ion. We would also like to highlight http://trac.sagemath.org/ticket/15805 which imple- ments methods for integrable representations of affine Lie algebras. These are important in mathematical physics and number theory. In 1990, Kass, Moody, Slansky and Patera published a two-volume work [21] on representations of affine Lie algebras, including tables of their rep- resentations and branching rules. The first volume reprises the basic theory, and the second volume contains the tables. In the introduction, they write:

We present a vast quantity of numerical data in tabular form, this being the only source for such information. The computations are tedious and not particularly straightforward when it is necessary to carry them out individually. We hope the appearance of this book will spur interest in a field that has become, in barely 20 years, deeply rewarding and full of promise for the future. It would indeed be gratifying if these tables were to appear to the scientists of 2040 as obsolete as the dust-gathering compilations of transcendental functions appear for us today because of their availability on every pocket calculator.

The patch was merged in Sage-6.7 and all computations in this book can be done now Sage. In general, a considerable effort was made to make the code accessible by documenting and explaining it in books and tutorials. Lam, Lapointe, Morse, Schilling, Shimozono and Zabrocki wrote a book on “k-Schur functions and affine Schubert calculus” which includes many examples on how to use k-Schur combinatorics in Sage. This book is freely available on the arXiv as well as on the Springer website. In addition, Thi´eryand his coauthors wrote a book “Calcul math´ematiqueavec Sage” (in French with partial translations to English) about Sage, see http://sagebook.gforge.inria.fr/. Bump included an appendix on Sage in the second edition of his text Lie groups. In the summer of 2012, Schilling and Zabrocki did a major overhaul of the symmetric function code which also added new functionality related to Hopf algebras. This was done in a 15,000 line patch and also includes a new tutorial on symmetric functions. As part of the class MAT146 on Algebraic Combinatorics at UC Davis, Schilling started writing a Sage tutorial for undergraduate students in relation to Richard Stanley’s new book “Algebraic Combinatorics: walks, trees, tableaux and more”, published by Springer in 2013, but also freely available online http://www-math.mit.edu/~rstan/algcomb/index. html. The thematic tutorial has been incorporated into Sage. Furthermore, the thematic tutorial Lie Methods and Related Combinatorics in Sage by Bump and Schilling has been kept up to date with documentation of new features. Here are some further highlights regarding the outcome during the first two years of the grant (see also the annual reports on this grant for more details):

• A total of 287 patches written under the UC Davis side of this project were merged into main Sage. Many more patches are currently being developed. The patches can be viewed at http://trac.sagemath.org/.

• During 2012 and 2013, Bump added major substantial speedups and enhancements to the Lie code in Sage (implemented in the WeylCharacterRing class) which allows one to cal- culate tensor products and branching rules for characters of irreducible representations of

3 Lie groups; these speedups, together with a database of maximal subgroups that interfaces with the branching rule code, make Sage a powerful tool for Lie group computations.

• 17 papers/preprints were written by Schilling, her collaborators and students as part of the UC Davis side of the project; 2 books were written which include Sage examples.

• Currently, at least 50 papers, 2 books, 3 theses, and 16 preprints cite or acknowledge the Sage-Combinat project. For more details and updated information see http://www.sagemath.org/library-publications-combinat.html.

• Stein purchased the Sage-Combinat server at University of Washington, which has 192GB of RAM and 64 processing cores, and has been used to support many research computations.

• Stein designed and implemented SageMathCloud (see https://cloud.sagemath.com) largely while supported fulltime by this grant. SageMathCloud, which is open source (see https://github.com/sagemathinc/smc-public), provides a powerful environment for using Sage online, and a new way to use computational resources collaboratively.

2 Why Sage?

Sage is a large mathematical software project, which was founded in 2004 by co-PI Stein, and is open source under the GPL license. It is developed by hundreds of researchers and teachers to suit their particular requirements, and combines dozens of open source packages, thus benefiting from development by a wide range of mathematicians, physicists, and engineers. The extensive peer review process for inclusion of all code in Sage requires that every function and class added to Sage is supplied with tests. Once the code is merged into Sage, these and other tests are automatically checked (and rechecked periodically on a build farm) to ensure that the code remains functional. The Sage code base has reached a size where it is imperative to be able to handle extensive hierarchies of classes for modeling mathematics. The modeling of thousands of different types of mathematical objects in a general purpose mathematical software package requires large hierarchies of abstract classes whose design and maintenance is a challenge by itself. Inspired by innovative work by the developers of Axiom, Magma, Aldor, MuPAD and Fricas, Sage uses mathematical categories (category of groups, rings, fields, ...) and axioms (associativity, existence of inverse, ...) as a design pattern to dynamically construct this class hierarchy from duplication-free semantic information. In Sage, this infrastructure is built on top of (and not into) the standard Python object-oriented and class hierarchy mechanism, and does not require changing the language itself. See [10] for more information. We emphasize that the support in Sage for object-oriented programming, and especially the dynamic class structure involved with categories, is absolutely essential to the robust develop- ment of complex mathematical constructions.

3 Why us?

Each PI is an expert using and developing Sage for their research endeavors and the broader community. Bump he is a founding author of much of the root system code available, on which

4 some of the proposed projects will be based, and he has written most of the code in Sage for working with Lie group representations. Salisbury has implemented many of the crystal models for the Verma crystal into Sage, as well as important families of elementary crystals; both of these implementations were the first implementations for these crystals. Schilling has been at the forefront of the crystal development in Sage, authoring much of the underlying code on which subsequent crystals have been developed. She has also implemented some low-level algorithms such as IntegerListsLex on which, for example, the code for partitions and compositions relies. In addition, she has developed much of the code pertaining to k-Schur functions and affine Schubert calculus. Shimozono is also an expert in the latter fields, and he has contributed code for the Littelmann path model and root systems. Stein, of course, is the founder of the Sage project and the architect of the SageMathCloud. The PIs are mathematical experts on the objects proposed to be implemented in Sage and have excellent technical knowledge of the underlying Python language and the Git workflow. The symbiotic relationship between mathematical research and the code has been extremely powerful. For example, the crystal code has brought together the algebraic combinatorics and number theory community in the ICERM program on “Automorphic Forms, Combinatorial Representation Theory and Multiple Dirichlet Series”. In addition, there is an international community with members in Australia (e.g. Andrew Mathas), Europe (e.g. Nicolas M. Thi´ery, Christian Stump, Viviane Pons), Canada (e.g. Franco Saliloa, Mike Zabrocki), and India (Arvind Ayyer, Amri Prasad) and many others that will all be involved in and benefit from this grant through the activities and new code that will be developed.

4 Target features

4.1 Characters for infinite dimensional Lie algebras Infinite-dimensional Lie algebras, including affine Lie algebras, hyperbolic Lie algebras, and the Virasoro algebra, often have important representations that are amenable to computation. As mentioned under Results of Prior NSF Support, a start has been made on methods for integrable representations of affine Lie algebras. We will explain the importance of this topic and then outline what remains to be done. Kac-Moody Lie algebras are described in Kac’s important book [15]. Beginning with a “generalized Cartan matrix” A one constructs a Lie algebra g and the representation theory of these is an important topic. An algorithm for computing the weight multiplicities is known by the Freudenthal multiplicity formula. The implementation requires the invariant symmetric bilinear form on the Cartan subalgebra, and there are some technical issues here. One needs to know the bilinear form with respect to two different lattices, namely the root lattice and the weight lattice, and since these have different natural bases, coercion between the two corresponding element classes is nontrivial. Moreover, there are “imaginary roots,” and these may have interesting multiplicities. There is also an algorithm for computing these, the Peterson formula, which was partially implemented in Sage by K.-H. Lee and Jonathan Judge. There are three important special cases. First, if A is positive definite, then g is a finite- dimensional semisimple Lie algebra. (Sage has excellent support for these.) In the finite- dimensional case there are no imaginary roots. The second case is where g is an affine Lie algebra. In this case A is not invertible, which is a complication, and there are imaginary roots, but these have predictable multiplicities. The third case is where g is hyperbolic. In this case A is invertible but has one negative eigenvalue. This is the case that Lee and Judge are most

5 interested in. The multiplities of the imaginary roots are poorly understood in this case but may be computed using the Peterson formula. To summarize what has been done so far, in the finite-dimensional and untwisted affine case, the Freudenthal multiplicity formula has been implemented, and Sage is capable of computing the weight multiplicities of integrable representations, and other related data. We are propos- ing to go beyond this to other Kac-Moody types. Lee and Judge are also interested in this, particularly in the hyperbolic case, and we most likely will be coordinating with them. Affine Lie algebras first appeared as “current algebras” in mathematical physics. Their “integrable” representations, though infinite-dimensional, are analogs of the finite-dimensional representations of complex Lie algebras. It is not possible to survey here the applications of integrable highest weight modules of affine Lie algebras, but we mention a couple of aspects that seem particularly relevant. First, their graded dimensions and “string functions” are modular forms. Modular forms are strongly supported in Sage, with the modular symbol algorithm developed by Stein being the first cornerstone. Modular forms are ubiquitous in number theory, but now they also appeared in conformal field theory, and in the “Moonshine,” where the character degrees and values of sporadic simple groups are related to Fourier coefficients of modular forms and automorphic functions. An affine Lie algebra has a particular important integrable representation, the so-called basic representation, which is the one whose highest weight is the affine root (which is the unique simple root of the affine Lie algebra g that is not also in the classical Lie subalgebra g◦). It is the basic representation that first appeared in mathematical physics. Inspired by the physics, Frenkel and Kac [12] showed that the basic representation has a model in which some elements of g and of the Virasoro algebra act by vertex operators which correspond to creation and annihilation operators in the bosonic Fock space. Vertex operator algebras, constructed from these, led to Borcherds’ Fields Medal-winning work on Moonshine [7]. In another direction, which connects with topics now important in algebraic combinatorics, the crystal graph of the (quantized) basic representation when g = slp was computed by Misra and Miwa [42]. Lascoux, Leclerc and Thibon [38] showed that this crystal graph miraculously coincides with a graph of the p-modular branching rule of the symmetric group, which had been computed by Kleshchev. The resulting LLT algorithm has proved very important in algebraic combinatorics. Beginning with Sage-6.7, Sage can compute weight multiplicities, branching rules and other important data for integrable representations of untwisted affine Lie algebras using the Freuden- thal multiplicity formula. In particular, all the data in the tables of [21] may now be done in Sage! However this code needs to be generalized. Both [21] and Sage-6.7 limit their computations to untwisted affine Lie algebras, so the twisted affine Lie algebras need to be dealt with. About half the affine Lie algebras are twisted ones, which makes the limitation to untwisted cases a serious one in both [21] and in the code that was merged in Sage-6.7. Twisted affine root systems are already implemented in Sage, but the IntegrableRepresentation class has not yet been extended to the twisted case. In addition, more documentation needs to be written. Although the documentation added to the reference manual is sufficient for running the code, further documentation explaining the mathematical background and what it can do will be added to the thematic tutorial Lie Methods and Related Combinatorics in Sage. Like finite-dimensional Lie algebras, affine Kac-Moody Lie algebras are a special case, and have been treated separately for this reason. First, their representations are extremely impor- tant. One technical difficulty that is present in the general case is absent: the necessity of

6 computing the multiplicities of the imaginary roots. That is, once one goes beyond the finite- dimensional case, one encounters imaginary roots, and these must be taken into account in implementing the Freudenthal multiplicity formula, which is the workhorse behind these algo- rithms. In the affine case, the root multiplicities are straightforward to compute. In general, this is not the case any longer. Implementing integrable representations for general Kac-Moody Lie algebras will require root systems for general Kac-Moody Lie algebras. This is part of this proposal (see Section 4.2). It will also require implementing the invariant symmetric bilinear form and two key algorithms, the Peterson formula and the Freudenthal multiplicity formula. There are opportunities for making connections between the representation theory code, such as the code recently implemented for integrable representations of affine Lie algebras and existing code in Sage, including the modular forms, crystals and other combinatorics code. The modular form code by Stein was the original motivation of Sage, and since Kac and Peterson showed that the graded degrees and string functions of integrable representations are modular forms, there is an opportunity to make an internal connection within Sage here. The crystals of these representations can be computed using the existing Nakajima Monomial code in Sage, written by Arthur Lubovsky and Ben Salisbury, so here again, there is an opportunity to make a connection.

4.2 Root systems beyond finite and affine type Root systems are combinatorial data that encode the representation theoretic behavior of a Lie algebra, or more generally, of a Kac–Moody algebra. Currently, there is substantial support in Sage for root systems of classical Lie algebras and for affine Kac–Moody algebras, but the representation theory in Sage has already outgrown the root systems available. For example, each crystal implementation in Sage has a direct connection to the corresponding root system for that crystal; however, there are crystal implementations in Sage for any symmetrizable Cartan matrix (namely, with Nakajima monomials and rigged configurations) which do not have a root system to which they correspond. Therefore, extending root systems beyond the types already implemented is crucial for seamless integration with existing crystals code. Current research projects related to root systems will also benefit from the code proposed, such as calculating root multiplicities for hyperbolic Kac–Moody algebras. Extending further to Borcherds–Cartan Kac–Moody algebras, or generalized Kac–Moody algebras [6, 13], would also benefit researchers in both representation theory and number theory as certain character identities from the theory of both hyperbolic Kac–Moody algebras and generalized Kac–Moody algebras lead to results relating to modular forms [24, 25]. Salisbury will work on these implementations, and an expected time of completion is by Summer 2017.

4.3 Lie Superalgebras Lie superalgebras [14, 44, 8] are another generalization of classical Lie algebras. This generaliza- tion is a (Z/2Z)-graded algebra which obeys certain “supersymmetries” and contains classical Lie algebras as direct summands. Their root systems and representation theory are important in modular representation theory of symmetric groups and in the theory of quasi-symmetric func- tions [27], thereby extending and relating to some of the goals and implementations stemming from the previous work under this solicitation.

7 Lie superalgebras were originally discovered by physicists in connection with supersymmetry. Potentially, the standard model in physics, where SU(3) symmetry plays an important role, can be enlarged to a theory in which Bosons and Fermions can occur in the same multiplets, but describing such a theory requires a generalization of Lie theory to include Lie superalgebras. These were classified by Kac [14], and the Freudenthal multiplicity formula, needed for computer work, was proved by Kang, Kwon and Oh [18]. Most of the representation theory of finite- dimensional semisimple Lie algebras goes through for them, and it is natural to want to extend the WeylCharacterRing code in Sage to this context. Probably we will begin with the most important examples, first gl(m|n) and then spo(2m|n), then implement code for q(n). The cases for gl(m|n) and q(n) can potentially be connected with the symmetric function code in Sage because the characters of the irreducibles are, respectively supersymmetric (that is hook) Schur functions and Schur Q-functions. (See [8].) Furthermore, there are crystals associated with characters of Lie superalgebras (see [5]). Therefore it is desirable to make connections between the proposed new area and symmetric function and crystal code. For that matter, it may be desirable to give methods for the already-implemented WeylCharacterRings, at least in type A and the symmetric function code. Potentially a WeylCharacterRing element may have a method that produces a Schur function or symmetric polynomial. Salisbury will work on root systems for Lie superalgebras as a continuation of the project in Section 4.2. Bump will work on methods for characters of finite-dimensional representations of Lie superalgebras. When the root system infrastructure is in place, crystals for Lie superalgebras will then be implemented.

4.4 Crystal structures related to affine Schubert calculus One of the main combinatorial structures we study are crystal bases [20, 19]. They can be viewed, intuitively, as bases for representations of a quantum group “at zero temperature”. In this limit where the quantum parameter q → 0, such a basis has a simple combinatorial structure, called a crystal. It captures the essential information of the representation. The usual representation theory of Lie groups is obtained in the limit q → 1. It is an amazing result of Lusztig [40] that the main questions of representation theory can be studied in either limit. The crystal limit lends itself to a beautiful combinatorial analysis. A crystal is simply a directed graph with colored edges. The vertices correspond to the elements of the crystal basis, so their number is the dimension of the representation. Essentially, there is an edge colored i (for i corresponding to a node in the Dynkin diagram) from a vertex b1 to b2 if, in the limit q → 0, the Chevalley generator Fi of the Lie or Kac–Moody Lie algebra sends the basis element b1 to b2. In the crystal limit these operators are called the Kashiwara operators fi (and similarly ei for the limits of the Chevalley generator Ei). The information encoded by a crystal is sufficient for solving classical problems in representation theory, such as decomposing tensor products of representations. Kashiwara crystals are combinatorial analogs of the irreducible representations of irreducible representations of Lie groups or their generalizations. If λ is a dominant weight for G, there G G is an irreducible representation πλ = πλ of G, and also a crystal Bλ = Bλ . It is a directed graph with edges labeled by the simple roots and a map to the weight lattice, having remarkable G combinatorial properties. For example, it has a character equal to the character of πλ , and there is a tensor product operation defined, such that the decomposition of the tensor product of Bλ with Bµ into irreducible crystals exactly mirrors the decomposition of πλ. In [43], Morse and Schilling defined a new crystal structure on affine factorizations which

8 opens doors to many new exciting approaches in the study of k-Schur functions, flag Gromov– Witten invariants, and quantum Schubert structure coefficients [11, 41]. The crux of the idea is that many of the hard-to-tackle structure coefficients are contained in the structure coefficients of (dual) k-Schur functions [34, 35, 37], which can be viewed as affine versions of Schur functions. ν Just as the usual Littlewood–Richardson (LR) coefficients cλ,µ appear both in the expansion of P ν products of Schur functions sλsµ = ν cλ,µsν as well as in the expansion of skew Schur functions

X ν sν/λ = cλ,µsµ , µ the affine LR coefficients appear in two ways: as structure coefficients of products of k-Schur functions and the expansion of “skew” dual k-Schur functions into “straight” dual k-Schur functions. The dual k-Schur functions Fw are indexed by the subset of the affine symmetric group S˜n = hs0, s1, . . . , sn−1i consisting of affine Grassmannian elements — representatives of minimal ˜0 ˜ length in cosets of Sn = Sn/Sn where n = k + 1. They form a basis of a quotient of the ring of symmetric functions Λ. Lam proved [28] that {Fw} are representatives for the cohomology classes of the affine Grassmannian Gr and the Schubert structure constants in homology exactly w,k ˜0 match the affine LR coefficients cu,w with u, w, v ∈ Sn. As shown in [37] there exists a family of ˜0 “skew” generalizations {Fvw−1 } with w, v ∈ Sn with the expansion X v,k Fvw−1 = cu,w Fu . (1) ˜0 u∈Sn It was known for quite some time that the “straight” dual k-Schur functions are affine Stanley symmetric functions (or affine stable Schubert polynomials) [28]. A main observation in [43, Corollary 5.6] is that dual k-Schur functions and affine Stanley symmetric functions are actually equal in general (even for “skew” shapes up to a relabeling of the indices). This makes it possible to study the affine LR coefficients in terms of the combinatorics of affine Stanley symmetric functions which are governed by affine factorizations. Namely, for w ∈ S˜n the affine Stanley symmetric functions are defined as follows

X `(w1) `(w`) Fw(x) = x1 ··· x` , (2) ` 1 ` w ···w ∈Ww i i ` where `(w ) is the length of w and Ww is the set of all affine factorizations of w into ` factors. An affine factorization of w is a decomposition of the form w = w` ··· w1, such that `(w) = 1 ` i `(w ) + ··· + `(w ) and each w is a cyclically decreasing permutation. In turn, w = si1 ··· sik is cyclically decreasing if no letter in the word cont(w) := i1 ··· ik is repeated and j − 1 j does not occur as a subword for any j ∈ {0, 1, . . . , n} (where we take all indices mod n). ˜0 Affine Grassmannian permutations u ∈ Sn are in one-to-one correspondence with k-bounded partitions [36, Proposition 40], where n = k + 1. A partition λ = (λ1, λ2,...) is k-bounded if ˜0 λ1 ≤ k. If λ corresponds to u ∈ Sn under this correspondence and the hook of λ is strictly less than n, then we have that Fu = sλ. Hence in this case (1) becomes a Schur expansion. This case is extremely well-suited for an analysis using crystal bases by the following theorem since, for type A, the Schur functions are the characters of irreducible components.

Theorem 1 [19, 46, 39] Let B be a Uq(g)-crystal in the category of integrable highest-weight crystals. Then the connected components of B correspond to the irreducible components. In addition, the irreducible components are in bijection with the highest weight vectors.

9 (1, s3s1, s4s2) (s1, s3, s4s2)

2 1

(s3, s1, s4s2) (s1, s3s2, s4)

1 2 2

(s3, s4s1, s2) (s3s1, 1, s4s2) (s3s1, s2, s4)

2 1

(s3s1, s4, s2)

1

(s3s1, s4s2, 1)

Figure 1: The crystal B(w) for w = s3s4s1s2 ∈ S5 with 3 factors (of type A2)

` In [43] a crystal B(w) was defined on the affine factorizations Ww in certain cases. An example of B(w) is given in Figure 1, which shows that the Schur expansion of the Stanley symmetric function is Fs3s4s1s2 = s(2,2) + s(2,1,1). This figure was produced in Sage, using the implementation by Schilling http://trac.sagemath.org/ticket/15844. Affine Stanley symmetric functions exist not only for type A. In [32, 50, 49] they were defined for other classical types.

Goal 1 Extend the crystal theory for affine Stanley symmetric functions to other types.

In [31] affine Grothendieck polynomials were defined which are K-theoretic analogues of the affine Stanley symmetric functions. These rely on the K-theoretic nilHecke ring of Kostant and Kumar [26].

Goal 2 Give K-theoretic analogues of the crystal operators.

The discovery of these crystals will be guided by Sage and, if found, will be implemented into main Sage by Schilling. Whereas dual k-Schur functions (or equivalently the affine Stanley symmetric functions) can be defined as the monomial expansion in terms of affine factorizations or weak k-tableaux, k- Schur functions can be expressed in terms of strong k-tableaux. In fact, there is a t-analogue of the k-Schur functions which is a sum over strong k-tableaux weighted by a spin statistic. In [29] it was proven that at t = 1 the k-Schur functions expand positively in terms of Schur functions. This was established using a branching from k to k + 1-Schur functions. It is an open problem to show that the k-Schur functions including the t statistic are Schur positive. Assaf and Billey [1] made progress towards this goal by employing dual equivalence graphs. In [52, Proposition 4.5] Schilling showed that the components of the crystal on affine factorizations are in one-to-one correspondence with the components of the Coxeter–Knuth graph, which suggests that the crystal approach is an alternative to the dual equivalence approach. Experimentation in Sage indicates that a crystal structure can be defined on strong tableaux using a similar bracketing rule as in the weak case.

10 Goal 3 Prove that a crystal on strong tableaux indeed exists such that the spin statistics is (k) preserved, proving Schur positivity of the k-Schur functions sλ (t). Implement this crystal in Sage.

4.5 Double affine Hecke algebras in Sage The double affine Hecke algebra (DAHA) was first introduced in 1994 by Ivan Cherednik [9] to solve the Macdonald inner product conjectures. Since then, these algebras and their offshoots have become increasingly influential in a growing number of fields. Their representation theory has significant connections with algebraic geometry, combinatorics, finite dimensional algebra, homological algebra, integrable systems, Lie theory, noncommutative algebra and q-calculus: they have been used to confirm conjectures and answer questions in all of these subjects. The DAHA touches on the following problems: quantization of symplectic algebraic varieties; repre- sentation theory of cyclotomic Hecke algebras; generalized Calogero–Moser systems; geometric representation theory through quantum Hamiltonian reduction; and Lie theoretic combinatorics such as Kazhdan–Lusztig theory and orthogonal polynomials. Shimozono proposes to integrate into Sage, his working version (about 10,000 lines of code) of the DAHA. This code is being used in research with Dan Orr [47, 48] on Macdonald poly- nomials, torus knot polynomials, operators on symmetric functions arising from elliptic Hall algebras and the spherical DAHA. The DAHA will be installed in several stages. Extended affine Weyl groups and semidirect products of groups. At Sage Days 40 (Univ. Minn. July, 2012), Daniel Bump, Daniel Orr, Anne Schilling, Mark Shimozono, and Nicolas Thi´erydesigned the initial version of the extended affine Weyl group in Sage. Shimozono implemented a number of enhancements including multiple realizations. This was built on a general semidirect product construction for groups. This code is available as trac ticket http://trac.sagemath.org/ticket/15375, will undergo a final redesign and will be integrated into Sage within the next year. Tensor products and smash products of algebras. Currently Sage only supports tensor products of modules and direct products of algebras. A smash product is an algebra which linearly is a tensor products of algebras but whose multiplication can be more complicated than just the componentwise product. We will add category support to tensor products to add the necessary functionality to support both optimized tensor products of modules (which are flattened to avoid combinatorial explosion of different groupings) and the grouped tensor products necessary for smash products. Twisted group algebras (in which the group acts on the ring of “coefficients”) have a natural implementation by a smash product. In addition we shall add support for tensor products of maps, which have many natural uses, for example, checking structure maps of Hopf algebras. The DAHA requires many smash product instances. Initial progress on this can be found in http://trac.sagemath.org/ticket/15832 and http://trac.sagemath.org/ticket/15726. Shimozono will complete this part within the first year of the project. Representations of algebras. We plan to implement support for general representations of algebras, following the existing model for Hecke algebra representations. This will done for various algebras, in particular for universal enveloping algebras of Lie algebras. This will be based on http://trac.sagemath.org/ticket/14901. Multiparameter Hecke algebras, Koornwinder algebra. We will implement Hecke al- gebras with several parameters. These are needed for the Koornwinder DAHA. It will be a

11 delicate task to integrate this with the existing Hecke algebra code. A first draft by Shimozono is available here http://trac.sagemath.org/ticket/17989. DAHA and its polynomial module. Using smash products and multiparameter Hecke algebras, the DAHA will be implemented. It will be a challenging task to incorporate the full power of the duality theorem for DAHAs. The polynomial module and its basis of Macdonald polynomials will also be implemented in a full-featured form. Difference operators. The action of the DAHA on its polynomial module affords a represen- tation by difference-reflection operators. Such operators live in a twisted group algebra. When restricted to the spherical subalgebra of the DAHA, one obtains symmetric difference operators which can then be converted to operators on symmetric functions. In [48] a new formula for the Macdonald column operator was found using this process. We intend to program the homo- morphism from the DAHA to the algebra of difference-reflection operators in order to discover other such operators. Degenerate DAHA and quantum K-theory. The DAHA has a nil limit which is a K- theoretic analogue of an algebra considered by Peterson and which is a partially-forgetful ana- logue of the K-theoretic nilHecke algebra of Kostant and Kumar for affine root systems. We plan to program this algebra and its important bases, as it can conjecturally be used to com- pute the quantum K-theoretic invariants of flag varieties [30]. We also plan to program the cohomological analogues, which are known to compute equivariant quantum cohomology of flag varieties [33]. The last three items will be implemented by Shimozono in close collaboration with Bump and Schilling. They will require the previous items will be completed towards the end of the project.

4.6 MV polytopes Mirkovi´c–Vilonen(MV) polytopes [16, 17] are polytopes in a coweight space that satisfy certain sets of inequalities, called the edge inequalities and the tropical Pl¨ucker relations, and were origi- nally defined as the moment map images of Mirkovi´c-Vilonencycles on the affine Grassmannian. The tropical Pl¨ucker relations are based on the underlying root system for the given coweight lattice in which the MV polytopes live. In particular, the 1-skeleton of an MV polytope encodes all possible Lusztig parametrizations of an element the canonical basis of the quantized universal enveloping algebra of a symmetrizable Kac-Moody algebra, and the tropical Pl¨ucker relations are the transition maps between Lusztig parametrizations. In the affine Kac-Moody case, these polytopes are decorated with partitions and provide a candidate for an analogue of the Lusztig parametrization of an element of the canonical basis in this setting [2, 3, 4, 45]. It would be interesting to link MV polytope code with the recently implemented quiver representations package in Sage, as MV polytopes may also be realized as the convex hull of (dimension vectors of) subrepresentations of certain representations of the preprojective algebra of a quiver. An implementation of MV polytopes in Sage would also enhance the crystal packages in Sage, as MV polytopes parametrize the crystal B(∞) and, again, encode all Lusztig parametrizations of a vertex in B(∞) in a single stroke. Finally, the previously implemented root system plots code will allow visual representation of MV polytopes in small rank that is usually very time consuming (and sometimes costly) to do by hand. Salisbury will work on this proposed project.

12 4.7 KLR algebras Khovanov–Lauda–Rouquier (KLR) algebras are algebras defined independently by Khovanov- Lauda [22, 23] and Rouquier [51] with the purpose of using the representations of the KLR algebra to categorify the quantized universal enveloping algebra of a Kac-Moody algebra. Since their inception, KLR algebras have been at the heart of representation theory and categorifica- tion. Therefore, it is essential that Sage have a definition of KLR algebra and, more importantly, have a language to manipulate the representations of the KLR algebra, including a definition of restriction and induction functors. An implementation of the KLR algebra and its representations would immediately enhance the proposed MV polytope implementation, as MV polytopes may be generalized to a so-called KLR polytope [53], which takes the theory of MV polytopes to all symmetrizable Kac-Moody types. Salisbury will work on this proposed project.

5 Broader impacts of proposed work

5.1 SageMathCloud Stein launched SageMathCloud (SMC) in mid-2013 to make Sage, LaTeX (and much more) easier to use collaboratively online, partly motivated by how difficult it is to install the constantly growing Sage software, especially on Windows. SMC thus supports the broader impact goals of the Sage-Combinat project. SMC has over 30,000 monthly active users, was used by students in over 60 courses during Spring 2015 (see https://github.com/sagemath/cloud/ wiki/Teaching), and is also popular in NSF-funded REU’s, where realtime collaboration and powerful combinatorics support are both killer features. There is a huge amount that we plan to do to make SMC more powerful and user friendly, including improving the file management capabilities, making the backend load balancing more efficient, providing better user support for browsing backups and the edit history of the files, and implementing sophisticated teaching support functionality (the subject of a pending NSF CCLI proposal). We also intend to implement functionality for SMC that is directly relevant to the Sage- Combinat project. This includes support for interactive combinatorial visualizations, e.g., of plots of graphs, trees, hypergraphs, higher-dimensional objects such as polytopes and plane par- titions etc. In particular, we plan to improve the display and visualization of 2D/3D graphics, which includes support for text written in LaTeX or vector graphics (svg, pdf) and compatibil- ity with matplotlib (for the 2D scenes). We also intend to design and implement a web-based class browser for Python source trees, which is powerful enough to handle Sage’s complicated category-influenced class hierarchy. We hope to add support for easily distributing computations in parallel on many computers from an SMC project, with realtime graphical feedback about progress, motivated by CPU-intensive combinatorics computations. We also plan to support in- teractively browsing contents of a sqlite database, which supports building SQL queries, running Sage code on results, drawing plots, etc. This would be very useful for storing and manipulating the large data sets that come up in combinatorial (and number theoretic) computations.

5.2 Sage Days and plan of activities We are planning to hold three Sage Days in the US:

13 • Sage Days on “Web-based visualization of mathematical objects” at the University of Washington organized by William Stein during the summer of 2016.

• Sage Days on “Representation theory and combinatorics” at Central Michigan University organized by Ben Salisbury in March 2017.

• Sage Days on “Algebraic combinatorics and Lie algebras” at UC Davis organized by Daniel Bump and Anne Schilling in the summer of 2017.

Central Michigan University, Stanford University, UC Davis, University of Washington, and Virginia Tech may also host smaller scale meetings of the Sage-Combinat and SMC developer’s community to discuss design decisions and smaller scale coding sprints.

5.3 RA support, curriculum development, and thematic tutorials Both at UC Davis and Central Michigan, several graduate students have already been involved with Sage on various levels. Travis Scrimshaw was involved in all levels of the Sage develop- ment including the organization of Sage Days, whereas other students (Nathaniel Gallup, Jamie Haddock, Dmitry Shemetov, Matthew Plante and others) have used Sage actively in their thesis research. Schilling has used Sage in several classes at UC Davis, for example MAT115A (number theory), MAT146 (algebraic combinatorics) and a special topics class MAT180 which featured computational experimentation using Sage https://www.math.ucdavis.edu/~anne/WQ2015/ 180.html. The capabilities of the SageMathCloud will be extremely useful in simplifying the collaborative efforts with students. The graduate student RA support asked for in this grant will expose beginning researchers to the combinatorial aspects of Sage; this can be a powerful tool for students trying to master the computationally intricate theory common in combinatorics. Furthermore, it will provide them with an opportunity to develop (with guidance) code implementing novel algorithms for research-level mathematics. Good documentation is an essential aspect of software in general, and specifically for the dissemination of the production of this grant. Luckily, Sage’s documentation system has ex- cellent support for mathematics using jsMath to MathJax, and it includes a comprehensive reference manual, thanks to its strict review process which enforces documentation on all new code. Some documentation is organized as a collection of thematic tutorials. Each such tutorial aims at giving an overview of the features in Sage on a given theme, together with relevant mathematical background. These tutorials are important for making sure that mathematicians and physicists working on a problem are fully aware of the tools available within Sage. They can also accompany class notes. As a corollary, they are important tools for outreach to new users and developers and help maintain the cohesiveness of Sage.

14 References

[1] Sami H. Assaf and Sara C. Billey. Affine dual equivalence and k-Schur functions. J. Comb., 3(3):343–399, 2012.

[2] Pierre Baumann, Thomas Dunlap, Joel Kamnitzer, and Peter Tingley. Rank 2 affine MV polytopes. Represent. Theory, 17:442–468, 2013.

[3] Pierre Baumann and Joel Kamnitzer. Preprojective algebras and MV polytopes. Represent. Theory, 16:152–188, 2012.

[4] Pierre Baumann, Joel Kamnitzer, and Peter Tingley. Affine Mirkovi´c-Vilonenpolytopes. Publ. Math. Inst. Hautes Etudes´ Sci., 120:113–205, 2014.

[5] Georgia Benkart, Seok-Jin Kang, and Masaki Kashiwara. Crystal bases for the quantum superalgebra Uq(gl(m, n)). J. Amer. Math. Soc., 13(2):295–331, 2000. [6] Richard Borcherds. Generalized Kac-Moody algebras. J. Algebra, 115(2):501–512, 1988.

[7] Richard E. Borcherds. Monstrous moonshine and monstrous Lie superalgebras. Invent. Math., 109(2):405–444, 1992.

[8] Shun-Jen Cheng and Weiqiang Wang. Dualities and representations of Lie superalgebras, volume 144 of Graduate Studies in Mathematics. American Mathematical Society, Provi- dence, RI, 2012.

[9] Ivan Cherednik. Double affine Hecke algebras and Macdonald’s conjectures. Ann. of Math. (2), 141(1):191–216, 1995.

[10] Sage Developers. Elements, parents, and categories in sage: a (draft of) primer, 2015.

[11] Sergey Fomin, Sergei Gelfand, and Alexander Postnikov. Quantum Schubert polynomials. J. Amer. Math. Soc., 10(3):565–596, 1997.

[12] I. B. Frenkel and V. G. Kac. Basic representations of affine Lie algebras and dual resonance models. Invent. Math., 62(1):23–66, 1980/81.

[13] Elizabeth Jurisich. An exposition of generalized Kac-Moody algebras. In Lie algebras and their representations (Seoul, 1995), volume 194 of Contemp. Math., pages 121–159. Amer. Math. Soc., Providence, RI, 1996.

[14] V. G. Kac. Lie superalgebras. Advances in Math., 26(1):8–96, 1977.

[15] Victor G. Kac. Infinite-dimensional Lie algebras. Cambridge University Press, Cambridge, third edition, 1990.

[16] Joel Kamnitzer. The crystal structure on the set of Mirkovi´c-Vilonenpolytopes. Adv. Math., 215(1):66–93, 2007.

[17] Joel Kamnitzer. Mirkovi´c-Vilonencycles and polytopes. Ann. of Math. (2), 171(1):245–294, 2010.

15 [18] Seok-Jin Kang, Jae-Hoon Kwon, and Young-Tak Oh. Peterson-type dimension formulas for graded Lie superalgebras. Nagoya Math. J., 163:107–144, 2001.

[19] M. Kashiwara. On crystal bases of the Q-analogue of universal enveloping algebras. Duke Math. J., 63(2):465–516, 1991.

[20] Masaki Kashiwara. Crystalizing the q-analogue of universal enveloping algebras. Comm. Math. Phys., 133(2):249–260, 1990.

[21] S. Kass, R. V. Moody, J. Patera, and R. Slansky. Affine Lie algebras, weight multiplicities, and branching rules. Vols. 1, 2, volume 9 of Los Alamos Series in Basic and Applied Sciences. University of California Press, Berkeley, CA, 1990.

[22] Mikhail Khovanov and Aaron D. Lauda. A diagrammatic approach to categorification of quantum groups. I. Represent. Theory, 13:309–347, 2009.

[23] Mikhail Khovanov and Aaron D. Lauda. A diagrammatic approach to categorification of quantum groups II. Trans. Amer. Math. Soc., 363(5):2685–2700, 2011.

[24] Henry H. Kim and Kyu-Hwan Lee. Root multiplicities of hyperbolic Kac-Moody algebras and Fourier coefficients of modular forms. Ramanujan J., 32(3):329–352, 2013.

[25] Henry H. Kim and Kyu-Hwan Lee. Rank 2 symmetric hyperbolic Kac-Moody algebras and Hilbert modular forms. J. Algebra, 407:81–104, 2014.

[26] Bertram Kostant and Shrawan Kumar. T -equivariant K-theory of generalized flag varieties. J. Differential Geom., 32(2):549–603, 1990.

[27] Jae-Hoon Kwon. Crystal graphs for general linear Lie superalgebras and quasi-symmetric functions. J. Combin. Theory Ser. A, 116(7):1199–1218, 2009.

[28] Thomas Lam. Schubert polynomials for the affine Grassmannian. J. Amer. Math. Soc., 21(1):259–281, 2008.

[29] Thomas Lam, Luc Lapointe, Jennifer Morse, and Mark Shimozono. The poset of k-shapes and branching rules for k-Schur functions. Mem. Amer. Math. Soc., 223(1050):vi+101, 2013.

[30] Thomas Lam, Changzheng Li, Leonardo Mihalcea, and Mark Shimozono. Equivariant quantum K-theory of flag manifolds and K-homology of affine Grassmannians. 2012.

[31] Thomas Lam, Anne Schilling, and Mark Shimozono. K-theory Schubert calculus of the affine Grassmannian. Compos. Math., 146(4):811–852, 2010.

[32] Thomas Lam, Anne Schilling, and Mark Shimozono. Schubert polynomials for the affine Grassmannian of the symplectic group. Math. Z., 264(4):765–811, 2010.

[33] Thomas Lam and Mark Shimozono. Quantum cohomology of G/P and homology of affine Grassmannian. Acta Math., 204(1):49–90, 2010.

[34] L. Lapointe, A. Lascoux, and J. Morse. Tableau atoms and a new Macdonald positivity conjecture. Duke Math. J., 116(1):103–146, 2003.

16 [35] Luc Lapointe and Jennifer Morse. Schur function identities, their t-analogs, and k-Schur irreducibility. Adv. Math., 180(1):222–247, 2003. [36] Luc Lapointe and Jennifer Morse. Tableaux on k + 1-cores, reduced words for affine per- mutations, and k-Schur expansions. J. Combin. Theory Ser. A, 112(1):44–81, 2005. [37] Luc Lapointe and Jennifer Morse. Quantum cohomology and the k-Schur basis. Trans. Amer. Math. Soc., 360(4):2021–2040, 2008. [38] Alain Lascoux, Bernard Leclerc, and Jean-Yves Thibon. Hecke algebras at roots of unity and crystal bases of quantum affine algebras. Comm. Math. Phys., 181(1):205–263, 1996. [39] Peter Littelmann. A Littlewood-Richardson rule for symmetrizable Kac-Moody algebras. Invent. Math., 116(1-3):329–346, 1994. [40] G. Lusztig. Quantum deformations of certain simple modules over enveloping algebras. Adv. in Math., 70(2):237–249, 1988. [41] Karola M´esz´aros,Greta Panova, and Alexander Postnikov. Schur times Schubert via the Fomin-Kirillov algebra. Electron. J. Combin., 21(1):Paper 1.39, 22, 2014.

[42] Kailash Misra and Tetsuji Miwa. Crystal base for the basic representation of Uq(sl(n)). Comm. Math. Phys., 134(1):79–88, 1990. [43] Jennifer Morse and Anne Schilling. Crystal approach to affine Schubert calculus. 2014. arXiv:1408.0320 [math.CO]. [44] Ian M. Musson. Lie superalgebras and enveloping algebras, volume 131 of Graduate Studies in Mathematics. American Mathematical Society, Providence, RI, 2012. [45] Dinakar Muthiah and Peter Tingley. Affine PBW bases and MV polytopes in rank 2. Selecta Math. (N.S.), 20(1):237–260, 2014. [46] Toshiki Nakashima. Crystal base and a generalization of the Littlewood-Richardson rule for the classical Lie algebras. Comm. Math. Phys., 154(2):215–243, 1993. [47] Dan Orr and Mark Shimozono. Specializations of nonsymmetric Macdonald-Koornwinder polynomials. 2013. arXiv:1310.0279. [48] Dan Orr and Mark Shimozono. Elliptic Hall algebra, spherical DAHA, and symmetric function operators. 2015. [49] Steven Pon. Affine Stanley symmetric functions for classical types. J. Algebraic Combin., 36(4):595–622, 2012. [50] Steven A. Pon. Affine Stanley symmetric functions for classical groups. ProQuest LLC, Ann Arbor, MI, 2010. Thesis (Ph.D.)–University of California, Davis. [51] Rafa¨elRouquier. 2-Kac-Moody algebras, 2008. arXiv:0812.5023. [52] Anne Schilling. Richard Stanley through a crystal lens and from a random angle. AMS Richard Stanley volume, to appear, 2014. arXiv:1405.2966 [math.CO]. [53] Peter Tingley and Ben Webster. Mirkovic-Vilonen polytopes and Khovonov-Lauda- Rouquier algebras, 2012. arXiv:1210.6921.

17