# Demazure crystals and the energy function

Anne Schilling$^{1}$† and Peter Tingley$^{2}$‡

**Abstract.** There is a close connection between Demazure crystals and tensor products of Kirillov–Reshetikhin crystals. For example, certain Demazure crystals are isomorphic as classical crystals to tensor products of Kirillov–Reshetikhin crystals via a canonically chosen isomorphism. Here we show that this isomorphism intertwines the natural affine grading on Demazure crystals with a combinatorially defined energy function. As a consequence, we obtain a formula of the Demazure character in terms of the energy function, which has applications to nonsymmetric Macdonald polynomials and $q$-deformed Whittaker functions.

**Résumé.** Les cristaux de Demazure et les produits tensoriels de cristaux Kirillov–Reshetikhin sont étroitement liés. Par exemple, certains cristaux de Demazure sont isomorphes, en tant que cristaux classiques, à des produits tensoriels de cristaux Kirillov–Reshetikhin via un isomorphisme que l’on peut choisir canoniquement. Ici, nous montrons que cet isomorphisme entremêle la graduation affine naturelle des cristaux de Demazure avec une fonction énergie définie combinatoirement. Comme conséquence, nous obtenons une formule pour le caractère de Demazure exprimée au moyen de la fonction énergie, avec des applications aux polynômes de Macdonald non symétriques et aux fonctions de Whittaker $q$-déformées.

**Keywords:** Demazure crystals, affine crystals, nonsymmetric Macdonald polynomials, Whittaker functions

## 1 Introduction

Kashiwara’s theory of crystal bases [20] provides a remarkable combinatorial tool for studying highest weight representations of symmetrizable Kac–Moody algebras and their quantizations. Here we consider finite-dimensional representations of the quantized universal enveloping algebra $U'_q(g)$ corresponding to the derived algebra $g'$ of an affine Kac–Moody algebra. These representations do not extend to representations of $U_q(g)$, but one can nonetheless define the notion of a crystal basis. In this setting crystal bases do not always exist, but there is an important class of finite-dimensional modules for $U'_q(g)$ that are known to admit crystal bases. These are tensor products of the Kirillov–Reshetikhin modules $W^{r,s}$ [24] (denoted $W(s\omega_r)$ in that paper), where $r$ is a node in the classical Dynkin diagram and $s$ is a positive integer.

The modules $W^{r,s}$ were first conjectured to admit crystal bases $B^{r,s}$ in [14, Conjecture 2.1], and moreover it was conjectured that these crystals are perfect whenever $s$ is a multiple of a particular constant $c_r$ (perfectness is a technical condition which allows one to use the finite crystal to construct highest

<footnote>$^{1}$Department of Mathematics, University of California, Davis, CA, USA</footnote>

<footnote>$^{2}$Department of Mathematics, M.I.T., Cambridge, MA, USA</footnote>

<footnote>†Partially supported by the NSF grants DMS–0652641, DMS–0652652, and DMS–1001256.</footnote>

<footnote>‡Partially supported by NSF grant DMS-0902649</footnote>
weight crystals, see [17]). This conjecture has now been proven in all non-exceptional cases (see [32, 33] for a proof that the crystals exist, and [7, Theorem 1.2] for a proof that they are perfect). We call $B^{r,s}$ a Kirillov–Reshetikhin (KR) crystal.

The perfectness of KR crystals ensures that they are related to highest weight affine crystals via the construction in [17]. In [21], Kashiwara proposed that this relationship is connected to the theory of Demazure crystals [19, 29], by conjecturing that perfect KR crystals are isomorphic as classical crystals to certain Demazure crystals (which are subcrystals of affine highest weight crystals). This was proven in most cases in [4, 5]. More relations between Demazure crystals and tensor products of perfect KR crystals were investigated in [25, 26, 27, 8].

There is a natural grading $\deg$ on a highest weight affine crystal $B(\Lambda)$, where $\deg(b)$ records the number of $f_0$ in a string of $f_i$'s that act on the highest weight element to give $b$. Due to the ideas discussed above, it seems natural that this grading should transfer to a grading on a tensor product of KR crystals. Gradings on tensor products of KR crystals have in fact been studied, and are usually referred to as “energy functions.” The idea dates to the earliest works on perfect crystals [17, 18], and was expanded in [34] following conjectural definitions in [13]. A function $D$, which we will refer to as the $D$-function, is defined as a sum involving local energy functions for each pair of factors in the tensor product and an ‘intrinsic energy’ of each factor. It has been suggested that there is a simple global characterization of the $D$ function related to the affine grading on a corresponding highest weight crystal (see [35, Section 2.5], [13, Proof of Proposition 3.9]). Here we will formulate this precisely, and provide a proof.

## 1.1 Results

In the present work, we restrict to non-exceptional type (i.e. all affine Kac–Moody algebras except $A_2^{(2)}$, $G_2^{(1)}$, $F_4^{(1)}$, $E_6^{(1)}$, $E_7^{(1)}$, $E_8^{(1)}$, $E_6^{(2)}$ and $D_4^{(3)})$, where KR crystals are known to exist. We consider a tensor product $B$ of perfect KR crystals, all of the same level. We define the intrinsic energy function $E^{\text{int}}$ on $B$ by letting $E^{\text{int}}(b)$ record the minimal number of $f_0$ in a path from a certain fixed $u \in B$ to $b$. One purpose of this note is to show that $E^{\text{int}}$ agrees with the $D$-function up to a shift (i.e. addition of a global constant).

Our main tool is an enhancement of the relationship between KR crystals and Demazure crystals due to Fourier, Shimozeno, and the first author. In [8, Theorem 4.4] it was shown that, under certain assumptions, there is a unique bijection from the Demazure crystal to the KR crystal respecting the classical crystal structure and such that all zero edges in the Demazure crystal are taken to zero edges in the KR crystal (although the KR crystal has more zero arrows). In most cases the assumptions from [8] follow from [6], and we deal with the remaining cases separately in Section 5, thereby firmly establishing this relationship between KR crystals and Demazure crystals in all non-exceptional types. We show in Theorem 6.2 that the resulting map intertwines the basic grading on the Demazure crystal with the $D$-function on the KR crystal, up to a shift. This in turn allows us to prove that $E^{\text{int}}$ agrees with $D$ up to a shift, and in fact the above map intertwines the basic grading with $E^{\text{int}}$ exactly.

In the long version of this note [38], we also consider the more general setting when $B$ is a tensor product of KR crystals which are not assumed to be perfect or of the same level. The $D$ function is still well-defined, and we give a precise relationship between $D$ and the affine grading on a related direct sum of highest weight modules. However, we no longer give an interpretation in terms of Demazure modules.
## 1.2 Applications

Our results express the characters of certain Demazure modules in terms of the intrinsic energy on a related tensor product of KR crystals (see Corollary 7.1). This has potential applications whenever these Demazure characters appear.

For untwisted simply-laced root systems, Ion [15], generalizing results of Sanderson [36] in type A, showed that the specializations $E_\lambda(q, 0)$ of nonsymmetric Macdonald polynomials at $t = 0$ coincide with specializations of Demazure characters of level one affine integrable modules. If $\lambda$ is anti-dominant, then $E_\lambda(q, 0)$ is actually a symmetric Macdonald polynomial $P_\lambda(q, 0)$. In this case, the relevant Demazure module is associated to a tensor product $B$ of level one KR crystals as above, so our results imply that $P_\lambda(q, 0)$ is the character of $B$, where the powers of $q$ are given by $-D$. Hence the coefficients in the expansion of $P_\lambda(q, 0)$ in terms of the irreducible characters are the one-dimensional configuration sums defined in terms of the intrinsic energy in [13].

There is also a relation between Demazure characters and $q$-deformed Whittaker functions for $g_l$ [9, Theorem 3.2]. Hence our results allow one to study Whittaker functions via KR crystals.

For more details, including proofs, see the long version of this paper [38].

## Acknowledgments

We thank Dan Bump, Ghislain Fourier, Stavros Kousidis, Cristian Lenart, Sergey Oblezin, and Masato Okado for enlightening discussions, and Nicolas Thiéry for his help with Sage. Most of the KR crystals have been implemented in the open-source mathematics system Sage (sagemath.org) by the first author.

# 2 Kac–Moody algebras and Crystals

Let $\mathfrak{g}$ be a Kac–Moody algebra. Let $\Gamma = (I, E)$ be its Dynkin diagram, where $I$ is the set of vertices and $E$ the set of edges. Let $\Delta$ denote the root system associated to $\mathfrak{g}$, and let $P$ denote the weight lattice of $\mathfrak{g}$ and $P^\vee$ the coweight lattice. We denote by $\{\alpha_i \mid i \in I\}$ the set of simple roots and $\{\alpha_i^\vee \mid i \in I\}$ the set of simple coroots, with $Q = \bigoplus_{i \in I} \mathbb{Z}\alpha_i$ the root lattice and $Q^\vee = \bigoplus_{i \in I} \mathbb{Z}\alpha_i^\vee$ the coroot lattice.

Let $U_q(\mathfrak{g})$ be the corresponding quantum enveloping algebra, defined over $\mathbb{Q}(q)$. Let $\{E_i, F_i\}_{i \in I}$ be the standard elements in $U_q(\mathfrak{g})$ corresponding to the Chevalley generators of the derived algebra $\mathfrak{g}'$. We recall the triangular decomposition $U_q(\mathfrak{g}) \cong U_q(\mathfrak{g})^{<0} \otimes U_q(\mathfrak{g})^{0} \otimes U_q(\mathfrak{g})^{>0}$, where $U_q(\mathfrak{g})^{<0}$ is the subalgebra generated by the $F_i$, $U_q(\mathfrak{g})^{>0}$ is the subalgebra generated by the $E_i$, and $U_q(\mathfrak{g})^{0}$ is the abelian group algebra generated by the usual elements $K_w$ for $w \in P^\vee$, and the isomorphism is as vector spaces. Let $U'_q(\mathfrak{g})$ be the subalgebra generated by $E_i$, $F_i$ and $K_i := K_{H_i}$ for $i \in I$.

We are particularly interested in the case when $\mathfrak{g}$ is of affine type. We will use the following conventions: $W$, $P$ and $\Lambda_i$ denote the affine Weyl group, the affine weight lattice, and the affine fundamental weight corresponding to $i \in I$, respectively, while $\bar{W}$, $\bar{P}$ and $\omega_i$ denote the weight lattice, Weyl group and fundamental weights corresponding to the finite type Dynkin diagram $I \setminus \{0\}$.

## 2.1 Crystals for $U_q(\mathfrak{g})$

We refer the reader to [12] for more details. For us, a crystal is a nonempty set $B$ along with operators $e_i : B \to B \cup \{0\}$ and $f_i : B \to B \cup \{0\}$ for $i \in I$, which satisfy some conditions. The set $B$ records certain combinatorial data associated to a representation $V$ of a symmetrizable Kac–Moody algebra $\mathfrak{g}$, and
the operators $e_i$ and $f_i$ correspond to the Chevalley generators $E_i$ and $F_i$ of $\mathfrak{g}$. Often the definition of a crystal includes three functions wt, $\varphi$, $\varepsilon: B \to P$, where $P$ is the weight lattice. In the case of crystals of integrable modules, these functions can be recovered (up to a global shift in a null direction if the Cartan matrix is not invertible) from the $e_i$ and $f_i$. Explicitly, the weight of the highest weight element in the crystal $B(\lambda)$ of an irreducible highest weight module is $\lambda$, and each operator $f_i$ has weight $-\alpha_i$.

An important theorem of Kashiwara states that every integrable $U_q(\mathfrak{g})$-highest weight module $V(\lambda)$ has a crystal basis. We denote the resulting $U_q(\mathfrak{g})$ crystal by $B(\lambda)$.

## 2.2 $U'_q(\mathfrak{g})$ crystals

In the case when the Cartan matrix is not invertible, one can define an extended notion of $U'_q(\mathfrak{g})$ crystals that includes some cases which do not lift to $U_q(\mathfrak{g})$ crystals. Such a crystal is still a set $B$ along with operators $e_i, f_i: B \to B \cup \{0\}$ related to a $U'_q(\mathfrak{g})$ modules (see e.g. [22]). We consider only crystals coming from integrable modules, so we can define

$$ \varepsilon_i(b) := \max\{m \mid e_i^m(b) \neq 0\}, \quad \varphi_i(b) := \max\{m \mid f_i^m(b) \neq 0\}, $$

$$ \varphi(b) := \sum_{i \in I} \varphi_i(b) \Lambda_i, \quad \varepsilon(b) := \sum_{i \in I} \varepsilon_i(b) \Lambda_i, \quad \text{and} \quad \text{wt}(b) := \varphi(b) - \varepsilon(b). $$

Then $\text{wt}(b)$ corresponds to the classical weight grading of the corresponding module. Notice that $\text{wt}(b)$ is always in the space $P' := \text{span}\{\Lambda_i \mid i \in I\}$. If the Cartan matrix of $\mathfrak{g}$ is not invertible, $P'$ is a proper sublattice of $P$.

**Remark 2.1** The simple roots $\alpha_i$ are not in general in the span of the fundamental weights, so in this case the weight of the operator $f_i$ is not $-\alpha_i$. It is rather the projection of $-\alpha_i$ onto the space of the fundamental weights in the direction which sends the null root to 0.

The tensor product rule for $U'_q(\mathfrak{g})$ or $U_q(\mathfrak{g})$ modules leads to a tensor product rule for the corresponding crystals. If $A$ and $B$ are two crystals, the tensor product $A \otimes B$ is the crystal whose underlying set is $\{a \otimes b \mid a \in A, b \in B\}$ with operators $f_i$ defined by:

$$ f_i(a \otimes b) = \begin{cases} f_i(a) \otimes b & \text{if } \varepsilon_i(a) \ge \varphi_i(b), \\ a \otimes f_i(b) & \text{otherwise,} \end{cases} \qquad (2.1) $$

and $e_i$ defined by the rule $e_i(b) = b'$ if and only if $f_i(b') = b$.

## 2.3 Extended affine Weyl group

Fix $\mathfrak{g}$ of affine type. Write the null root as $\delta = \sum_{i \in I} a_i \alpha_i$. Following [13], for each $i \in I \setminus \{0\}$, define $c_i = \max(1, a_i/a_i^\vee)$. It turns out that $c_i = 1$ in all cases except (1) $c_i = 2$ for $\mathfrak{g} = B_n^{(1)}$ and $i = n$, $\mathfrak{g} = C_n^{(1)}$ and $1 \le i \le n-1$, $\mathfrak{g} = F_4^{(1)}$ and $i = 3, 4$, and (2) $c_2 = 3$ for $\mathfrak{g} = G_2^{(1)}$. Here we use Kac's indexing of affine Dynkin diagrams from [16, Table Fin, Aff1 and Aff2]. Consider the sublattices of $\overline{P}$ given by

$$ M = \bigoplus_{i \in I \setminus \{0\}} \mathbb{Z}c_i \alpha_i = \mathbb{Z} \overline{W} \cdot \theta / a_0 \quad \text{and} \quad \tilde{M} = \bigoplus_{i \in I \setminus \{0\}} \mathbb{Z}c_i \omega_i. $$
The finite type Weyl group $\overline{W}$ acts on $\overline{P}$ by linearizing the rules $s_i\lambda = \lambda - \langle \alpha_i^\vee, \lambda \rangle \alpha_i$. Clearly $M \subset \tilde{M}$ and the action of $\overline{W}$ on $\overline{P}$ restricts to actions on $M$ and $\tilde{M}$. Let $T(\tilde{M})$ (resp. $T(M)$) be the subgroup of $T(\overline{P})$ generated by the translations $t_\lambda$ by $\lambda \in \tilde{M}$ (resp. $\lambda \in M$).

There is an isomorphism [16, Prop. 6.5] $W \cong \overline{W} \ltimes T(M)$ as subgroups of Aut($P$), where $W$ is the affine Weyl group. Under this isomorphism we have $s_0 = t_{\theta/a_0}s_\theta$, where $\theta$ is the highest root of $I\setminus\{0\}$. Define the extended affine Weyl group to be the subgroup of Aut($P$) given by $\tilde{W} = \overline{W} \ltimes T(\tilde{M})$.

Define $\theta^\vee \in \mathfrak{h}^*$ so that $s_\theta(\lambda) = \lambda - \langle \theta^\vee, \lambda \rangle \theta$. Let $C \subset \overline{P} \otimes_{\mathbb{Z}} \mathbb{R}$ be the fundamental chamber, that is the set of elements $\lambda$ such that $\langle \alpha_i^\vee, \lambda \rangle \ge 0$ for all $i \in I\setminus\{0\}$, and $\langle \theta^\vee, \lambda \rangle \le 1/a_0$. Any automorphism $\tau$ of the affine Dynkin diagram $\Gamma$ induces a symmetry of $\overline{P} \otimes_{\mathbb{Z}} \mathbb{R}$ preserving $C$, which we also denote by $\tau$. Any element of $\overline{W}$ can be written uniquely as $v\tau$ for $v \in W$ and diagram automorphism $\tau$. Not all $\tau$ show up in such expressions, and the set of $\tau$ that do is subgroup of Aut($\Gamma$) which we denote by $\Sigma$.

**Remark 2.2** When $g$ is of untwisted type, $M \cong Q^\vee$, $\tilde{M} \cong P^\vee$, with the isomorphism $\nu$ given by $c_i\omega_i = \nu(\omega_i^\vee)$, and $c_i\alpha_i = \nu(\alpha_i^\vee)$ for $i \in I\setminus\{0\}$.

## 2.4 Demazure modules and crystals

In this section $g$ is an arbitrary symmetrizable Kac-Moody algebra. Let $\lambda$ be a dominant integral weight for $g$. Define $W^\lambda := \{w \in W \mid w\lambda = \lambda\}$. Fix $\mu \in W\lambda$, and recall that the $\mu$ weight space in $V(\lambda)$ is one-dimensional. Let $u_\mu$ be a non-zero element of the $\mu$ weight space in $V(\lambda)$. Write $\mu = w\lambda$ where $w$ is the shortest element in the coset $wW^\lambda$.

Define the Demazure module

$$V_w(\lambda) := U_q(g)^{>0} \cdot u_{w(\lambda)}.$$

It was conjectured by Littelmann [30] and proven by Kahshiwara [19] that $V_w(\lambda)$ has a crystal base $B_w(\lambda)$. Define the set

$$f_w(b) := \{ f_{i_N}^{m_N} \cdots f_{i_1}^{m_1}(b) \mid m_k \in \mathbb{Z}_{\ge 0} \}, \quad (2.2)$$

where $w = s_{i_N} \cdots s_{i_1}$ is any fixed reduced decomposition of $w$. By [19, Proposition 3.2.3], as sets, $B_w(\lambda) = f_w(u_\lambda)$.

## 2.5 Non-exceptional finite type crystals

The standard crystals of type $X_n = A_n, B_n, C_n, D_n$ can be realized as in Figure 1. We call the set of symbols that show up in this realization the type $X_n$ alphabet. Impose a partial order $\prec$ on this alphabet by saying $x \prec y$ iff $x$ is to the left of $y$ in Figure 1 (so in type $D_n$, $n$ and $\bar{n}$ are incomparable).

**Definition 2.3** Fix $g$ of type $X_n$, for $X = A, B, C, D$. Fix a dominant integral weight $\gamma$ for $g = X_n$. Write $\gamma = m_1\omega_1 + m_2\omega_2 + \cdots + m_{n-1}\omega_{n-1} + m_n\omega_n$. Define a generalized partition $\Lambda(\gamma)$ associated to $\gamma$, which is defined case by case as follows:

* If $X = A, C$, $\Lambda(\gamma)$ has $m_i$ columns of each height $i$ for each $1 \le i \le n$;

* If $X = B$, $\Lambda(\gamma)$ has $m_i$ columns of height $i$ for $1 \le i \le n-1$, and $m_n/2$ columns of height $n$;

* If $X = D$, $\Lambda(\gamma)$ has $m_i$ columns of each height $i$ for each $1 \le i \le n-2$, $\min(m_{n-1}, m_n)$ columns of height $n-1$, and $|m_n - m_{n-1}|/2$ columns of height $n$. Color columns of height $n$ using color 1 if $m_n > m_{n-1}$ and color 2 if $m_n < m_{n-1}$.
<figure><img src="image_1.png" /><figcaption>Fig. 1: Standard crystals $B(\omega_1)$</figcaption></figure>

In cases where the above formulas involve a fractional number $x$ of columns at some height, we denote this by putting $\lfloor x \rfloor$ columns in addition to a single column of half width. Notice that this can only happen for columns of height $n$, and at worst we get a single column of width $1/2$.

In [23], the highest weight crystals $B(\gamma)$ of types $A_n, B_n, C_n, D_n$ were constructed in terms of tableaux, now known as Kashiwara–Nakashima (KN) tableaux, of shape $\Lambda(\gamma)$ and containing the symbols from Figure 1 of the relevant type.

### 3 Kirillov–Reshetikhin modules and their crystals

Let $\mathfrak{g}$ be an affine Kac–Moody algebra with index set $I$. The Kirillov–Reshetikhin modules were first introduced for the Yangian of $\mathfrak{g}'$ in [24], and developed for $U'_q(\mathfrak{g})$ in [3]. One can characterize the KR module $W^{r,s}$ for $U'_q(\mathfrak{g})$, where $r \in I \setminus \{0\}$ and $s \ge 1$, as the irreducible representations of $U'_q(\mathfrak{g})$ whose Drinfeld polynomials are given by $P_i(u) = (1 - q_i^{1-s}u)(1 - q_i^{3-s}u)\cdots(1 - q_i^{s-1}u)$ if $i = r$ and $1$ otherwise. Here $q_i = q^{(\alpha_i|\alpha_i)/2}$.

**Theorem 3.1** [33, 7] In all non-exceptional types, $W^{r,s}$ has a crystal base $B^{r,s}$. Furthermore, if $s$ is a multiple of $c_r$, then the resulting crystals are perfect, where $c_r = 2$ for type $B_n^{(1)}$ and $r = n$, and for type $C_n^{(1)}$ and $r < n$, and $c_r = 1$ in all other non-exceptional cases. $\square$

Set

$$ \diamond = \left\{ \begin{array}{ll} \emptyset & \text{for type } A_n^{(1)} \text{ and } 1 \le r \le n \\ \text{vertical domino} & \text{for types } C_n^{(1)}, D_{n+1}^{(2)} \text{ and } r = n \\ \text{horizontal domino} & \text{for type } D_n^{(1)} \text{ and } r = n-1, n \\ \text{box} & \text{for types } B_n^{(1)}, A_{2n-1}^{(2)} \text{ and } 1 \le r \le n \\ & \text{for types } C_n^{(1)}, D_{n+1}^{(2)} \text{ and } 1 \le r < n \\ & \text{for type } A_{2n}^{(2)} \text{ and } 1 \le r \le n. \end{array} \right. \quad (3.1) $$
As shown by Chari [1] in the untwisted case and more recently established in the twisted case, every $B^{r,s}$ decomposes as a classical crystal as

$$ B^{r,s} \cong \bigoplus_{\lambda} B(\lambda), \qquad (3.2) $$

where the sum is over those $\lambda$ which can be obtained from $s\omega_r$ by removing some number of $\diamond$, each occurring with multiplicity 1.

By [28, Proposition 3.8], any tensor product $B = B^{r_1,s_1} \otimes \dots \otimes B^{r_N,s_N}$ of KR-crystals is connected. We refer to such a $B$ as a *composite KR-crystal*. As in [17], if the factors are all perfect KR crystals of the same level $\ell$ then $B = B^{r_1,\ell c_{r_1}} \otimes \dots \otimes B^{r_N,\ell c_{r_N}}$ is also perfect of level $\ell$, and we refer to such a crystal as a *composite KR-crystal of level $\ell$*.

Explicit combinatorial models for KR crystals $B^{r,s}$ in non-exceptional types were constructed in [6] in terms of KN tableaux. Using these models, we obtain the following crucial lemma. The proof requires case by case analysis, and makes heavy use of [37, Lemma 5.1], which leads to a description of the action of $e_0$ on $X_{n-2}$ highest weight elements, where $X_n$ is the underlying classical type.

**Lemma 3.2** Let $B^{r,s}$ be a KR crystal of non-exceptional type. Fix $b \in B^{r,s}$, and assume that $b$ (resp. $e_0(b)$) lies in the classical component $B(\gamma)$ (resp. $B(\gamma')$) of (3.2). If $\varepsilon_0(b) \le \lfloor s/c_r \rfloor$ then $\diamond = \emptyset$, and otherwise:

(i) $\Lambda(\gamma')$ is either equal to $\Lambda(\gamma)$, or else is obtained from $\Lambda(\gamma)$ by adding or removing a single $\diamond$.

(ii) If $\varepsilon_0(b) > \lfloor s/c_r \rfloor$, then $\Lambda(\gamma')$ is obtained from $\Lambda(\gamma)$ by removing a $\diamond$.

# 4 Energy functions

We define two energy functions on tensor products of KR crystals. The function $E^{\text{int}}$ is given by a fairly natural “global” condition on tensor products of level-$\ell$ KR crystals. The function $D$ is defined by summing up combinatorially defined “local” contributions, and makes sense for general tensor products of KR crystals. In Theorem 6.2 below we establish that these two functions agree up to a shift, as was suggested in [35, Section 2.5].

## 4.1 The function $E^{\text{int}}$

The following is essentially the definition of a ground state path from [17].

**Definition 4.1** Let $B = B^{r_N, \ell c_{r_N}} \otimes \dots \otimes B^{r_1, \ell c_{r_1}}$ be a composite level $\ell$ KR crystal. Define $u_B = u_B^N \otimes \dots \otimes u_B^1$ to be the unique element of $B$ such that $\varepsilon(u_B^1) = \ell \Lambda_0$ and, for each $1 \le j < N$, $\varepsilon(u_B^{j+1}) = \varphi(u_B^j)$. This is well-defined by the definition of a perfect crystal. The element $u_B$ is called the ground state path of $B$.

**Definition 4.2** Let $B$ be a composite KR crystal of level $\ell$ and consider $u_B$ as in Definition 4.1. Define the intrinsic energy $E^{\text{int}}(b)$ for $b \in B$ to be the minimal number of $f_0$ in a string $f_{i_N} \cdots f_{i_1}$ such that $f_{i_N} \cdots f_{i_1}(u_B) = b$.
## 4.2 The D function

**Definition 4.3** The D-function on $B^{r,s}$ is the function defined as follows:

(i) $D_{B^{r,s}} : B^{r,s} \to \mathbb{Z}$ is constant on all classical components.

(ii) On the component $B(\lambda)$, $D_{B^{r,s}}$ records the maximum number of $\diamond$ that can be removed from $\Lambda(\lambda)$ such that the result is still a (generalized) partition, where $\diamond$ is as in (3.1).

In those cases when $\diamond = \emptyset$, this is interpreted as saying that $D_{B^{r,s}}$ is the constant function 0.

Let $B_1, B_2$ be two affine crystals with generators $v_1$ and $v_2$, respectively, such that $B_1 \otimes B_2$ is connected and $v_1 \otimes v_2$ lies in a one-dimensional weight space. By [28, Proposition 3.8], this holds for any two KR crystals. The combinatorial R-matrix [17, Section 4] is the unique crystal isomorphism $\sigma : B_2 \otimes B_1 \to B_1 \otimes B_2$. By weight considerations, this must satisfy $\sigma(v_2 \otimes v_1) = v_1 \otimes v_2$.

As in [17], [34, Theorem 2.4], there is a function $H = H_{B_2, B_1} : B_2 \otimes B_1 \to \mathbb{Z}$, unique up to global additive constant, such that, for all $b_2 \in B_2$ and $b_1 \in B_1$,

$$H(e_i(b_2 \otimes b_1)) = H(b_2 \otimes b_1) + \begin{cases} -1 & \text{if } i = 0 \text{ and LL,} \\ 1 & \text{if } i = 0 \text{ and RR,} \\ 0 & \text{otherwise.} \end{cases} \quad (4.1)$$

Here LL (resp. RR) indicates that $e_0$ acts on the left (resp. right) tensor factor in both $b_2 \otimes b_1$ and $\sigma(b_2 \otimes b_1)$. When $B_1$ and $B_2$ are KR crystals, we normalize $H_{B_2, B_1}$ by requiring $H_{B_2, B_1}(u_{B_2} \otimes u_{B_1}) = 0$, where $u_{B_1}$ and $u_{B_2}$ are as in Definition 4.1.

**Definition 4.4** For $B = B^{r_N, \ell c_{r_N}} \otimes \cdots \otimes B^{r_1, \ell c_{r_1}}$, set $D_j := D_{B^{r_j, s_j}} \sigma_1 \sigma_2 \cdots \sigma_{j-1}$ and set $H_{j,i} := H_i \sigma_{i+1} \sigma_{i+2} \cdots \sigma_{j-1}$, where $\sigma_j$ and $H_j$ act on the j-th and $(j+1)$-st tensor factors and $D_{B^{r_j, s_j}}$ is the D-function for $B^{r_j, s_j}$ as given in Definition 4.3 acting on the rightmost factor. The D-function $D_B : B \to \mathbb{Z}$ is defined as

$$D_B := \sum_{N \ge j>i \ge 1} H_{j,i} + \sum_{j=1}^{N} D_j. \quad (4.2)$$

# 5 Perfect KR crystals and Demazure crystals

We now state a precise relationship between KR crystals and Demazure crystals (see Theorem 5.1). This was proven by Fourier, Schilling, and Shimozono [8] under some additional assumptions on the KR crystals, most of which follow from the later results [7] showing that the relevant KR crystals are perfect. In types $A_{2n}^{(2)}$ and for the exceptional nodes in type $D_n^{(1)}$ the assumptions from [8] need to be proven separately or slightly modified, which we do in the long version of this paper. Thus we establish:

**Theorem 5.1** Let $B = B^{r_N, \ell c_{r_N}} \otimes \cdots \otimes B^{r_1, \ell c_{r_1}}$ be a level-$\ell$ composite KR crystal of non-exceptional type. Define $\lambda = -(c_{r_1} \omega_{r_1}^* + \cdots + c_{r_N} \omega_{r_N}^*)$, where $r^*$ is defined by $\omega_{r^*} = -w_0(\omega_r)$ with $w_0$ the longest element of $\overline{W}$, and write $t_\lambda \in T(\overline{M}) \subset \overline{W}$ as $t_\lambda = v\tau$ for $v \in W, \tau \in \Sigma$. Then there is a unique isomorphism of affine crystals

$$j : B(\ell \Lambda_{\tau(0)}) \to B \otimes B(\ell \Lambda_0).$$
This satisfies $j(u_{\ell\Lambda_{\tau(0)}}) = u_B \otimes u_{\ell\Lambda_0}$, where $u_B$ is the distinguished element from Definition 4.1, and

$$j(B_v(\ell\Lambda_{\tau(0)})) = B \otimes u_{\ell\Lambda_0}, \qquad (5.1)$$

where $B_v(\ell\Lambda_{\tau(0)})$ is the Demazure as defined in Section 2.4.

# 6 The affine grading via the energy function

In this section we give precise statements of our main results. We show that for $B = B^{r_N, \ell c_{r_N}} \otimes \dots \otimes B^{r_1, \ell c_{r_1}}$ a composite level-$\ell$ KR crystal the map $j$ from Theorem 5.1 intertwines the $D$ function from Section 4.2 with the affine degree up to a shift. This allows us to show that $j$ intertwines $E^{\text{int}}$ with $\deg$ exactly, and in particular $E^{\text{int}}$ agrees with $D$ up to a shift.

**Definition 6.1** For $t_\lambda = v\tau \in \widetilde{W}$, let $\deg : B_v(\ell\Lambda_{\tau(0)}) \to \mathbb{Z}_{\ge 0}$ be the affine degree map, defined by $\deg(u_{\ell\Lambda_{\tau(0)}}) = 0$, and each $f_i$ has degree $\delta_{i,0}$.

**Theorem 6.2** With the same assumptions and notation as in Theorem 5.1, let $\tilde{j} : B_v(\ell\Lambda_{\tau(0)}) \to B$ be the restriction of the map $j$ to $B_v(\ell\Lambda_{\tau(0)})$, where $B \otimes u_{\ell\Lambda_0}$ is identified with just $B$. Then for all $b \in B_v(\ell\Lambda_{\tau(0)})$ we have $\deg(b) = D(\tilde{j}(b)) - D(u_B) = E^{\text{int}}(\tilde{j}(b))$.

These results are proven using the following lemma, which in turn follows from Lemma 3.2.

**Lemma 6.3** Let $B = B^{r_N, s_N} \otimes \dots \otimes B^{r_1, s_1}$ be a tensor product of KR crystals and fix an integer $\ell$ such that $\ell \ge \lfloor s_k/c_k \rfloor$ for all $1 \le k \le N$. If $e_0(b) \ne 0$ then $D(e_0(b)) \ge D(b) - 1$, and if $\varepsilon_0(b) > \ell$ then this is an equality.

Notice that Lemma 6.3 holds in greater generality than Theorem 6.2. In the long version of this paper [38, Section 8], we give a relationship between the $D$ function and the affine grading on a related sum of highest weight crystals in this more general setting. However, we no longer give a connection with Demazure modules.

# 7 Applications

We now discuss how the relation between the affine grading in the Demazure crystal and the energy function can be used to derive a formula for the Demazure character using the energy function, as well as showing how they are related to nonsymmetric Macdonald polynomials and Whittaker functions.

## 7.1 Demazure characters

By definition the Demazure character is $\text{ch}V_w(\lambda) = \sum_\mu \dim(V_w(\lambda)_\mu)e^\mu$, where $V_w(\lambda)_\mu$ is the $\mu$ weight space of the Demazure module $V_w(\lambda)$. This can be expressed in terms of the Demazure crystal as

$$\text{ch}V_w(\lambda) = \sum_{b \in B_w(\lambda)} e^{\text{wt}(b)}. \qquad (7.1)$$

It follows immediately from Theorem 6.2 that:

**Corollary 7.1** Let $B = B^{r_N, \ell c_{r_N}} \otimes \dots \otimes B^{r_1, \ell c_{r_1}}$ be a $U'_q(\mathfrak{g})$-composite level-$\ell$ KR crystal, $\lambda = -(c_{r_1}\omega_{r_1}^* + \dots + c_{r_N}\omega_{r_N}^*)$, and $t_\lambda = v\tau$ as in Theorem 5.1. Then

$$\text{ch}V_v(\ell\Lambda_{\tau(0)}) = e^{\ell\Lambda_0} \sum_{b \in B} e^{\text{wt}(b) - \delta E^{\text{int}}(b)} = e^{\ell\Lambda_0} \sum_{b \in B} e^{\text{wt}(b) - \delta(D(b) - D(u_B))}. \qquad (7.2)$$
References

[1] V. Chari, *On the fermionic formula and the Kirillov-Reshetikhin conjecture*, Internat. Math. Res. Notices **12** (2001) 629–654

[2] I. Cherednik, *Nonsymmetric Macdonald polynomials*, Int. Math. Res. Notices **10** (1995) 483–515

[3] V. Chari, A. Pressley, *Quantum affine algebras and their representations*, CMS Conf. Proc., 16, Amer. Math. Soc., Providence, RI, 1995, 59–78

[4] G. Fourier, P. Littelmann, *Tensor product structure of affine Demazure modules and limit constructions*, Nagoya Math. J. **182** (2006) 171–198

[5] G. Fourier, P. Littelmann, *Weyl modules, Demazure modules, KR-modules, crystals, fusion products and limit constructions*, Adv. Math. **211** (2007) 566–593

[6] G. Fourier, M. Okado, A. Schilling, *Kirillov–Reshetikhin crystals of nonexceptional type*, Advances in Math. **222** (2009) 1080–1116

[7] G. Fourier, M. Okado, A. Schilling, *Perfectness of Kirillov–Reshetikhin crystals for nonexceptional type*, Contemp. Math. **506** (2010) 127–143

[8] G. Fourier, A. Schilling, M. Shimozono, *Demazure structure inside Kirillov–Reshetikhin crystals*, J. Algebra **309** (2007) 386–404

[9] A. Gerasimov, D. Lebedev, S. Oblezin, *On $q$-deformed $gl(l+1)$-Whittaker function III*, arXiv:0805.3754

[10] M. Haiman, *Cherednik algebras, Macdonald polynomials and combinatorics*, International Congress of Mathematicians. Vol. III, 843–872, Eur. Math. Soc., Zürich, 2006

[11] J. Haglund, M. Haiman, N. Loehr, *A combinatorial formula for nonsymmetric Macdonald polynomials*, Amer. J. Math. **130** (2008) 359–383

[12] J. Hong, S.-J. Kang, Introduction to quantum groups and crystal bases, Graduate Studies in Mathematics, **42**, American Mathematical Society, Providence, RI, 2002. xviii+307 pp

[13] G. Hatayama, A. Kuniba, M. Okado, T. Takagi, Z. Tsuboi, *Paths, crystals and fermionic formulae*, MathPhys Odyssey 2001, 205–272, Prog. Math. Phys. **23**, Birkhäuser Boston, Boston, MA, 2002

[14] G. Hatayama, A. Kuniba, M. Okado, T. Takagi, Y. Yamada, *Remarks on fermionic formula*, Contemp. Math., **248**, Amer. Math. Soc., Providence, RI, 1999, 243–291

[15] B. Ion, *Nonsymmetric Macdonald polynomials and Demazure characters*, Duke Math. J. **116** (2003) 299–318

[16] V. G. Kac, *Infinite-dimensional Lie algebras*, Third edition, Cambridge University Press, Cambridge, 1990

[17] S.-J. Kang, M. Kashiwara, K. C. Misra, T. Miwa, T. Nakashima, A. Nakayashiki, *Affine crystals and vertex models*, Int. J. Mod. Phys. A **7** (suppl. 1A) (1992) 449–484

[18] S.-J. Kang, M. Kashiwara, K. C. Misra, T. Miwa, T. Nakashima, A. Nakayashiki, *Perfect crystals of quantum affine Lie algebras*, Duke Math. J. **68** (1992) 499–607

[19] M. Kashiwara, *The crystal base and Littelmann’s refined Demazure character formula*, Duke Math. J. **71** (1993) 839–858
[20] M. Kashiwara, *On crystal bases of the q-analogue of universal enveloping algebras*, Duke Math. J. **73** (1994) 383-413

[21] M. Kashiwara, *Level zero fundamental representations over quantized affine algebras and Demazure modules*, Publ. Res. Inst. Math. Sci. **41** (2005) 223-250

[22] M. Kashiwara, *On level-zero representations of quantized affine algebras*, Duke Math. J. **112** (2002) 117-175

[23] M. Kashiwara, T. Nakashima, *Crystal graphs for representations of the q-analogue of classical Lie algebras*, J. Algebra 165 (1994) 295-345

[24] A.N. Kirillov, N.Yu. Reshetikhin, *Representations of Yangians and multiplicities of the inclusions of the irreducible components of the tensor product of representations of simple Lie algebras*. J. Soviet Math. **52** (1990) 3156-3164

[25] A. Kuniba, K. C. Misra, M. Okado, J. Uchiyama, *Demazure modules and perfect crystals*, Comm. Math. Phys. **192** (1998) 555-567

[26] A. Kuniba, K. C. Misra, M. Okado, T. Takagi, J. Uchiyama, *Characters of Demazure modules and solvable lattice models*, Nuclear Phys. B **510** (1998) 555-576

[27] A. Kuniba, K. C. Misra, M. Okado, T. Takagi, J. Uchiyama, *Crystals for Demazure modules of classical affine Lie algebras*, J. Algebra **208** (1998) 185-215

[28] C. Lecouvey, M. Okado, M. Shimozono, *Affine crystals, one dimensional sums and parabolic Lusztig q-analogues*, arXiv:1002.3715

[29] P. Littelmann, *Paths and root operators in representation theory*, Ann. of Math. (2) **142** (1995), no. 3, 499-525

[30] P. Littelmann, *Crystal graphs and Young tableaux*, J. Algebra **175** (1995) 65-87

[31] E. Opdam, *Harmonic analysis for certain representations of graded Hecke algebras*, Acta Math. **175** (1995) 75-121

[32] M. Okado, *Existence of crystal bases for Kirillov-Reshetikhin modules of type D*, Publ. Res. Inst. Math. Sci. **43** (2007) 977-1004

[33] M. Okado, A. Schilling, *Existence of Kirillov-Reshetikhin crystals for nonexceptional types*, Represent. Theory **12** (2008) 186-207. Erratum: Represent. Theory **12** (2008) 499-500

[34] M. Okado, A. Schilling, M. Shimozono, *Virtual crystals and fermionic formulas of type $D_{n+1}^{(2)}$, $A_{2n}^{(2)}$, and $C_n^{(1)}$*, Representation Theory **7** (2003) 101-163

[35] M. Okado, A. Schilling, M. Shimozono, *Virtual crystals and Kleber's algorithm*, Comm. Math. Phys. **238** (2003) 187-209

[36] Y. Sanderson, *On the connection between Macdonald polynomials and Demazure characters*, J. Algebraic Combin. **11** (2000) 269-275

[37] A. Schilling, *Combinatorial structure of Kirillov-Reshetikhin crystals of type $D_n^{(1)}$, $B_n^{(1)}$, $A_{2n-1}^{(2)}$*, J. Algebra **319** (2008) 2938-2962

[38] A. Schilling, P. Tingley, *Demazure crystals, Kirillov-Reshetikhin crystals, and the energy function*, arXiv:1104.2359