There are a few proofs in which the technique is to expand the product of some formal polynomials in $\mathbb{R}[x_1,x_2,\ldots,x_k]$ in more than one distinct way and then we can match up the coefficients. By formal, I mean that $x$ does not actually represent a number like in analysis, but it exists for algebraic book-keeping purposes. Some examples are:
- A proof of the Vandermonde identity
- A proof of the weakest variant of Wolstenholme's theorem
- Nathan Fine's proof of Lucas's theorem
Generally, these arguments use one of the following two facts for a polynomial $P$: \begin{align*} P^{ab}&=\left(P^{a}\right)^b,\\ P^{a+b}&= P^{a}P^{b}, \end{align*} though I am sure that there are other ways of expanding in two different ways. How do we know that coefficients can be matched up in this way?
I tried to prove it but I could not even formulate the general problem precisely. I suspect that this is a theorem in ring theory that is skipped over in most courses because of its techincal nature. Or perhaps this is a trivial issue, but I don't know. A proof or a reference would be appreciated.