Prove q-Vandermonde Identity using a lattice path counting argument I have this problem, from Aigner's A Course in Enumeration: 

Vandermonde's formula for the $q$-binomial coefficients is
      $${{n+m}\brack {p}}_{q} = \sum_{k=0}^p 
q^{(m-k)(p-k)}{{m}\brack {k}}_{q}{{n}\brack {p-k}}_{q}$$
      Prove this formula by a lattice path counting argument.
      (Hint: Count lattice paths from $(0,0)$ to $(p,m+n-p)$, and consider the intersection between such paths with the line $x+y=n$.)

I've previously solved this for the standard Vandermonde identity (not the q-analog), but I'm having trouble generalizing this to the q-analog. I understand this proof, could I perhaps using a similar argument to prove this?
 A: Recall the $q=1$ version first. We know $\binom{n}{k}$ counts the lattice paths $(0,0)\to(k,n-k)$. Then
$$ \binom{m+n}{k}=\sum_{r+s=k}\binom{m}{r} \binom{n}{s}. $$
We can group the lattice paths $(0,0)\to(k,m+n-k)$ according to where they intersect the diagonal line through the points $(0,m)$ and $(m,0)$ - namely, which paths go through $(r,m-r)$ for various $0\le r\le m$.
Such paths can be split in two parts, those $(0,0)\to(r,m-r)$ and $(r,m-r)\to(k,m+n-k)$; the second-part paths can be shifted into paths $(0,0)\to(s,n-s)$ where $r+s=k$. Thus, the number of such paths is $\binom{m}{r}$ times $\binom{n}{s}$.
Now in the general case, the $q^b$ coefficient of $\left[\begin{smallmatrix} n \\ k\end{smallmatrix}\right]_q$ counts lattice paths $(0,0)\to(k,n-k)$ which enclose $b$ blocks. Again paths $(0,0)\to(k,m+n-k)$ split into first part $(0,0)\to(r,m-r)$ and a second part $(r,m-r)\to(k,m+n-k)$. The second path sits over a $(m-r)\times s$ rectangle. Therefore
$$ \left[\begin{matrix} m+n \\ k \end{matrix}\right]_q=\sum_{r+s=k} q^{(m-r)s} \left[\begin{matrix} m \\ r \end{matrix}\right]_q\left[\begin{matrix} n \\ s \end{matrix}\right]_q $$
by summing $q^{b(P)}=q^{(m-r)s}q^{b(P_1)}q^{b(P_2)}$ over all paths $P$ from $(0,0)\to(m+n-k)$ split into first part $P_1$ from $(0,0)\to (r,m-r)$ and second part $P_2$ from $(r,m-r)\to(k,m+n-k)$.
