Lemma. [74, Lemma 1.5] In the notation of part (2) of Proposition 3.9.1
                      [Yλ̌ † +ζˇ ] ≡ −[Yλ̌ † +ζˇ •si ]    for any       i ∈ I.            (3.148)
                          0                 0


Proof. Recall λ̌ † = λ̌0 · w0 + 2(ρe∨ − ρ̌) and write µ̌ = λ̌ † + ζˇ . We compute
               hµ̌ + ρ, ai i = hλ̌0 · w0 , ai i + 2(n(ǎi ) − 1) + 1 + hζˇ , ai i         (3.149)
                             = hλ̌0 · w0 , ai i + 2n(ǎi ) − 1 + hζˇ , ai i.              (3.150)
Using that hζˇ , ai i ≥ 0 and ζˇ ∈ Ye as well as the fact that −n(ǎi ) < hλ̌0 · w0 , ai i ≤ 0,
we conclude that
                   resn(ǎi ) hµ̌ + ρ, ai i = hλ̌0 · w0 , ai i + n(ǎi ) − 1.             (3.151)

Using the definition that µ̌ (1) = µ̌ (1) − hµ̌ + ρ̌, ai iǎi we obtain
               µ̌ (1) • si = µ̌ (1) · si − ǎi = λ̌ † + ζˇ − resn(ǎi ) hµ̌ + ρ, ai i − ǎi (3.152)
                                                                                         
      = λ̌0 · w0 · si + 2(ρe∨ − ρ̌ − ǎi ) + ζˇ · si + hλ̌0 · w0 , ai i + n(ǎi ) − 1 ǎi − (3.153)
                                                                                            ǎi

                              = λ̌0 · w0 + 2(ρe∨ − ρ̌) + ζˇ · si − ǎi .                  (3.154)
The rest of the argument follows as in Lemma [74, Lemma 1.5].                                   

3.9.6. Proof of Proof of Proposition 3.9.1, part 4: conclusion. Since the oµ̌,λ̌ ∈ Z+
                                                                                    τ

                                  [Gλ̌ † ] ? ceζˇ ≡ [vλ̌ † ] ? ceζˇ .                     (3.155)
                                       0                  0

From our description of the action by ceζˇ in (3.133) and formula (3.145), this
amounts to checking that
                      [vλ̌ † ]♦χζˇ =
                          0
                                           ∑ [vλ̌ +wt(p) ] ≡ [vλ̌ +ζˇ ].
                                                     †
                                                     0
                                                                        †
                                                                        0
                                                                                          (3.156)
                                        p∈B(ζˇ )

Using the previous Lemma and what we recalled about ι in §3.9.4, we are done.

 4. g- TWISTED CANONICAL BASES AND K AZHDAN -L USZTIG POLYNOMIALS
    Recall the generic ring Zτ,g from §2.3.1 which was defined in terms of formal
parameters τ (where τ 2 = t −1 ) and the gk , k ∈ Z subject to the relations as described
in loc. cit. In this section, we introduce a ‘g-twisted’ version of the constructions
from the previous one. Under the quantum specialization (see §2.3.2) gk 7→ τ, k 6=
0 we recover the constructions from the previous section, and under the p-adic
specialization of §2.3.3), as we explain in Part II of this paper, the constructions
of this section provide information about the structure of the Whittaker module on
covers of p-adic groups.
    We keep the same conventions as at the start of §3.6. Namely, we fix a root
datum (I, ·, D), which is written D = (Y, {ǎi }, X, {ai }), and a twist (Q, n) on D
such that the twisted root datum (I, ◦(Q,n) , D)  e is of simply-connected type. Set D e=
       a∨i }, X,
(Ye , {e         ai }) and write H
              e {e               eaff := Haff (I, ◦(Q,n) , D)    esph for the corresponding
                                                           e and H
                                                     50
