Proof of Cartan decomposition for $G=\operatorname{GL}_2(F)$ with local field $F$ (and Bruhat decomposition for a matrix with integer coefficients) Edit: I corrected some mistakes I made in my analysis.
Let $K$ be a local field with discrete normalized valuation $v$. Let $\pi$ be a uniformizer, and denote by $k$ the residue field of $F$. The field $k$ is finite of order $q=p^f$ with $p$ a prime number. Denote also by $\mathfrak o$ the ring of integers of $F$. Let $G=\operatorname{GL}_2(F)$ and consider the subgroup $H=\operatorname{GL}_2(\mathfrak o)$. Eventually, let $a\leq b$ be two integers and let 
$$g=
  \left( {\begin{array}{cc}
   \pi^a & 0 \\
   0 & \pi^b \\
  \end{array} } \right)$$
In the process of proving Cartan decomposition - which states that the set of all matrices of the same form as $g$ is a set of representatives for the coset space $H\backslash G/H$ - I need to prove the following statement 

Assume $a<b$. Then the index of $K:=H\cap gHg^{-1}$ in $H$ is $(q+1)q^{b-a-1}$.

Here is my work so far. Let $l:=b-a$. We need to count the number of right cosets of $K$ in $H$. For this, I start with any element 
$$h=
  \left( {\begin{array}{cc}
   h_{1,1} & h_{1,2} \\
   h_{2,1} & h_{2,2} \\
  \end{array} } \right) \in H$$
and by multiplying $h$ on the right by elements of $K$, I want to find the most simple element in the coset of $h$ which will allow me to characterize it.  
First, I determined $K$ to be the subgroup of matrices of $H$ whose $(2,1)-$entry has valuation at least $l$. Hence, if $v(h_{2,1})\geq l$, then $h\in K$ and its coset is $K$. Let us now assume $0\leq v(h_{2,1}) \leq l-1$.  
My idea was to make use of the Bruhat decomposition of $h$. Because $h_{2,1}\not = 0$, I know that there exists unique $a,b,c,d\in F$ such that 
$$h=
  \underbrace{\left( {\begin{array}{cc}
   1 & a \\
   0 & 1 \\
  \end{array} } \right)}_N
  \left( {\begin{array}{cc}
   0 & 1 \\
   1 & 0 \\
  \end{array} } \right)
  \underbrace{\left( {\begin{array}{cc}
   b & c \\
   0 & d \\
  \end{array} } \right)}_B$$
With the further condition that the matrices $N$ and $B$ lie in $G$. Developping this product gives the relation 
$$h =
   \left( {\begin{array}{cc}
   ab & d+ac \\
   b & c \\
  \end{array} } \right)$$ 
Furthermore, note that we have $\det(h)=h_{1,1}h_{2,2}-h_{2,1}h_{1,2}=-bd\in \mathfrak o^{\times}$. From this, I deduce several points


*

*$b=h_{2,1}$ has valuation between $0$ and $l-1$.

*$c=h_{2,2}$ is an integer

*$ab=h_{1,1}$ is an integer, so $a\in F$ satisfies $v(a)= v(h_{1,1})-v(h_{2,1}) \geq 1-l$

*$d+ac = h_{1,2}$ is an integer

*We must have equality $v(d)=-v(h_{2,1})\leq 0$.


Now, when I first applied Bruhat decomposition, I was hoping for $B$ to have integer coefficient, so that it would lie in $K$, and thus I would have obtained a remarkable element to characterize the coset. Unfortunately, the last point shows that it is only the case when $b=h_{2,1}$ is a unit. In this situation, multiplying $h$ by the inverse of $B\in K$ shows that $h$ shares the same coset as the matrix 
$$\left( {\begin{array}{cc}
   a & 1 \\
   1 & 0 \\
  \end{array} } \right)$$
with $a$ an integer of valuation $v(a)=v(h_{1,1})$. Note that two such matrices are in the same coset if and only if the $(1,1)-$ coefficient differ by an element of valuation at least $l$. Hence, I have found as many cosets as the order of $\mathfrak o/(\pi^l)$, that is $q^l$ cosets for now. I still need to find $q^{l-1}-1$ more (because I also have the coset of the identity matrix, which is $K$ itself).
Now, when $h_{2,1}$ is not a unit, I actually lack of ideas to reduce $h$ in a relevant manner. What I can say however is the following. Looking at $\det(h)$, we see that both $h_{1,1}$ and $c=h_{2,2}$ are units. It follows that $v(a)=v(d)=-v(h_{2,1})<0$.
I am also wondering if there isn't any more straightforward ways to compute this index.  
Would somebody knows a way to treat this problem ?
 A: There is an action of $H$ on the projective line $\mathbb P^1_R$ over the ring $R:=\mathfrak o/(\pi^l)$. This is the set of pairs $(u,v)$ such that $R=Ru+Rv$, modulo the diagonal action of the unit group $R^\times$. As usual, we write $[u:v]$ for the line through $(u,v)$ in $\mathbb P^1_R$.
Now, this action is transitive. For, $R$ is a local ring, so given a point $[u:v]$, one of $u$ or $v$ must be a unit, and so we can find an element in $H$ having first column $\binom{u'}{v'}$ for some lifts $u',v'$ of $u,v$ respectively.
On the other hand, the stabiliser of the point $[1:0]$ consists of those matrices in $H$ having first column $\binom pr$ with $r\in(\pi^l)$ (and hence $p$ invertible). Thus the stabiliser is precisely $K$.
Thus the size of the coset $(H:K)$ is the cardinality of $\mathbb P^1_R$. This we can compute as follows. We have points $[1:x]$ for any $x\in R$, so $q^l$ such. The remaining points are all of the form $[x:1]$ for $x\in R\pi$, of which there are $q^{l-1}$. Hence $[H:K]=q^l+q^{l-1}=(q+1)q^{l-1}$.
