In Wolfgang Nolting's book Theoretical Physics 2 - Analytical Mechanics, the following theorem is stated:
While the formal definition of canonical trasformation is given only several pages later in the book, here we are just assuming that both $(q,p)$ and $(Q,P)$ "refer to" an Hamiltonian function.
Now, the author argues that the following (correct) calculation is a proof of both $\{ Q_{i}, Q_{j}\}_{q,p} = 0$ and $\{ Q_{i}, P_{j}\}_{q,p} = \delta_{1j}$:
This is obtained, the author argues, by comparison. In other words, being $\dot{Q}_{i}$ the initial term, all the final bracket terms must be null except $\{ Q_{i}, P_{i}\}$.
However, I am not convinced about the validity of the conclusion. The comparison between the first and last term does not involve, say, linearly independent vectors, whereby one can simply conclude that all the coefficients of the linear combination are 0. How can this "proof" be fixed?

