I am aware of two definitions of canonical transformations which I state below.
Definition $1$ We go from old set of $\{q_i,p_i,t\}$ of $2n$ phase space variables to a new set $\{Q(q_i,p_i,t),P(q_i,p_i,t),t\}$ of $2n$ phase space variables such that the determinant of the Jacobian of the transformation is $+1$ and the functional form of the old hamiltonian $H(q,p,t)$ changes to new hamiltonian $K(Q_i,P_i,t)$ but Hamilton's equations in the new variables remain preserved in form $\dot Q_i=\frac{\partial K}{\partial P_i},~ \dot P_i=-\frac{\partial K}{\partial Q_i}$.
Definition $2$ We go from old set $\{q_i,p_i,t\}$ of $2n$ phase space variables to a new set $\{Q(q_i,p_i,t),P(q_i,p_i,t),t\}$ of $2n$ phase space variables such that the the determinant of the Jacobian of the transformation is $=+1$ and the funadamental Poisson bracket relations remain unchanged i.e.$\{Q_i,P_j\}=\delta_{ij};~\{Q_i,Q_j\}=\{P_i,P_j\}=0.$
- Are these two definitions related? I mean, does 1 imply 2 and 2 imply 1? How to show/see this, if true?