Spherical functions for sl(2,Q_p) I kindly would like to ask you the following- I am refering to page
175 in the Book by Gelfand, Graev, Shapiro, etc, on "Automorphic forms
..."
My question to which I would kindly ask you to answer me is : Are
there unitary representations of SL(2, Q_P) of type I (that is with
spherical functions) that are not in the continuous series. Gelfand is
ambiguous in the text by saying that he will give examples of such
class 1 unitary representations in the continuous series. If there
other type I  unitary reps, in which series are they (the discrete
series perhaps?).
What would be the trace formula for this class 1, non-principal series?
 A: The theorem of Borel-Casselman-Matsumoto from about 1976 shows, more generally, that any admissible representation of a $p$-adic reductive group with an Iwahori-fixed vector imbeds in an unramified principal series. In particular, an admissible representation with a spherical vector is in this class, that is, is a subrepresentation (and quotient) of an unramified principal series.
A: Be careful that among the irreducible unitary reps also the trivial representation has this property. That's why Paul Garrett says "embeds" into a prinicpal series, so you get not only unramified unitary principal series, but also the trivial representations.
Paul Garrett doesn't address the trace formula, so I will try to do this:
Let $F$ be a local field, $B$ the Borel in $SL(2)$, and $K$ being a maximal compact subgroup of $SL(2,F)$ with $SL(2,F) = B(F) \cdot K$.
Let $\mu$ be a complex character and $\pi(\mu) = Ind_{B(F)}^{SL(2,F)} \mu$ be the normalized induction (=principal series), then
$$ tr\; \pi(\mu) (\phi) = \int\limits_{B(F)} \int_K \phi(k^{-1}bk) \mu(b) \Delta(b)^{1/2}\; dk \; db,$$
where the right Haar measures are related as
$$ \int_G d g = \int_B \int_K dkdb.$$
In your case, you could take $\phi$ being right and left $K$-invariant, hence can replace the $K$-integral by $vol(K)$. So yes, there is a strong analogy between p-adic and Lie groups.
