Show that $\frac{1}{(-q,q)_\infty}=(q,q^2)_\infty$ Show that $\frac{1}{(-q,q)_\infty}=(q,q^2)_\infty$
I found the following proof:
$\frac{1}{(-q,q)_\infty}=\frac{(1-q)(1-q^2)\cdots}{(1-q^2)(1-q^4)\cdots}=(q,q^2)_\infty$
However, this seems to lack formality since I am treating the infinite product as something that can  "cancel out" infinitely. I feel like I would have to make this argument for the partial product, but this method no longer works. Is there a way to formalize what I did here?
 A: We know the infinite product
\begin{align*}
(a,q)_{\infty}:=\prod_{k=0}^\infty\left(1-aq^k\right)
\end{align*}
is analytic in the interior of the unit disc which implies it can be expanded as convergent power series at the origin for $|q|<1$.
We show the following is valid:
\begin{align*}
\color{blue}{\frac{1}{(-q,q)_{\infty}}=\left(q,q^2\right)_{\infty}}\tag{1}
\end{align*}

We obtain for $|q|<1$:
\begin{align*}
\color{blue}{\frac{1}{(-q,q)_{\infty}}}&=\frac{(q,q)_{\infty}}{(-q,q)_{\infty}(q,q)_{\infty}}\\
&=\frac{\prod_{j=0}^\infty\left(1-q^{j+1}\right)}{\prod_{k=0}^\infty\left(1+q^{k+1}\right)\prod_{l=0}^\infty\left(1-q^{l+1}\right)}\\
&=\frac{\prod_{j=0}^\infty\left(1-q^{j+1}\right)}{\prod_{k=0}^\infty\left(1-q^{2k+2}\right)}\tag{2}\\
&=\frac{\lim_{N\to\infty}\prod_{j=0}^{2N+1}\left(1-q^{j+1}\right)}{\lim_{{M}\to\infty}\prod_{k=0}^M\left(1-q^{2k+2}\right)}\tag{3}\\
&=\lim_{N\to\infty}\frac{\prod_{j=0}^{2N+1}\left(1-q^{j+1}\right)}{\prod_{k=0}^{N}\left(1-q^{2k+2}\right)}\tag{4}\\
&=\lim_{N\to\infty}\prod_{j=0}^{N}\left(1-q^{2j+1}\right)\tag{5}\\
&=\prod_{j=0}^{\infty}\left(1-q^{2j+1}\right)\\
&\,\,\color{blue}{=(q,q^2)_{\infty}}
\end{align*}
and the claim (1) follows.

Comment:

*

*In (2) we use $\left(1-q^{j+1}\right)\left(1+q^{j+1}\right)=\left(1-q^{2j+2}\right)$ and multiply two convergent infinite products.


*In (3) we use the definition of the infinite product as limit of a sequence of finite products. This notation is admissible, since none of the factors is zero. Note, we conveniently set upper limits which is useful in the next steps.


*In (4) we use one single limit instead of two limits which can be shown by recalling the $\varepsilon$ definition of the limits.


*In (5) we cancel factors with even powers of $q$.
A: Note that $$(-q,q)_\infty=\prod_{k=0}^\infty(1+q^{k+1})=\prod_{k=0}^\infty\frac{1-q^{2k+2}}{1-q^{k+1}}$$ and $$(q,q^2)_\infty=\prod_{k=0}^\infty(1-q^{2k+1})$$ so $$(-q,q)_\infty(q,q^2)_\infty=\prod_{k=0}^\infty\frac{(1-q^{2k+2})(1-q^{2k+1})}{1-q^{k+1}}=\prod_{j=0}^\infty\frac{1-q^{j+1}}{1-q^{j+1}}=1.$$
A: The simplest way to formalize seems to use
the idea of
formal power series. Suppose we have a sequence $\,a_n\,$
of formal powers series where $\,a_n = O(x^{n+1}).\,$ For an
example, suppose $\,a_n = q^n.\,$ Then the
sum $\,\sum_{n=1}^\infty a_n\,$ is a well-defined formal
power series. That is, the sum converges in the natural
topology of formal power series (See my note at the end).
Define another sequence
$\, b_n := a_n - a_{2n} = O(x^{n+1}).\,$
Then the sum $\,\sum_{n=1}^\infty b_n = \sum_{k=1}^\infty
a_{2k-1}\,$ is a well-defined formal power series for the
same reason. The $\,a_{2n}\,$ get subtracted out and what
is left are the odd indexed terms. More
precisely, $$ \sum_{k=1}^n b_k =
\sum_{k=1}^n a_k - 
\sum_{k=1}^{\lfloor n/2\rfloor} a_{2k}
+ O(x^{n+1}). $$
In the case of infinite products of formal power series,
where we have $\,a_n = 1-q^n\,$, and
$\,b_n = \frac{(1-q^n)}{(1-q^{2n})},\,$
we can take logarithms and the previous reasoning applies.
For the case of convergent complex power
series, use similar reasoning
to prove convergence. The
proof is essentially the same, but the  details are a bit more involved.

NOTE: the Wikipedia article states

In mathematics, a formal power series is a generalization of a polynomial, where the number of terms is allowed to be infinite, with no requirements of convergence.

The emphasis is my own, but this is not strictly true.
Later it states

The topology has the useful property that an infinite summation converges if and only if the sequence of its terms converges to $0$, which just means that any fixed power of $X$ occurs in only finitely many terms.

Thus, there is a natural topology on formal powers series which
makes them into convergent series in that topology.
