I was looking through some lecture slides and I came across this page:
I understand that the equation highlighted blue (top right corner) is obtained from the Principle of Least Action. Given a generating function $F(q, Q)$, its time derivative can be expressed in terms of q and Q. Substituting dF/dt into the 'POLA equation' (please correct me with names), we get the first equation highlighted yellow.
My question is, why is it that we are able to equate components like did in the slide to get expressions for $Q$, $p$ and $K$? If its because $p$, $q$, $P$, $Q$ are independent, how will I prove that their independence?