Cellularity for weighted KLRW algebras of types $B$, $A^{(2)}$, $D^{(2)}$

This paper constructs homogeneous affine sandwich cellular bases of weighted KLRW algebras in types $B$, $A^{(2)}$, $D^{(2)}$. Our construction immediately gives homogeneous sandwich cellular bases for the finite dimensional quotients of these algebras. Since weighted KLRW algebras generalize KLR algebras, we also obtain bases and cellularity results for the (infinite and finite dimensional) KLR algebras.


Introduction
KLR algebras, or quiver Hecke algebras, are graded infinite dimensional algebras attached to a quiver. These algebras arise in categorification and categorical representation theory, see e.g. [KL09], [KL11], [Rou08] or [Rou12]. They admit finite dimensional quotients, called cyclotomic KLR algebras. The KLR algebras and their cyclotomic quotients play crucial roles in modern representation theory and have attracted a lot of attention since their introduction.
A crucial problem is to determine whether these algebras are (graded) cellular in the sense of [GL96], or some variation of cellularity such as affine cellular [KX12]. It turns out that they tend to be graded affine cellular in the infinite dimensional case, see e.g. [KL15], and graded cellular in the finite dimensional case, see e.g. [HM10]. This paper gives explicit homogeneous (affine) cellular bases for these algebras. Moreover, we will see that there is a close relationship between the cellular bases of the infinite dimensional KLR algebras and their finite dimensional quotients, even though this is very hard to see directly in the KLR setting.
Weighted KLRW algebras are generalizations of KLR algebras that were introduced by Webster; see [Web19], [Web17], [Bow22] or [MT21]. Like the KLR algebras, the weighted KLRW algebras admit finite dimensional quotients. The KLR algebras can be constructed as idempotent subalgebras of the weighted KLRW algebras. Some care must be taken when comparing the weighted KLRW and KLR algebras because, for example, the functor induced by idempotent truncation annihilates some of the simple modules.
In the AC types, that is, types A Z , A (1) e , we showed [MT21] that one of the key properties of the weighted KLRW algebras is that they have homogeneous affine cellular bases constructed in the style of low dimensional topology, and these bases automatically descend to the finite dimensional quotients. As a result, we obtained homogeneous (affine) cellular bases for the corresponding KLR algebras and their finite dimensional quotients. Even better, all of these bases are defined over any commutative integral domain R (for example R = Z).
It is natural to ask whether these constructions can be extended to other types. In this paper we answer this question affirmatively for types B Z ≥0 , A (2) 2·e , D (2) e+1 : the BAD types. That is, we construct homogeneous affine sandwich cellular bases for weighted KLRW algebras that descend to the finite dimensional quotients. As in the AC types, we obtain bases for the corresponding KLR algebras. The sandwich part of our bases, corresponding to the finite dimensional quotients, is given by copies of the dual numbers R[X]/(X 2 ), which explains the powers of 2 that appear in the dimension formulas of the finite dimensional KLR algebras. For completeness, we note that the weighted KLRW algebras and their finite dimensional quotients of BAD types are actually (affine) cellular; see Remark 2A.7 for a more precise statement. As a consequence, we obtain the usual cellularity results, such as a construction of the graded simple modules and that the decomposition matrix is unitriangular. This paper is a sequel to [MT21], so we assume some familiarity to the definitions and results of that paper. In sequels to this paper we hope to discuss weighted KLRW algebras of other types and their simple modules.
Remark 1.1. The colors used in this paper are not essential and all strings are distinguishable by their thickness and if they are solid or dashed.
Remark 2A.1. The affine cellular algebras of [KX12] are special case of sandwich cellular algebras were the sandwiched algebras are polynomial rings or quotients of a polynomial rings. As we will see, for weighted KLRW algebras of BAD types we only need affine cellularity. As we reserve the term affine cellular for the cases where the sandwich algebra is a full polynomial ring, we refer to our bases as sandwich cellular bases.
The following is a slight reformulation of [TV21, Section 2].
Definition 2A.2. Let R be a commutative ring with a unit. Let A be a locally unital graded R-algebra. A graded sandwich cell datum for A is a tuple (P, S, T, S, B, C, deg), where: • P = (P, ≤) is a poset (the middle set), • S = λ∈P S(λ) and T = λ∈P T (λ) are collections of finite sets (the bottom/top sets), • S = λ∈P S λ is a direct sum of graded algebras S λ (the sandwiched algebras) such that B λ is a homogeneous basis of S λ (we write deg for the degree function on S λ ), ST is an injective map (the basis), • deg : λ∈P S(λ) ∪ T (λ) −→ Z is a function (the degree), such that: (AC 1 ) For b ∈ B λ , S ∈ S(λ), T ∈ T (λ) and b ∈ B λ , λ ∈ P the element C b ST is homogeneous of degree deg(S) + deg(b) + deg(T ).
Assume that S(λ) = T (λ) for all λ ∈ P, and that there is an antiinvolution ( − ) : A → A such that: . In this case, we write (P, S = T, S, B, C, deg, ( − ) ) and call this datum involutive. This picture has to be interpreted with care because, in general, we do not necessarily have such a factorization.
We use the following terminology for special cases: (a) A graded affine sandwich cell datum for A is a graded sandwich cell datum such that, for all λ ∈ P and for some n(λ) ∈ Z ≥0 , we have S λ ∼ = R[X 1 , ..., X n(λ) ].
(b) A graded cell datum for A is a graded sandwich cell datum such that S λ ∼ = R for all λ ∈ P.
The image of C in A is an homogeneous sandwich cellular basis for A. Similarly, we refer to affine sandwich cellular bases etc.
The following Clifford-Munn-Ponizovskiȋ theorem parametrizes the simple modules of sandwich cellular algebras. To state this result we need some notions.
For each λ ∈ P there exists a cell module ∆(λ) and a cellular pairing φ λ on ∆(λ), see [TV21,Section 2B]. The pairing φ λ is a symmetric bilinear form. Let P =0 ⊂ P be the subset of those λ for which φ λ is nonzero. The illustration to keep in mind is derived from [TV21, Section 2B], the details can be copied from [KX12, Section 2.2]: Theorem 2A.4. Let R be a field, and let A be a graded sandwich cellular algebra.
(a) All (graded) simple A-modules are uniquely associated to a λ ∈ P =0 , called their apex.
(b) Assume that S λ is unital Artinian or commutative. For a fixed apex λ ∈ P =0 there is a 1:1correspondence (c) Assume that S λ is unital graded Artinian or commutative. For a fixed apex λ ∈ P =0 there is a 1:1-correspondence Even for noncommutative S λ the assumption of being unital (graded) Artinian can be avoided under certain conditions, see [TV21, Section 2C] for details.
Remark 2A.5. The bijection in Theorem 2A.4 can be made explicit: the simple A-modules of apex λ ∈ P =0 can be constructed as the simple heads of (adjustments of) the cell modules.
Remark 2A.7. If A is involutive and all sandwiched algebras have an (affine sandwich) cellular datum compatible with the sandwich structure on A, then A also has a cell datum that can be constructed by refining the sandwich cell datum on A in an appropriate sense; see [TV21,Proposition 2.9]. However, refining the datum often makes the natural sandwich datum more cumbersome with very little gain. In our case, the sandwiched algebras are (copies of) polynomial rings and dual numbers, which are affine sandwich cellular algebras, so all of our algebras can be refined to an (affine sandwich) cell datum. Since these the representation theory of these algebras is well-understood, refining the sandwich cell datum for the weighted KLRW algebras in this paper appears to be unnecessary.
Notation 2A.8. From now on all of our algebras are assumed to be involutive, and we will omit the use of this word. We have separated the involutive condition (AC 5 ) in Definition 2A.2 from the other axioms because being involutive is not necessary for Theorem 2A.4 to hold.

Reminders about weighted KLRW algebras
We recall the basic constructions and statements regarding weighted KLRW algebras. As we assume some familiarity with [MT21], we often give examples instead of formal definitions. The details for the material in Section 3A-Section 3C can be found in [MT21, Section 2] and for Section 3D in [MT21, Section 3].
Notation 3.1. The following conventions used throughout the paper.
(a) We work over a commutative integral domain R, the ground ring.
(b) Graded algebra or module will always mean a Z-graded algebra or module.
(c) We use the same diagrammatic conventions as in [MT21]: In particular, left actions and left modules are given by acting from the top. Modules will always be left modules.
3A. Weighted KLRW algebras in a nutshell. The weighted KLRW algebras are diagram algebras consisting of weighted KLRW diagrams (diagrams for short). These diagrams have three types of strings: solid, ghost and red strings. We will also draw affine red strings, but these are only a visual aid and are not actually part of the diagrams. All of these strings are labeled by residues, and we will illustrate these strings as solid : where the label is under the solid and (affine) red strings and over the ghost strings.
An example of such a diagram is (the notation is explained below): We will explain the different features of this diagram below.
The weighted KLRW algebras depend on the following input: (a) An oriented quiver Γ = (I, E) with countable vertex set I and countable edge set E arising from a symmetrizable generalized Cartan matrix. (The choice of orientation does not play an essential role, cf. [MT21, Proposition 3A.1].) We let e + 1 = #I be the number of vertices, allowing e = ∞. The most important edges for this paper are single and double edges, written as i → j and i ⇒ j, respectively, which are relevant for the quivers in (5B.3). If the multiplicity of an edge does not play a role, then we write i j if there is an edge from i to j.
The key examples the reader might want to keep in mind while reading below are the BAD types listed in (5B.3).
(c) Let u and v be indeterminates over R. For i, j ∈ I define Q-polynomials These are Q-polynomials as in [Rou08, Section 3.2.3], [Rou12] or [Web19, Section 2.1]. Recall also that Q iji (u, v, w) = (d) Various types of data determining the positions of the strings. That is, a solid positioning x = (x 1 , ..., x n ) ∈ R n , a ghost shift σ = (σ ∈ R =0 ) ∈E which is a weighting of Γ (illustrated as edge labels), a charge κ = (κ 1 , ..., κ ) ∈ R such that κ 1 < ... < κ . The x, σ and κ are used to determine the boundary points of solid, ghost and red strings in the diagrams, and are such that there are no overlapping strings.
The n-tuple x gives the x-coordinates of the n solid strings. For example, in (3A.2) above we have x = (1, 2, 3.25, 3.5, 4.5, 5.5, 7, 7.5)). The ghost shift gives the distances between a solid string and its ghost, e.g. in (3A.2), the ghost shifts are 0.75 and 1.25 for the two edges starting a vertex 1 and 0.9 for other edge. Finally, κ gives the x-coordinates of the red strings and in (3A.2) we have κ = (0.75, 4). In general, the x-coordinates of the strings at the top and bottom of the diagrams will be different.
(e) A set X of positions, which is the set of possible x-coordinates for the strings. We stress that the rank of the weighted KLRW algebra, which is the number of solid strings, strongly depends on the choice of X.
(f ) Diagrams consisting of n solid strings labeled by i ∈ I, their ghost strings (explained in the next bullet point), and red strings labeled by ρ. Solid and ghost strings can be decorated with dots.
These diagrams are such that their internal points have local neighborhoods of the form (g) Let : i j be an edge. If σ > 0 then each solid i-string has a ghost i-string that is shifted σ units to the right. For each dot on the solid string there is a corresponding dot on the ghost string, which is shifted σ units to the right. The ghost string is just a translate of the solid string, so it mimics its solid string. Similarly, if σ < 0 then each solid j-string has a ghost j-string that is shifted −σ units to the right, together with any corresponding dots.
In (3A.2), each solid 0-string has one ghost shifted 0.9 units to the right. The solid 1-string has two ghosts, as there are two edges starting at 1, that are shifted 0.75 and 1.25 unit to the right. The solid 2-strings do not have any associated ghost strings, as no edges start from 2. Here are some more examples of these diagrams with a weighted quiver, where the edge weights gives the ghost shifts: (h) There is a degree function on these diagrams given by the local rules Here, − , − is the Cartan pairing associated to Γ, and (d 0 , ..., d e ) is the symmetrizer. The diagram in (3A.2) is of degree −1 with nonzero contributions given by −2 for the crossing with solid 0-strings, 1 twice for the solid 2-strings crossing the red 2-string, −2 for the crossing with solid 2-strings, and 1 for the crossing of a ghost 1 and a solid 2-string.
is a monomial, then f (u) times a diagram is the same diagram but with a k dots added at the top of the kth solid string, and all of its ghosts, for 1 ≤ k ≤ n. Similarly, if f (u) ∈ Z ≥0 [u 1 , ..., u n ], then f (u) times a diagram is the corresponding linear combination of diagrams.
Definition 3A.4. The weighted KLRW algebra W ρ n (X) is the graded unital associative R-algebra generated by such diagrams with multiplication given by stacking the diagrams and subject to the multilocal relations listed below. Multilocal relations need to be applied in local neighborhoods around the solid strings and, simultaneously, in the corresponding local neighborhoods around the ghost strings. See Example 3A.8 below for an explicit example.
(a) The dot sliding relations hold. That is, solid and ghost dots can pass through any crossing except: Note that this relation may involve ghost strings, depending on whether edges in the quiver start from i. Here, and below, we omit strings for clarity unless they make a nontrivial contribution to the diagram.
. One cannot decide locally around just the two solid i-strings whether (3A.5) can be applied. In the lefthand diagram, the relation can be applied, giving the linear combination of diagrams above. In contrast, in the right-hand diagram relation (3A.5) cannot be applied because the two solid i-strings cannot be pulled arbitrarily close together using isotopies as the solid k-string prevents this from happening. 3 Remark 3A.9. Assume that a vertex i ∈ I has multiple outgoing edges with positive weighting, so that there can be many ghost i-strings. For example: Note that these two ghosts strings are different strings that behave differently because the relations depend on the edges and on the residues. In the example above, the two ghost 1-strings play different roles. For example, one of them has nontrivial Reidemeister II relations with the 0-strings and the other has nontrivial Reidemeister II relations with the 2-strings.
Remark 3A.10. Note that [MT21] mostly works with W ρ β (X), where β determines the labels of the solid strings. This difference is not very important since W ρ n (X) = β∈Q + n W ρ β (X), where Q + n is the set of positive roots of height n, which corresponds to the set of possible labels on the n solid strings.
A diagram is unsteady if it contains a solid string that can be pulled arbitrarily far to the right when the the red strings belong to region bounded by X, otherwise it is steady. For example, we have Unsteady :  Note that the ghost string mimics its parent solid string, so the solid i-string in the left diagram does indeed pull freely to the right.
Finally, the cyclotomic weighted KLRW algebra R ρ n (X) is the finite dimensional quotient of W ρ n (X) by the two-sided ideal generated by all diagrams that factor through an unsteady diagram.
3B. Duality and partners. We use the usual diagrammatic antiinvolution ( − ) given by (the Rlinear extension of) reflecting diagrams in their horizontal axis. This antiinvolution is the one we use for the homogeneous (affine) sandwich cellular basis. An illustration of the diagrammatic antiinvolution is: There is a different kind of duality on diagrams, which exists because the relations (3A.5)-(3A.7) come in mirrored pairs. Explicitly, up to scalars, the set of relations is invariant under reflecting diagrams in their vertical axis and, in some circumstances, swapping solid strings with their ghosts. Most of the relations we will use have this type of duality, which we call partner relations. Note that the partner relations can have different scalars, however, this will not play a role for us because we only use partner relations when similar arguments can be applied to both relations.
For example, if i j, then is an example of partner relations. Note the change of sign when going from left to right.
These illustrate (dotted) idempotents, (dotted) straight line and permutation diagrams. 3 Notation 3C.2. Let 1 x,i be the idempotent diagram with bottom boundary given by (x, i), for x ∈ X and i ∈ I n . (That is, the positions and labels of the solid strings are given by x and i, respectively, when read from left to right.) As in Section 3A(i), given a polynomial p(y) ∈ R[y 1 , ..., y n ]] write p(y)1 x,i for the corresponding linear combination of (dotted) diagrams 1 x,i . Additionally, let S n = s 1 , ..., s n−1 be the symmetric group on {1, ..., n} with s i = (i, i + 1), which we think of as swapping the ith and (i + 1)th solid strings. For all w ∈ S n fix a reduced expression and let D(w) be the associated permutation diagram. As often happens in the KLR world, the diagram D(w) is only well-defined up to a choice of reduced expression and, as explained in [MT21, Definition 3B.1], some care needs to be taken. (These details are not important in this paper.) Example 3C.3. In pictures: Here we have not drawn red strings while the two solid strings have x-coordinates 0 and 0.5. 3 . Given a straight line diagram S and some 0 < ε 1, then there exists an idempotent diagram L(S), called the left justification of S, such that S factors through L(S), and L(S) has its strings as far to the left as possible while its coordinates are within the interval defined by X and strings are at least ε apart. (The ε > 0 is only needed to make L(S) well-defined, and we omit it below.) See [MT21, Section 6D] for a detailed account.
Example 3C.5. Here is an example of a left justification (and also an example of factorization of diagrams): In general, the left justification is obtained by considering a collar neighborhood of a horizontal cut of S.
To construct L(S), we use isotopies to inductively pull strings to the left inside this neighborhood. 3 In a dotted straight line diagram two strings are close if you can pull them arbitrarily close together in a neighborhood that does not contain any other strings using only (multilocal) isotopies. We use close and to the left and right in the obvious way.
Example 3C.6. Let us repeat [MT21, Example 6D.10]: The solid i-string is close to the solid j-string in the left but not in the right-hand diagram. 3 One of the other crucial points about weighted KLRW algebras is that they generalize KLR algebras, see [MT21, Section 3F]. The construction given therein uses a particular choice X of KLRW positioning such that for a special x ∈ X the KLR algebra is graded isomorphic to 1 x W ρ β (X)1 x , where 1 x = i∈I 1 x,i . We return to this point in Section 5I below. 3D. A basis and a faithful module. The following standard basis proposition works only for the infinite dimensional weighted KLRW algebras. One of the main features of our approach is that we can use the faithful representation to prove cellularity of the finite dimensional quotients as well.
Proposition 3D.1. The algebra W ρ n (X) is free as an R-module with homogeneous basis Proof. See [MT21, Proposition 3B.12] for details.
Borrowing the pictures from Section 2, the standard basis is of the form Remark 3D.2. The proof of Proposition 3D.1 in [MT21] uses a faithful action on the polynomial ring P n (X) = x∈X,i∈I n R[y 1 , ..., y n ]1 x,i .
We will not recall the action here as it is quite standard in the field, see [MT21, Section 3C] for details.

The strategy
Our strategy to construct homogeneous (affine) sandwich cellular bases for the weighted KLRW algebras is the same as in [MT21, Remark 6.1], which we now recall. We will define the relevant notions later. The ideas are summarized in Remark 4A.1 and Example 4A.2 below.
Remark 4A.1. A crucial ingredient is the idea of using a certain form of maximality, with respect to string placement.
(a) Fix a residue sequence i λ = (i 1 , ..., i n ) ∈ I n . We construct an idempotent diagram 1 λ by placing strings inductively as far to the right as possible. Here we use the fact that the relations in Definition 3A.4 only allow strings to be pulled to the right in certain situations, such as when they carry a dot. In this way, we think of previously placed strings as keeping the new string in check. One can think of this process as follows. We place the solid strings, and their ghosts, one at a time as follows. The positions of the red strings are determined by κ. Next, place the solid string of residue i 1 to the left of all of the red strings and pull it to the right using isotopies and the honest Reidemeister II relations until it is blocked by an (affine) red string. Now place the string of residue i 2 to the left of all of the strings and pull it to the right until it is blocked by an existing string. Repeat this process to place the remaining strings, starting at the left of the existing strings and pulling it to the right until it becomes stuck. The idempotent diagram 1 λ is then a horizontal cut in the middle of the resulting diagram. This ensures that 1 λ is maximal with respect to placing the strings to the right. In fact, this strategy is a greedy algorithm, as it is designed to be locally maximal but it produces a globally maximal diagram.
(b) By Definition 3A.4 again, when we put dots on the strings in 1 λ it might be possible to pull some strings further to the right, so that the dotted idempotent diagram is no longer maximal with respect to string placement, and even more problematic, might become unsteady. In the finite dimensional case we consider only those dotted idempotent diagrams y f y λ 1 λ that are steady. In the infinite dimensional case we even can add extra dots and get y a y f y λ 1 λ . This gives a collection of dotted idempotent diagrams, which form the middle of the homogeneous (affine) sandwich cellular basis, in the sense of Remark 2A.3.
(c) The (sandwich) cellular basis is then obtained by a standard construction for diagram algebras, which in our case means putting semistandard permutation diagrams above and below y a y f y λ 1 λ . The basis itself is maximal (in a certain sense), by construction, and it is not hard to prove that it is indeed a homogeneous (affine) sandwich cellular basis. For example, putting additional dots on the basis elements allows one pull strings and jump dots to the right, making the resulting diagram bigger. This gives an inductive way of proving results.
This strategy works perfectly in types A Z and A (1) e , see [MT21], and requires small adjustments in the BAD types.
Example 4A.2. We now give an example of our main construction. This example is meant for the reader to come back as they read through the text, so not all of the notation is defined at this point. This example is in level 1 and there is one 0-red string.
(a) Consider type D (2) 2+1 and the following sequence of Young diagrams, adding nodes in row reading order, with the nodes filled with their residues. The final Young diagram λ has this associated Young diagram sequence. We also associate to λ a sequence of idempotent diagrams following the Young diagram sequence of λ: Note that the solid 1-string has two ghosts since we are in type D (2) 2+1 . In each step, the new string is as far to the right as possible in the sense that we start at the very far left and then pull it to the right using isotopies and honest Reidemeister II relations whenever they apply. For example, the first solid 0-string gets stuck at the red 0-string because there is no honest Reidemeister II relation applies. The resulting diagram is of degree 0 and this diagram is the idempotent diagram 1 λ associated to λ.
(b) In the basis that we construct, we will allow two close solid 2-strings to cross in 1 λ . In order for (3A.6) not to annihilate the diagram we put a dot on the right-hand solid 2-string, so that Flanking with two crossings on the two close solid 2-strings, gives us four basis elements, so far, in total. Note that we recover the diagram without the dot from the diagram with crossings both above and below the dotted idempotent diagram.
(c) Note that the ghost of the left-hand solid 1-string in 1 λ is blocked by a solid 0-string (and also solid 2-strings). This gives a nontrivial sandwiched part for the finite dimensional case: we allow a dot on the left-hand solid 1-string in 1 λ , so we now have eight diagrams of "shape" λ in total. The diagrams without crossing are Write ψ 4 for the crossing of the solid 2-strings, which are the fourth and fifth strings read from the left. Then the basis set is {1 y λ , y 1 1 y λ , ψ 4 1 y λ , ψ 4 y 1 1 y λ , 1 y λ ψ 4 , y 1 1 y λ ψ 4 , ψ 4 1 y λ ψ 4 , ψ 4 y 1 1 y λ ψ 4 }. For example, the diagram for ψ 4 y 1 1 y λ ψ 4 is The sandwiched algebra is the R-algebra spanned by 1 y λ and y 1 1 y λ , and this algebra is isomorphic to R[X]/(X 2 ), with X in degree four, via 1 y λ → 1 and y 1 1 y λ → X. The graded dimension of the set of all cyclotomic weighted KLRW diagrams with (0, 1, 2, 2, 0, 1) as their residue sequence at bottom and top is thus q 2 (1 + q −2 ) 2 (1 + q 4 ), where we use q to keep track of the grading. 3 Notation 4A.4. Recall from Section 3A that we will draw affine red strings in diagrams, illustrated by: genuine red string : i , affine red string : Importantly, the affine red strings are not part of the diagrams and they are drawn only as a visual aid.
The affine red strings are drawn to the right of all of the genuine red strings and we think of them as satisfying the same relations as the red strings. Our strategy is to pull strings as far to the right as possible but it is possible to pull some strings arbitrarily far to the right. The affine red strings are necessary to catch the solid strings that can be pulled past all of the genuine red strings in the diagram (we add enough affine red strings so as to be able to block all solid strings). By definition, a diagram is unsteady if and only if it contains a solid string that is blocked by an affine red string. As a vector space, the finite dimensional quotients of weighted KLRW algebras are spanned by those diagrams that do not have any strings blocked by affine red strings.
Example 4A.5. To show why the affine red strings are necessary consider a diagram with one red 0-string and one solid 1-string. For simplicity we do not draw the ghost strings. Using the honest Reidemeister II relation, the solid 1-string pulls arbitrarily far to the right: In order to place the 1-string our strategy is to add an affine red 1-string to the right of the red string: The solid 1-strings gets stuck at the affine red 1-string because it does not satisfy an honest Reidemeister II relation. (We add enough affine red strings to ensure that all strings are blocked.) 3 The following lemmas are the crucial diagrammatic relations that we need to pull strings and jump dots to the right. Here we are pulling the leftmost string to the right or jumping the leftmost dot to the right. We highlight the strings where the action happens by coloring them.
Lemma 4A.6. For any quiver and any choice of Q-polynomials we have the following, plus partner relations: For i → j edges and the choice of Q-polynomials in (3A.3) we have the following, plus partner relations: The right relation and its partner also hold for i ⇐ j.
For i ⇒ j edges and the choice of Q-polynomials in (3A.3) we have the following, plus partner relations: The relations (4A.8) and (4A.9) motivate the dot placement in Definition 5F.2 below: we construct our basis diagrams so that strings cannot be pulled, and dots cannot be jumped, further to the right, so we need to ensure that these relations cannot be applied. Proof. We first use (4A.7) to pull the left solid i-string into the middle. Note that this string also carries a dot after applying (4A.7). If i ⇐ j are not connected, then either an honest Reidemeister II relation applies, or either (4A.8) or (4A.9) applies. In all cases, we can pull the leftmost solid i-string to the right.
The next example should be compared with Remark 5D.10 below.
Example 4A.11. The following close configurations and their partners are stuck for i ⇒ j and i ⇐ j, respectively, so that Lemma 4A.6 and Lemma 4A.10 do not apply: These diagrams are therefore good in the sense that we can not pull strings or jump dots further to the right. These configurations will appear whenever i corresponds to a leaf of Γ. 3

The bases
We now explain the main constructions of this paper. In Remark 6A.10 we summarize the parts of the arguments that are general and those that depend on the underlying quiver.
5A. The basis in a nutshell. The main aim of the paper is the construction of the elements in (5H.7) which form a homogeneous (affine) sandwich cellular basis for the weighted KLRW algebras.
The construction in Remark 2A.3 is quite general and works for many algebras: we sandwich a class of diagrams between another class of diagrams. In more detail, the relevant picture for (5H.7) is: S a permutation diagram, y a an "affine" dot placement, See also (4A.3) which gives an explicit factorization in this form. The affine dots do not appear in the basis for the finite dimensional cyclotomic quotients and, in this case, only steady diagrams appear. The construction of the sandwich cellular basis for the BAD types is almost exactly the same as the construction for the AC types in [MT21] except that the finite dot placement is trivial for the AC types. Below we explain the ingredients needed to construct these bases: the partition combinatorics, which give the indexing poset, the dotted idempotents, which gives 1 y λ , the finite and affine dot placements, giving y f and y a , and permutation diagrams.
5B. Some notation. We fix some conventions.
Notation 5B.1. Unless we are in specific example, for the duration of the paper we fix arbitrary n, ∈ Z ≥0 , e ∈ Z ≥2 , κ ∈ Z , with κ 1 < ... < κ , and ρ ∈ I . We let = + n(e + 1) be the affine level, which counts the maximum number of genuine and affine red strings in the diagram. More generally, we will use the underline notation to indicate definitions that only play a role in the affine case.
Notation 5B.2. Our constructions given in this section work for the quivers below.
(a) We use Kac's notation [Kac90] for Dynkin quivers (but we reflected the quivers left-to-right). The main quivers of study in this paper are: 2·e : e+1 : where e ∈ Z ≥2 . Up to minor changes in the notation, we can fix any orientation of the simply laced edges. Here we orient the simply laced edges i → (i + 1) as this fits better with classical partition combinatorics. We will omit B Z ≥0 from the discussion because this type can be viewed as D e+1 for e → ∞, but doing so needs some (harmless) adjustments of the exposition since e.g. the affine level becomes arbitrarily large.
4n be a small shift. We let the ghost shifts for edges in BAD types be 1 with the exception of the edge 0 ⇐ 1 in type D (2) e+1 where the ghost shift is 1 − ε 2 .
Definition 5B.4. A sink is a vertex of a Dynkin quiver Γ that is a (graph-theoretical) sink. That is, the vertex is not the tail of any edge. A multisink is a sink such that all edges are multi-laced.
Note that, if i is a sink, then the solid i-strings do not have ghosts.
Example 5B.5. The vertex e is a multisink for BAD types and additionally, the vertex 0 is a multisink for type D (2) e+1 . In contrast, in type C (1) e no vertex is a multisink, but some vertices are sinks (depending on the choice of orientation). 3 In type D e+1 the solid 1-string has two ghosts that are very close to one another by our choice of ghost shifts: the ghost string for the edge 0 ⇐ 1 has ghost shift 1 − ε 2 and the ghost string for the edge 1 → 2 has ghost shift 1. As the 1-ghost strings are very close, we display them as doubled lines: We stress that these are two different ghost 1-strings; cf. Remark 3A.9. As in Example 4A.2, when these strings have dots, we put a single ghost dot on the doubled ghost string rather than a dot on each ghost string.
We will draw generic diagrams that are supposed to make sense in any type, but the reader may need to remove or double some ghost strings to obtain the actual diagram for a particular type.
Definition 5B.6. Define the affine charge κ = (κ 1 , ..., κ ) ∈ Z and the affine red labels ρ = (ρ 1 , ..., ρ ) ∈ I by We call κ m and ρ m the position and residue of a red string for m ≤ , and the position and residue of an affine red string for m > .
Note that the coordinates of the (affine) red strings κ are always integers.
Example 5B.7. Take n = 3, e = 2 and = 1, so = 1 + 3 · (2 + 1) = 10. If κ = (2) and ρ = (1), then κ = (2, 8, 14, 20, 26, 32, 38, 44, 50, 56) and ρ = (1, 0, 0, 0, 1, 1, 1, 2, 2, 2). All entries, of κ and of ρ, except the first are affine. Below we will use this data to describe a diagram with red strings and affine red strings for the reason explained in Example 4A.5. For example, the data above will give In this example the positions of the strings are scaled to make it fit onto the page, the real positions are given by κ = (2, 8, 14, 20, 26, 32, 38, 44, 50, 56). Note that n = 3 and if we add n solid strings to this diagram from the left, and their ghosts, then we will see that each of these strings gets stuck somewhere. 3 5C. Partition combinatorics. Before coming to our main definitions, we introduce the tableau combinatorics that arise in BAD types. For the standard tableau combinatorics that appears in the context of KLR algebras we refer the reader to [HM10, Section 3.3].
Remark 5C.1. The partition combinatorics that we use is motivated by e.g. [AP14] and [AP16] who use the partitions of the crystal graphs for the affine fundamental weight. The associated weighted KLRW diagram combinatorics is a slight modification of the combinatorics of type C (1) e as in [MT21, Section 7]. The reader should be careful because, as we will see, the partition combinatorics depends on ρ. In particular, the combinatorics from [AP14] and [AP16] only applies for cyclotomic KLR algebras for the fundamental weights associated to multisink vertices. This is related to the fact that the crystal graphs for fundamental weights indexed by multisink vertices have different indexing sets to the crystal graphs for the other fundamental weights.
Identify the vertices of I with Z/(e+1)Z. We use (usual) partitions of n, following the same conventions as in [MT21, Section 6A]. We also use shifted partitions of n, that is, partitions λ with strictly decreasing parts λ = (λ 1 > ... > λ k ). (Shifted partitions are called strict partitions by some authors.) Let |λ| be the size of a partition or shifted partition.
Definition 5C.2. The set of ρ-partitions is We define P ρ ,n similarly using the indicated data.
We identify a ρ-partition λ with its shifted ρ-Young diagram, which is the set of nodes {(m, r, c)} where 1 ≤ m ≤ , λ (m) r > 0, and Remark 5C.3. In this paper a node (m, r, c) is in component m, row r and column c. This is different to the convention of e.g. [DJM98], where nodes are indexed in the order (r, c, m). Our convention is better for this paper because in the representation theory the nodes are naturally ordered first by component and then by their row and column index, which is the lexicographic order on the nodes using our convention.
Notation 5C.4. We use the (shifted) English convention to illustrate the associated (shifted) ρ-Young diagrams. That is, we illustrate these partitions by drawing them as boxes in the plane, with rows ordered from top to bottom, and columns left to right, and where the rth row is shifted r positions to the right for shifted ρ-Young diagrams. (So the cth column of the rth row is in position c + r.) For example, a usual Young diagram and a shifted Young diagram are (12, 6, 4, 2, 1) , (12, 6, 4, 2, 1) .
This is a different convention to that used in [MT21, Sections 6 and 7] where the Russian convention is used. The Russian convention is useful in types A Z and A (1) e , but seems to be irrelevant in other types.
That is, if ρ i corresponds to a multisink vertex (i.e. the vertices e in all BAD types and, additionally, the vertex 0 in type D (2) e+1 ), then we consider shifted partitions in the ith entry of λ, and usual partitions otherwise. We make similar definitions as above for ρ-partitions. The nodes for m > are called affine nodes. Identify P ρ ,n with the subset of P ρ ,n that consists of the ρ that do not contain any affine nodes.
In illustrations we will often fill nodes with their residues. As the next example shows, the formal definition is more complicated than the actual concept of a residue.
Example 5C.6. For λ = (10, 9, 8, 7, 6, 5, 4) and e = 3, starting with 3, i.e. ρ = (3), we get: Note that colored/shaded residues, for multisinks, are doubled. In words, the residues increase along rows and columns until they hit e, this value is doubled, and then the residues bounce back until they hit 0, this value is doubled for D 2·3 has partition, and type D 3+1 has shifted partition, combinatorics. We emphasize that, in general, there are more partitions than shifted partitions, so there are more of these diagrams when ρ i is not a multisink. 3 The coloring/shading from Example 5C.6 distinguishes between usual and shifted partition combinatorics: we use shifted partition combinatorics if and only if the first node is colored/shaded. Example 5C.7. We continue with Example 5B.7 and fix type A We get P ρ ,n = {λ 1 , λ 2 , λ 3 }, if ρ = (0), P ρ ,n = {µ 1 , µ 2 , µ 3 }, if ρ = (1), and P ρ ,n = {ν 1 , ν 2 }, for ρ = (2). The set P ρ,all ,n is much bigger, and we will not list it here. Note, however, that the affine components of P ρ,all ,n have either usual or shifted partition combinatorics depending in the residue. More precisely, since ρ = (ρ, 0, 0, 0, 1, 1, 1, 2, 2, 2) we get that the first six affine components of P ρ,all ,n use usual partitions and the last three components use shifted partition combinatorics. 3 Remark 5C.8. In examples, and in the proofs below, we will mostly focus on the shifted partition combinatorics. The arguments for the usual partition combinatorics requires only slight adjustments and is essentially identical to that used for type C 5D. The idempotents. We now introduce some crucial definitions for defining the idempotent diagrams. For any r + (e + 1)Z ∈ I, with r ∈ {0, ..., e}, we sometimes abuse notation and identify r + (e + 1)Z with the real number in r ∈ R. The meaning of the following definition is clarified in Remark 5D.5 below. Notation 5D.3. From now on we always order nodes, and strings associated to nodes, by the row reading order.
Definition 5D.4. Let λ ∈ P ρ,all ,n . The coordinate of the node (m, r, c) ∈ λ is The coordinates x κ (λ) of λ is the ordered tuple of the coordinates of its nodes listed in row reading order.
The real number x κ (m, r, c) will be the x-coordinate of the corresponding string in the idempotent diagram 1 λ . Moreover, Definition 5D.4 looks more complicated than it actually is. The coordinate function simply places strings in order, following the strategy outlined in Remark 4A.1.
Remark 5D.5. The contributions of the different ingredients of x κ (m, r, c) are the following: (c) c m r(k) ensures that strings with the same residue are placed within a certain region. The first two cases in the definition of c m takes care of the 0 multisinks, which have special combinatorics, and the shift by ρ m ensures that coordinates of residue ρ m are the rightmost coordinates.
(d) −kε ensures that nodes move a little bit to the left as we read along rows.
Note that in type D e+1 the solid 0-strings and the solid 2-strings have roughly the same coordinates. This is important because the solid 0-strings do not have ghosts, but the solid 1-strings have two ghosts.
Example 5D.6. We continue with Example 5C.7. Fix from now on κ = (0). We have the following coordinates of ν 1 and ν 2 : We have illustrated the coordinates for the nodes in the shifted Young diagrams, and also what happens in the limit ε → 0. Note hat we have omitted the additional shift of m = 1 10 . 3 Example 5D.7. Let us continue with Example 4A.2, where n = 6 and e = 2. As before, λ = (4, 2). We label the nodes of λ in row reading order and reproduce the associated idempotent diagram: Here, x κ (λ) lists the positions in row reading order while, on the right-hand side, we list the coordinates for the solid strings with increasing x-coordinates from left to right. Note that the illustrated idempotent diagram is scaled to avoid clutter: the distance between the two solid 1-string is ≈ 0.01 while the distance from the solid 1-strings to the red 0-string is ≈ 1. .
In this sense one can think of x κ (λ) as a reading function on Young diagrams that associates a real number to each node in a controlled way, which corresponds to the strategy outlined in Remark 4A.1. 3 We write max R (fin), the maximal finite part, for the maximum of x κ on P ρ ,n , and call coordinates with x κ (m, r, c) > max R (fin) affine.
Lemma 5D.8. The nodes with affine coordinates are precisely the affine nodes.
Proof. Easy and omitted.
We now define the idempotent diagrams 1 λ associated to λ ∈ P ρ,all ,n . Dotted idempotents will appear in Section 5E. Definition 5D.9. For λ ∈ P ρ,all ,n let 1 λ be the idempotent diagram given by: (a) placing red strings with labels given by ρ at coordinates given by κ, and, (b) n solid strings with labels res ρ (m, r, c) at coordinates x κ (m, r, c), for (m, r, c) ∈ λ.
The reader is now invited to go back to Example 4A.2 and compare the idempotent diagrams appearing there with Definition 5D.9. See Example 5E.6 below for more examples.
As mentioned already, in diagrams we often draw affine red strings at positions κ m , for < m ≤ , even though these strings are not strictly part of the diagram.
Remark 5D.10. In AC types the crucial illustrations that we used to show that our bases span the weighted KLRW algebras are [MT21, (6A.10), (6A.11), (7A.8), (7A.9) and (7A.10)]. These diagrams identify local configurations of nodes in Young diagrams with local configurations of strings in diagrams. The analogs of these results the current setting, together with the Young diagram and the residues of the nodes, are as follows.
Assuming that the middle node is not 0 or e, and we do not have i − 2 = 0, i = 0 or i + 2 = 0 in type D (2) e+1 , we have: The special cases in Definition 5D.1 for type D That the two cases in (5D.11) and (5D.12) look different is an artifact of our conventions for ghost strings. However, this can not be avoided (meaning that one always gets special behavior) in type D (2) e+1 as there is no way to orient the quiver from left to right, or right to left.
When the middle residue is 0 or e we have: These should be compared to Example 4A.11. Note that in all cases we cannot pull the strings for the middle node further to the right using the Reidemeister II relations, which is the point of these diagrams. Whenever we have a multisink Remark 4A.1.(b) fails because flanking two solid i-strings with two crossings annihilates a diagram by (3A.6). This is not desirable because we want these diagrams to form the middle of a sandwich cellular basis. In Definition 5E.1 below, we will place a dot on such strands to avoid this problem. The picture to keep in mind is: Finally, assuming that |i − j| ≤ 1 in these pictures: the solid/ghost k-string is close to a ghost/solid (k ± 1)-string otherwise, (5D.14) where the j-string is only illustrated in the top diagram, and in the last case the i and k-strings do not need to be close (neither the solids nor the ghosts). Note that in the shifted Young diagram k = ρ k .
In other words, (5E.3) places a dot whenever the kth and the (k + 1)th string are close and have the same residue, and takes care of new rows as in (5D.14), e.g.: In the case of usual partitions the dot placement is the same as in type C (1) e from [MT21, Section 7], see also (5E.9) below. Note that 1 y λ has zero or one dot on each strand. For example, the top diagram in (5D.14) gets two dots, one on the middle and one on the rightmost string.
Remark 5E.5. The dot placement in Definition 5E.1 is local to the components of the (shifted) partitions. This is appears to be different to what is done in the KLR world where dots corresponding to later components are added to idempotents; see, for example, [HM10,Definition 4.9]. In fact, the red strings implicitly add dots to the idempotent diagrams via (3A.6), so these two pictures are compatible but different in flavor. Note since weighted KLRW algebras generalize KLR algebras the above dot placement gives a new way to think about cellular bases constructions in the KLR world.
2+1 . 3 Lemma 5E.8. We have 1 y λ = 1 y µ if and only if λ = µ. Proof. One direction is immediate, so let us assume that λ = µ. If res ρ (λ) = res ρ (µ), then 1 y λ = 1 y µ follows using the faithful polynomial module from Remark 3D.2. Moreover, a different dot placement on the same idempotent diagram 1 λ can also be distinguished by Remark 3D.2, so it remains to show that 1 y λ and 1 y µ have different dot placements if res ρ (λ) = res ρ (µ). To see this assume that the kth node, in row reading order, is the first node that is different for λ and µ. By the minimality of k, we can assume that the kth node of µ is in a new row when compared to the kth node of λ. There are three cases to check now, depending on the residue j of the kth string and the residue i of the (k − 1)th string. When i = j is a multisink the local diagrams for λ and µ are: As required, these diagrams have different dot placements. The case i j for shifted partitions is illustrated in (5E.4), while is the case for usual partitions. The case i j is similar to (5E.4) and (5E.9). Hence, in all cases the dot placements in 1 y λ and 1 y µ are different, so the lemma is proved. 5F. The sandwiched part. The following configuration of close strings is needed in Definition 5F.2: Definition 5F.2. Define the set of affine dots as A y (λ) = a = (a 1 , ..., a n ) ∈ Z n ≥0 a k = 0 whenever x κ (λ) k ≤ max R (fin) . For 1 ≤ k ≤ n, define c k (λ) = 1 if the kth string is close as in (5F.1), or its partner relation, and this string does not already have a dot in 1 y µ for some µ ∈ P ρ,all ,n with 1 λ = 1 µ , and otherwise set c k (λ) = 0. Define the set of finite dots to be The set of sandwiched dots is S y (λ) = A y (λ) ∪ F y (λ). Note that a k = 0 only happens for affine coordinates x κ (λ) k > max R (fin).
For the finite dots, in type A 3+1 the finite dots are same except that F y (λ 1 ) = {(0, 0, 0), (0, 0, 1)}. 3 5G. Permutation diagrams. We need the same tableaux as in AC types. That is, let x A κ ( − ) be the type A positioning function, see [MT21, Definition 6A.4], which, in the notation of this paper is where k = o λ (m, r, c) is the number given by the row reading order.
In other words, a semistandard λ-tableau T of type µ is a filling of the nodes of λ with the type A coordinates of µ, together with an anchor condition, such that the fillings decrease along rows and columns with an offset of 1. The associated permutation has top points defined by x κ (λ), bottom points by x κ (µ) and permutes them according to the entries of T . .
The tableau S is the canonical λ-tableau of type λ, where all nodes are filled with their coordinates. Its associated permutation diagram is the identity. The permutation diagram D T is build from the permutation illustrated above, which connects x A κ (µ) to x A κ (λ), using x κ (µ) at the bottom and x κ (λ) at the top. In particular, going from this multitableau to itself, we can only permute the two solid 2-strings without violating the condition of being standard. This gives precisely the four possible permutation diagrams from Example 4A.2. 3 5H. Basis diagrams. Before we can define our cellular bases we first need to fix a set X of endpoints for our diagrams. An addable node of λ is a node (m, r, c) / ∈ λ such that λ ∪ {(m, r, c)} is the diagram of a ρ-partition. ,n defined by the condition that λ ∈ P ρ ,n only if λ = µ ∪ α, where µ ∈ P ρ ,n−1 and α is an addable i-node of µ such that: whenever β is an addable i-node of µ with x κ (β) < x κ (α), then x κ (β) ≤ max R (fin).
Finally, let X = λ x κ (λ) be the set of all coordinates, for λ ∈ P ρ ,n .
Remark 5H.2. In general, only a handful of the elements of P ρ,all ,n belong to P ρ ,n as the rule in Definition 5H.1 only allows the addition of affine nodes that are not too far to the right.
We are ready for our main definition: for a = (a 1 , ..., a n ) ∈ A y (λ), f = (f 1 , ..., f n ) ∈ F y (λ), S ∈ SStd κ (λ, ν), T ∈ SStd κ (λ, µ). . We define . Homogeneous (affine) sandwich cellular bases. The sandwich cellular partial order, which we define below, is the same as in [MT21,Definition 7C.1]. In essence, we measure how far solid strings are to the right, with diagrams becoming bigger in the partial order as we move solid strings to the right.
We are now ready to define (involutive) bases for W ρ n (X) and R ρ n (X). Recall that we are working with BAD types. We also use the Q-polynomials from (3A.3).
The cell datum C = (P ρ ,n , T, S, B, D, deg, ( − ) * ) that we use is: SStd κ is the bottom/top set, • the bases of the sandwiched algebras are B λ = S a,f λ a ∈ A y (λ), f ∈ F y (λ) for λ ∈ P ρ ,n , and the sandwiched algebras S λ are the subalgebras of the weighted KLRW algebra generated by these bases, • we take D = D W ρ n (X) from (5H.7), viewed as a map, as our basis, • the degree is S → deg D S , • the antiinvolution is the diagrammatic antiinvolution ( − ) . The proof of the following theorem is postponed until Section 6 below.
Theorem 5I.2. The datum C is a graded affine sandwich cell datum for W ρ n (X). In particular, (5H.7) is a homogeneous affine sandwich cellular basis for W ρ n (X).
, then Theorem 5I.2 and the definitions directly imply: is a graded sandwich cell datum for R ρ n (X). In particular, (5H.8) is a homogeneous sandwich cellular basis for R ρ n (X). Define a semistandard tableaux S ∈ SStd κ (λ) to be standard if it is of type ω = (n|0|...|0). Let Std(λ) be the set of standard λ-tableaux. Let W ρ n = 1 ω W ρ n (X)1 ω and R ρ β = 1 ω R ρ n (X)1 ω be the associated KLR and cyclotomic KLR algebra, respectively. This terminology is justified at the end of Section 3C. We use E instead of D to refer to the basis elements of the idempotent truncations. We will not highlight the cell datum below.
As before we obtain: ,n , S, T ∈ Std(λ), f ∈ F y (λ) is a homogeneous sandwich cellular basis of R ρ n . Let us now discuss the upshot of Theorem 5I.2 and Corollary 5I.3 for simple modules. To this end, let a(λ) and f (λ) be the number of possible nonzero positions of A y (λ) and F y (λ), respectively.
). Proof. The first claim, regarding the X i , follows by using Proposition 3D.1. For the second claim, regarding the Y i , we pull strings and jump dots to the right and use Corollary 5I.3. That is, if one of the strings, which corresponds to one of the possible nonzero positions of F y (λ), carries two dots we can use (4A.9) and the claim follows.
By the above, it is also easy to write down the graded dimensions of these algebras. Example 5I.9. It is illustrative to compare the combinatorics for types C (1) 2·2 and D (1) e .) We will ignore the affine part in this example. Fix = 1, κ = (0) and ρ = (0) and take β = (0, 1, 2) ∈ I 3 . We are first looking for all 1-partitions of 3 that have β as their residue sequence, that is, λ ∈ P ρ ,4 whose nodes have residues β in row reading order. We get the following 1-partitions: The dotted idempotents for types A (2) 2·2 and D (2) 2+1 are displayed in Example 5E.7, and the ones for type C (1) 2 have the same form as the ones for type A (2) 2·2 . The sets of finite dots for types A (2) 2·2 and D (2) 2+1 are listed in Example 5F.3, while the set of finite dots is always trivial in type C (1) 2 . Thus, we get by using Theorem 5I.2 that Here we have listed the graded dimension (using the usual q-notation indicating the degree) of the idempotent truncation of R ρ β (X) determined by β. We also listed the relevant numbers for β = (2, 1, 0) where ρ = (2). These numbers match [HS21, Theorem 1.1], which is expected as this case is the cyclotomic KLR algebra of the respective types. The reader is also invited to compare the graded dimension formula from Example 4A.2 to [HS21, Theorem 1.1]; again we get the same result as expected. 3 Proposition 5I.10. Suppose that R is a field, and let (P ρ ,n ) =0 or (P ρ ,n ) =0 be the sets of apexes. (a) For a fixed apex λ ∈ (P ρ ,n ) =0 there exist a 1:1-correspondence between simple W ρ n (X)-modules with apex λ and R a(λ) . Moreover, up to isomorphism, there exists exactly one graded simple W ρ n (X)module of that apex.
(b) For a fixed apex λ ∈ (P ρ ,n ) =0 there exists exactly one simple, and one graded simple, R ρ n (X)-module of that apex up to isomorphism.
Proof. This is a combination of Theorem 2A.4 and the results from this section. For example, the explicit parametrization of the simple modules for fixed apexes follows from Lemma 5I.6.
Explicitly identifying the sets (P ρ ,n ) =0 or (P ρ ,n ) =0 of apexes is nontrivial, and we do not consider this in this paper.

Proof of cellularity
We are now ready to prove Theorem 5I.2, which shows that the weighted KLRW algebras are sandwich cellular algebras.
Remark 6A.1. As before, the combinatorics below is separated into partition and shifted partition combinatorics. The former is very similar to type C (1) e , which was covered in [MT21, Section 7], so we focus only on the shifted partition case.
As in [MT21, Section 7E] the most important notion that we need is that of Young equivalence. To define it we need some preliminary definitions.
Definition 6A.2. For i, j ∈ I, a close (i, i, i)-triple, respectively a close (i, j, k)-triple or a close (i, j, j, i)-quadruple, is a collection of close strings as in the following local configurations: We also need the following, which should be compared with Remark 5D.10. Here we consider the two ghost 1-strings in type D (a) i j, there are no dots on the i or j-strings, and the ghost i-string is close and to the left of the solid j-string; (b) i j, there are no dots on the i or j-strings, and the solid i-string is close and to the left of the ghost j-string; (c) i = j is a multisink, the i-string carries a dot, and the solid i-string is close and to the right of the solid j-string; A row equivalence class is a pseudo row equivalence class in which there are no close (i, i, i)-triples, the only close (i, j, k)-triples are of the form (i, i + 1, i + 2) or (i, i − 1, i − 2), or (1, 0, 1) in type A (2) 2·e , and if (i, j, j, i) is a close quadruple, then j is a multisink and either i j or i j. These should be compared with (5D.11) and (5D.13). Note that (5D.12) is also included in the description since pseudo row equivalence classes only consider two solid strings at a time. By definition, there is a unique first and last string in each row equivalence class because the strings in a row equivalence class are ordered by closeness, starting with the string that is not close and to the right of any other in the same class.
Definition 6A.5. Assume that we in the case of shifted partitions. A Young equivalence class Y is a disjoint union of row equivalence classes R 1 ∪ ... ∪ R z such that: (a) The first string in R 1 has no dot and is close to an (affine) red string of the same residue; (c) The first string in R a+1 is an i-string that is close to a dotted solid i-string of the same residue in R a , or there is a j-string in R a that satisfies one of closeness conditions in (a) and (b) of Definition 6A.4, with respect to this string. Proof. By construction, the solid strings in 1 y λ are a disjoint union of Young equivalence classes cf. Remark 5D.10.
To prove the converse, given a dotted straight line diagram S, we construct an -partition λ by inductively associating the solid strings in each Young equivalence class Y to nodes in a component λ (m) of λ. We explain the situation of shifted partitions, which is when ρ m is a multisink. The case of partitions can be proven similarly, following [MT21, Lemma 7E.8].
By Definition 6A.5.(a), the first string of Y is left adjacent to an (affine) red string of the same residue. If this is the mth red string, then identify the solid string with the node (m, 1, 1). By induction we now assume that the kth solid i-string in Y corresponds to the node (m, r, c) ∈ λ and consider the (k + 1)st solid j-string. There are two cases to consider.
Case 1. First, if i is not the last string in its row equivalence class, then (5D.11), (5D.12) and (5D.13) correspond to (a)-(c) of Definition 6A.4 and the condition on close (i, j, k)-triples and close (j, i, i, j)-quadruples, with the correct dot placement. Moreover, no other configurations can appear, i.e. there are no close (i, i, i)triples or any other triples or quadruples due to (a)-(c) of Definition 6A.4. Hence, the (k + 1)st solid j-string corresponds to the node (m, r, c + 1).
Case 2. If on the other hand i is the last string in its row equivalence class, then we observe that (5D.14) corresponds to Definition 6A.5.(c), and the (k + 1)st solid j-string corresponds to the node (m, r + 1, c).
Finally, note that the condition in Definition 6A.5.(b) ensures that the resulting diagram is a shifted -partition.
Proposition 6A.7. Suppose that D ∈ W ρ n (X) and that D factors through the dotted idempotent diagram S. Then there exists λ ∈ P ρ ,n such that D factors through 1 y λ and λ L(S).
Proof. Without loss of generality we can assume that D = S. If D = 1 y λ , then there is nothing to prove by Lemma 6A.6. So assume that Lemma 6A.6 is not satisfied, so that that D is not a disjoint union of Young equivalence classes.
We can assume that all strings are within [min X, max X + 1] × [0, 1], the region defined by X. Let s be the rightmost solid string in D that is not in any Young equivalence class. We want to argue that we can pull s to the right, jump dots on s further to the right, or we can attach s to a Young equivalence class, which implies the claim by induction. There are a few cases which we need to discuss. We only consider shifted partition combinatorics since the arguments for usual partition combinatorics are mutatis mutandis as in [MT21,Proposition 7E.9].
Case 1a. s is the rightmost string in the sense that we can pull it arbitrarily far to the right, and s does not have a dot. In this case we can park it next to an affine red string of the same residue, and it is now part of a Young equivalence class by Definition 6A.5.(a).
Case 1b. As in Case 1a, but now s carries a dot. After pulling the dot to the top of the diagram we are back in Case 1a.
We now assume that we are not in Cases 1a and 1b. Then, up to isotopy, s or its ghost is close and to the right of a solid, ghost or red string t. We focus on the situation when s is close to t, where we again have several cases. The cases where the ghost of s is close to t follow mutatis mutandis and are omitted. We also assume that s does not carry a dot. If it does, then there is an additional extra argument one needs, as is explained in [MT21, Proof of Proposition 7E.9, Case 5] (this argument works mutatis mutandis in the BAD types), but in the end the relation used below allow us to continue with the induction.
Case 2a. Assume that s is not in the Young equivalence class of t because s does not satisfy the close (i, j, k)-triple condition because s is the leftmost string in (6A.3). In this case the right-hand relation in (4A.8) applies, so we can pull s further to the right. (This works unless we in a close (1, 0, 1)-triple situation in type A (2) 2·e , in which case s and t are in the same Young equivalence class by Definition 6A.4.) Case 2b. Similarly, assume that s is not in the Young equivalence class of t because s does not satisfy the close (i, j, j, i)-quadruple condition because s is the leftmost string in (6A.3). Then we can use Lemma 4A.10 to pull s further to the right.
Case 2c. We now assume that s is not in the Young equivalence class of t because the condition |R 1 | > |R 2 | > ... > |R z | is not satisfied. For i, j ∈ I and i j or i j, the crucial configurations are There are a few cases, but for all these we can use (4A.7) or (4A.8) to pull s to the right. Assume now that we are not in any of the cases above. Case 3a. If t is an (affine) red string, then an honest Reidemeister II relation pulls s further to the right. We can apply such a relation since the case where s has the same residue as t is, which case s is the first string in a row equivalence class.
Case 3b. If t is a solid string, then an honest Reidemeister II relation applies unless s has the same residue as t. In this latter case (4A.7) applies.
Case 3c. Finally, if t is a ghost string, then we can use an honest Reidemeister II relation to pull s to the right. An honest Reidemeister II relation applies because the assumption that s and t are not in the same Young equivalence class implies that s and t do not satisfy the conditions of (a) and (b) of Definition 6A.4, or Definition 6A.5.(c).
Hence, the result follows by induction.
The rest of the proof of Theorem 5I.2 is essentially the same as in [MT21, Section 7E]. That is, applying dots or crossings to 1 y λ gives a linear combination of bigger elements. To this end, recall the definition of the finite dots and the integers c m (λ) from Definition 5F.2.
By ignoring the components, consider λ as a composition, and let S λ be the associated Young subgroup of S n . Lemma 6A.9. Suppose that λ ∈ P ρ ,n and w ∈ S λ . Then D λ (w)1 λ , 1 λ D λ (w) ∈ W λ n .
Proof of Theorem 5I.2. The arguments given in [MT21,Sections 6D and 7E], which are the analogous statements for the AC types, apply in BAD types as well. In fact, these arguments are general and use only Proposition 3D.1 and Remark 3D.2, as well as the analogs of the results proven above.
Remark 6A.10. Following the strategy in Remark 4A.1, the construction of the homogeneous (affine) sandwich cellular basis and proof of Theorem 5I.2 splits into several parts: (a) Because the bottom and top of the cellular basis elements are be given by permutation diagrams, the first step is to find suitable tableau combinatorics for the quiver under study. For a general quiver this is potentially hopeless, and one might want to use some other combinatorial data instead of tableaux, but for a lot of quivers an answer is already in the literature.
(b) The construction of the middle in Remark 2A.3 is then crucial. This part is noncanonical, although mostly dictated by Remark 4A.1. We hope to explain a more general approach in future work. Note that additional dots might be necessary to prevent basis elements being annihilated by (3A.6) and to ensure that we have the analog of Lemma 5E.8.
(c) From here onwards the arguments are general and do not depend on the quiver anymore: Proposition 6A.7 follows by analyzing the combinatorics of the string placement of 1 λ , and this proposition in turn directly implies Lemma 6A.8 and Lemma 6A.9. Once these two lemmas have been established the proof of cellularity Theorem 5I.2 is formal. Linear independence follows using the faithful polynomial module in Remark 3D.2, spanning using Lemma 6A.8 and Lemma 6A.9 and the standard basis in Proposition 3D.1. The latter arguments are independent of the underlying quiver.

Table of notation and central concepts
In general we use an overline for notation that only plays a role in the infinite dimensional setting.

Name Symbol Description
Solid, ghost, red and affine strings Strings in diagrams, see (3A.1) =level, κ=charge n, , e, κ, ρ, X The number of solid strings, the number of red strings, the number of vertices in the quiver, the positions of the red strings, the labels of the red strings, the positions and labels of the solid strings; all of these are fixed from the start, see Section 3A Affine notation , κ, ρ We set = + n(e + 1). These ensure that we have enough affine red string to catch every solid string, see Section 5B Weighted KLRW algebra W ρ n (X) A diagram algebra with n solid strings with top and bottom x-coordinates in X, see Section 3A The cyclotomic version R ρ n (X) A quotient of W ρ n (X), cf. (3A.11) Idempotent diagram for λ 1 λ The idempotent diagram created by inductively placing strings while reading along the rows of the ρ-partition λ, see Section 5D The dotted version of 1 λ 1 y λ We place dots y λ on 1 λ , see Section 5E Affine and finite part y a and y f These determine the sandwiched part of the main basis; the affine part only plays a role for W ρ n (X), while the finite part appears for both W ρ n (X) and R ρ n (X), see Section 5F Permutation diagram for S D S A permutation diagram associated to the ρtableaux S, see Section 5G Sandwiched algebras S λ The sandwiched algebras are tensor products of R[X] and R[X]/(X 2 ), see Section 5I Cellular basis elements D a,f ST , D f

ST
The homogeneous cellular basis elements, see Section 5I, for W ρ n (X) and R ρ n (X) Cellular basis sets D W ρ n (X) , D R ρ n (X) The homogeneous cellular bases sets, see Section 5I, for W ρ n (X) and R ρ n (X)

Name Symbol Description
Cellular bases for the KLR(W) algebras W ρ n , R ρ n , E W ρ n (X) , E R ρ n (X) The KLR(W) algebras W ρ n , R ρ n arise via idempotent truncation and E W ρ n (X) , E R ρ n (X) are the corresponding homogeneous cellular bases Partitions P ρ ,n , P ρ ,n Indexing sets for the middle of the cellular bases of W ρ n (X) and R ρ n (X), see Section 5C Nodes (m, r, c) Nodes in (shifted) partitions: m is the component index, r the row index and c the column index, see Remark 5C.3 Simple modules (P ρ ,n ) =0 , (P ρ ,n ) =0 Indexing sets for the simple modules of W ρ n (X) and R ρ n (X), see Section 5I Tableaux SStd κ , Std Indexing sets for the bottom/top of the cellular bases of W ρ n (X) and W ρ n , cf. Section 5H Positioning function x κ The function that assigns x-coordinates to nodes of Young diagrams, see Section 5D Maximal finite part max R (f in) Determines where the affine part of the diagrams begin, see Section 5D