I encountered several times with the term of natural variables but I'm not sure I totally understand what does that mean. For example, in Hamiltonian mechanics we calculate the differential of the hamiltonian and see that $$d\mathcal{H}=\sum_i (\frac{\partial{\mathcal{H}}}{\partial{q_i}}\cdot dq_i+\frac{\partial{\mathcal{H}}}{\partial{p_i}}\cdot dp_i)+\frac{\partial{\mathcal{H}}}{\partial{t}}\cdot dt$$
so we say that the natural variables of the hamiltonian are $\{q_i,p_i\}$. Another example taken from thermodynamics is the helmholtz free energy. Again, the same calculation of it's differential gives: $$dF=-SdT-PdV$$
and so we say that the natural variables of the helmholtz free energy are $T$ and $V$ (disregarding the number of paricles). What exactly is the mathematical meaning of these natural variables and does it have a mathematical formal definition? does it relate to independence of these variables?