both the classical and ‘geometric’ Casselman–Shalika formulas that have played
an important in the classical and geometric Langlands programs.
   The aim of this paper is to extend such results to the non-linear or metaplectic
case (i.e. ` > 1). Since the pioneering work of Kazhdan–Patterson [67], it has
been known that the metaplectic Gelfand–Graev representation Wψ (G,      e K) is not
a rank one module over H(G, K). Moreover, it was expected that the structure of
                              e
Wψ (G,e K) must be somewhat intricate to reflect both the algebraic and arithmetic
complexities of known metaplectic Casselman–Shalika formulas [24, 32, 91]. A
fundamentally new framework to understand these issues was provided by the pro-
gram of D. Gaitsgory and J. Lurie (see especially [46, Conjecture 0.4]).
   To explain this, note that for a specific choice of Q (essentially the ‘minimal’
                                         `, we can also construct another object,
or ‘primitive’ choice, see §3.2.8) and any
namely the (big) quantum group U̇ζ Ǧ of the dual group Ǧ at a 2`-th root of unity
ζ ∈ C. As G. Lusztig observed (see [83, §35]), the category of finite-dimensional
representations Rep U̇ζ (Ǧ) is equipped with the action (via quantum Frobenius)
                                        
of the representation category Rep Ǧ` of an auxiliary linear algebraic group Ǧ`
constructed from G and the chosen (Q, `). The Gaitsgory–Lurie conjecture posits
an equivalence between a certain category of twisted,Whittaker sheaves on the
affine Grassmannian attached to G with Rep U̇ζ (Ǧ) in a manner compatible
with the actions of Hecke algebra and quantum Frobenius, respectively. Whereas
progress towards the full Gaitsgory–Lurie conjecture at the level of factorization
categories seems ongoing (see [47, 48]), a version of this conjecture (at the level of
DG-categories of D-modules) has already been established by Campbell–Dhillon–
Raskin in [27].
   The main results obtained in this paper can be summarized as follows:
                                                    e I − ) into H(G,
    (a) We obtain an explicit decomposition of Wψ (G,              e I − )-submodules,
        each of which can be identified precisely with a certain anti-spherical (or
        closely related) module for the corresponding affine Hecke algebra. This
        leads us to find and study new Kazhdan–Lusztig type bases for Wψ (G,  e K),
        in terms of which we can formulate various Casselman–Shalika type for-
        mulas. One such formula (see (1.12)) can be expressed in terms of q-
        Littlewood–Richardson coefficients, expressions of considerable combina-
        torial interest.
    (b) We prove an isomorphism between Wψ (G,     e K) and a certain (enriched)
                                                 
        graded Grothedieck ring of Rep U̇ζ (Ǧ) that intertwines the Hecke ac-
                               
        tion with the Rep Ǧ` action.
As Wψ (G,e K) is an analogue of the category of Whittaker sheaves, (b) can per-
haps be construed as a p-adic version of the Gaitsgory–Lurie conjecture. This
work is independent of and, as we explain in more detail in §1.2.8, does not ap-
pear to be just a ‘decategorified’ version of [27]. A decomposition of Wψ (G,
                                                                            e I−)
similar to the one in (a) recently appeared in two places: in the geometric work
of Campbell–Dhillon–Raskin [27] and in the algebraic work of Gao–Gurevich–
Karasiewicz [49]; in both papers results at the pro-p level appear naturally. Our
                                          3
