We have a very well known result by Gauss in the theory of $q$-analog. Which is given by:
$$\sum_{r=0}^m (-1)^r\left[ \begin{array}{cc|c} m\\ r \end{array} \right]_q = \begin{cases} 0, & \text{if $m$ is odd} \\ (1-q)(1-q^2)...(1-q^{m-1}), & \text{if $m$ is even} \end{cases} $$
My question is, how can this result be equivalent to:
$$\sum_{r=0}^m (-1)^r\frac{q^rq^{m-r}}{(q;q)_r(q;q)_{m-r}} = \begin{cases} 0, & \text{if $m$ is odd} \\ \frac{q^m}{(q^2;q^2)_{m/2}}, & \text{if $m$ is even} \end{cases} $$
Note: $\left[ \begin{array}{cc|c} m\\ r \end{array} \right]_q=\frac{(q^m-1)(q^{m-1})...(q^{m-r+1}-1)}{(q^r-1)(q^{r-1}-1)...(q-1)}$
Can anyone please show me how these two terms are equivalent forms of each other algebraically?
More details on the following exposition can be found in chapters 2 and 3 of The Theory of Partitions by George E. Andrews.
Also note that the theorem you seek proof of is theorem 2 below. It is equivalent to the second (correct) identity in the question.
Notation.
The following notation is commonly used in the theory of $q$-analogues.
$$\begin{align}(a)_n&=(a;q)_n=(1-a)(1-aq)\cdots(1-aq^{n-1})\, ,\\[1.5ex] (a)_\infty&=(a;q)_\infty=\lim_{n\rightarrow \infty}(a;q)_n\, ,\\[1ex] (a)_0&=1\, ,\\[1ex]{n\brack m}_q&=\begin{cases}(q)_n(q)_m^{-1}(q)_{n-m}^{-1} & 0\le m\le n ,\\[1ex] 0 & \text{otherwise.}\end{cases}\end{align}$$
Theorem 1.
If $|q|\lt 1,\, |t|\lt 1$ then
Proof.
Write
$$F(t)= \prod_{n=0}^{\infty}\frac{1-atq^n}{1-tq^n}=\sum_{n=0}^{\infty}A_nt^n\, .$$
Then $A_n$ exists because the infinite product is uniformly convergent for fixed $a$ and $q$ inside $|t|\le1-\varepsilon$ this defines a function of the analytic inside $|t|\lt 1$.
Write
$$\begin{align}(1-t)F(t)&=(1-at)\prod_{n=1}^{\infty}\frac{1-atq^n}{1-tq^n}\\[1ex] &=(1-at)\prod_{n=0}^{\infty}\frac{1-atq^{n+1}}{1-tq^{n+1}}\\[1ex] &=(1-at)F(at)\, .\end{align}$$
We can express this as
$$(1-t)\sum_{n=0}^{\infty}A_nt^n=(1-aq)\sum_{n=0}^{\infty}A_n(tq)^n\, ,$$
then comparing coefficients of $t^n$
$$A_n-A_{n-1}=A_nq^n-A_{n-1}aq^{n-1}\, .$$
Rearranging this
$$A_n=\frac{(1-aq^{n-1})}{(1-q^n)}A_{n-1}\, ,$$
then iterating this, using $A_0=F(0)=1$
$$\begin{align}A_n&=\frac{(1-aq^{n-1})(1-aq^{n-2})\cdots(1-a)}{(1-q^n)(1-q^{n-1})\cdots(1-q)}A_0\\[1ex] &=\frac{(a)_n}{(q)_n}\end{align}$$
which proves the theorem. $\qquad\blacksquare$
By setting $a=0$ in $(1)$ we obtain
$$\prod_{n=0}^{\infty}(1-tq^n)^{-1}=1+\sum_{n=1}^{\infty}\frac{t^n}{(1-q)(1-q^2)\cdots(1-q^n)}\tag{1$^*$}$$
Theorem 2.
Proof.
In order to show $(2)$ we need to use $(1^*)$.
Call $f(m)=\sum_{r=0}^{m}(-1)^r{m\brack r}_q$, then
$$\begin{align}\sum_{m=0}^\infty \frac{f(m)z^m}{(q)_m}&=\sum_{m=0}^\infty\sum_{r=0}^{m}(-1)^r\frac{z^m}{(q)_r(q)_{m-r}}\\[1ex] &=\sum_{r=0}^\infty\sum_{m=r}^{\infty}(-1)^r\frac{z^m}{(q)_r(q)_{m-r}}\\[1ex] &=\sum_{r=0}^\infty\sum_{m=0}^{\infty}(-1)^r\frac{z^{m+r}}{(q)_r(q)_{m}}\\[1ex] &=\sum_{r=0}^\infty(-1)^r\frac{z^{r}}{(q)_r}\sum_{m=0}^{\infty}\frac{z^{m}}{(q)_{m}}\\[1ex] &=(-z)_{\infty}^{-1}(z)_{\infty}^{-1}\tag{by $1^*$}\\[1ex] &=(z^2;q^2)_{\infty}^{-1}\\[1ex] &=\sum_{n=0}^{\infty}\frac{z^{2n}}{(q^2;q^2)_n}\tag{by $1^*$}.\end{align}$$
Then $(2)$ follows by comparing coefficients of $z^m$ in the extremes of the above equations since $(q;q^2)_n=(q)_{2n}/(q^2;q^2)_n$. $\qquad\blacksquare$