Let $\mathcal{S}=[m]^*$ be the set of all strings on the alphabet $[m]=\{1, 2,\cdots, m\}$. Let $\Sigma\subset[m]^2$ be a set of strings of length $2$, and let $\overline{\Sigma}=[m]^2\backslash\Sigma$ be the complementary set. Let $\mathcal{G}$ (respectively $\overline{\mathcal{G}}$) be the set of all strings in $\mathcal{S}$ with the property that every substring of length $2$ belongs to $\Sigma$ (respectively $\overline{\Sigma}$). (Note that $\mathcal{G}$ and $\overline{\mathcal{G}}$ both include all strings of length $0$ or $1$.) Letting $\pi(\sigma)$ be the length of a string $\sigma\in\mathcal{S}$, define the two generating functions \begin{equation} G(x)=\sum_{\sigma\in\mathcal{G}}x^{\pi(\sigma)}\qquad\qquad \overline{G}(x)=\sum_{\sigma\in\overline{\mathcal{G}}}x^{\pi(\sigma)} \end{equation} The following identity holds: $G(x)=\overline{G}(-x)^{-1}$
A few years ago during my undergrad, I was asked to prove the above generating function identity in an assignment for a class on combinatorial enumeration. I have written out a proof of this identity below as an answer (I think that makes the most sense here, to keep this question concise). However, after I submitted this proof, I was informed that my proof was unexpected, and that there were other more intended methods to arrive at the identity.
Therefore I ask out of curiosity: What are some alternate methods of proving the above identity? (perhaps using more standard string counting generating function arguments, generalized inclusion exclusion, a combinatorial approach, or some more exotic method)
I would also be interested in seeing if/how different approaches to this problem allow for generalization of this identity. (perhaps a higher order identity of this sort exists, or perhaps one involving substrings of length greater than $2$, or one involving more general objects) I give mention one such small generalization in my answer.