Suppose $p: X \to Y$ is an unramified (possibly infinite) covering map of complex manifolds. The functor $p^!: D^b(Y) \to D^b(X)$ is supposed to be the right-adjoint of $R p_!:D^b(X) \to D^b(Y)$, where $p_!$ is the push-forward with proper support, i.e. $$p_! \mathcal F(U) = \{s \in \mathcal F(p^{-1}(U)) \,|\, \operatorname{supp}(s) \to U \text{ is proper}\} \subset p_* \mathcal F(U).$$ Is it true that $p^! = p^{-1}$, where $p^{-1}$ is the inverse image functor? I know that if $p$ is a covering, then $p_!$ is an exact functor, so that there are no higher derived functors. I guess¹ this implies that $p^!$ is right-adjoint to $p_!$. But the functor $p^{-1}$ is right-adjoint to $p_*$, and if $p$ is an infinite covering, then $p_! \neq p_*$.
Here is my motivation: In Sheaves on Manifolds, Chapter 8.6, Kashiwara and Schapira consider a situation where one has a holomorphic map $g:X \to \mathbb D \subset \mathbb C$, and considers a cartesian diagram $$\require{AMScd} \begin{CD} X @<\tilde p<< \tilde X^* \\ @VgVV @VVV \\ \mathbb D @<p<< \mathbb H \end{CD} $$ where $\mathbb H \subset \mathbb C$ is the upper half-plane, and $p(z) = e^{2\pi i z}$. So the covering map is $\tilde p: \tilde X^* \to X \setminus g^{-1}(0)$. On the top of page 351, Kashiwara and Schapira claim exactly $\tilde p^{-1} = \tilde p^!$. Is that true only in this situation?
¹ I'm still a bit insecure dealing with the derived category. Is that true? Because purely formally, $p^!$ is defined on the derived category, whereas $p_!$ is defined on the category of sheaves. Or does $p^!$ actually give a functor on the abelian category of sheaves if $p_!$ is exact?
My mistake was that $f^{-1}$ is actually left-adjoint to $f_*$, and the claim is that $f^{-1}$ is right-adjoint to $f_!$. So there is no contradiction. (This mistake is symptomatic of my troubles I have with adjoints. I can never remember which is left- and which is right-adjoint).
Suppose first that $X = \coprod_{n \in \mathbb N} Y$ is the disjoint union of copies of $Y$, $p:X \to Y$. Then a sheaf $F$ on $X$ is just a series of sheaves $(F_n)_{n \in \mathbb N}$ on $Y$. In that situation, the functors $p_*$ and $p_!$ are $$p_*F = \prod_{n \in \mathbb N} F_n \quad \text{and} \quad p_!F = \bigoplus_{n \in \mathbb N} F_n.$$ The pull-back of a sheaf $G$ on $Y$ corresponds to the constant series $p^{-1} G = (G)_{n \in \mathbb N}$, and we have $$\mathscr{Hom}_X(F,p^{-1}G) = (\mathscr{Hom}_Y(F_n, G))_{n \in \mathbb N}.$$ So now we get $$\tag{1}\label{eq1}\operatorname{Hom}_Y(p_!F,G) = \prod_n \operatorname{Hom}(F_n,G) = \Gamma(Y, p_* \mathscr{Hom}(F, p^{-1}G)) = \operatorname{Hom}(F,p^{-1}G).$$
Now suppose that $p: X \to Y$ is any covering map. We want to define an isomorphism $\operatorname{Hom}(p_! F, G) \to \operatorname{Hom}(F, p^{-1}G)$. Take an element $\varphi \in \operatorname{Hom}(p_!F,G)$. Cover $Y$ by open sets $U_i \subset Y$ such that $p^{-1}(U_i) = \coprod_{j \in J} V_{ij}$, where each $V_{ij}$ maps homeomorphically to $U_i$. Set $\varphi_i = \varphi|_{U_i}$. Applying \eqref{eq1} to $\varphi_i$ we produce morphisms $\psi_i \in \operatorname{Hom}(F_{p^{-1}(U_i)}, p^{-1}G_{U_i})$. As the identification \eqref{eq1} is canonical, two such sections $\psi_i$ and $\psi_j$ will agree on $p^{-1}(U_i \cap U_j)$, so they glue to a well-defined section $\psi \in \operatorname{Hom}(F,p^{-1}G)$. The inverse map is defined in the same way, going \eqref{eq1} backwards.