Time-independent canonical transformations Lie's criterion tells us that $(q,p) \to (Q,P)$ is a canonical transformation, for a system with Hamiltonian $H$ and "Kamiltonian" $K$, if and only if the identity
$$\sum_k p_k dq_k -Hdt = \sum_k P_k dQ_k - Kdt + dF  \tag{1}$$ is satisfied,
where $F$ is a suitable generating function. All textbooks I have consulted so far tell me that if the transformation is time independent, i.e. 
$$\frac{\partial Q_k}{\partial t} = \frac{\partial P_k}{\partial t} = 0, \quad \forall k, \tag{2}$$
then we may choose $F$ such that $$\frac{\partial F}{\partial t} =0, \quad \text{and thus} \quad K = H. \tag{3}$$
However, I have not yet found a thorough explanation of why exactly this should be the case, and I'm having a hard time determining the necessary steps – which I nevertheless expect to be very trivial. How can this be justified?

EDIT: After pondering on both answers some time, I might have found a proof that $K = H$.
Take $F = F_2(q,P,t)$ as generating function (second type): then for $ k = 1,\dots,n$
$$\begin{cases}
p_k = \dfrac{\partial F}{\partial q_k}, \\
Q_k = \dfrac{\partial F}{\partial P_k}, \\
K = H + \dfrac{\partial F}{\partial t}.
\end{cases} $$
Differentiating the last relation w.r.t. $P_k$ for some $k$ and applying Schwarz's lemma yields
$$\frac{\partial^2 F}{\partial P_k \partial t} = \frac{\partial K}{\partial P_k} - \frac{\partial H}{\partial P_k} = \frac{\partial^2 F}{\partial t \partial P_k } = \frac{\partial Q_k}{\partial t} = 0  $$
so we get
$$\frac{\partial K}{\partial P_k} = \frac{\partial H}{\partial P_k}. \tag4 $$
By similar arguments, using the generating function $\tilde F = F_3(p,Q,t)$, one obtains the similar identity
$$ \frac{\partial K}{\partial Q_k} = \frac{\partial H}{\partial Q_k}. \tag{5} $$
Integrating $(4)$ and applying the FTC we obtain
$$\int \frac{\partial K}{\partial P_k} dP_k = \int \frac{\partial H}{\partial P_k} dP_k  \quad \implies K = H + c(Q,t), \tag{6} $$
where we have iterated the integration over $P_k$ for all $k = 1,\dots,n$ in order to completely remove the dependency of $c$ from $P$. Differentiating $(6)$ w.r.t. $Q_k$ yields
$$\frac{\partial K}{\partial Q_k} = \frac{\partial H}{\partial Q_k} + \frac{\partial c}{\partial Q_k}, $$
which, by comparison with $(5)$, implies
$$\frac{\partial c}{\partial Q_k} = 0 \quad \forall k, \quad \implies \quad c = c(t). $$
By the "third" (or $(2n+1)$-th) relation for $F$,
$$\frac{\partial F}{\partial t} = c(t), $$
so that
$$F(q,P,t) = \Phi(t) + C(q,P),$$
where $\Phi$ is such that $d\Phi/dt = c$. However, by the variational principle, the $F$ had to be chosen such that $\delta F|_{t_1}^{t_2} = 0$, for two consecutive times $t_1 < t_2$, hence we must have
$$\delta F|_{t_1}^{t_2} = \delta \Phi|_{t_1}^{t_2} + \delta C|_{t_1}^{t_2} = \delta \Phi|_{t_1}^{t_2} = 0 $$
One such choice of $\Phi$ is the identically vanishing function; in other words, the new function $\hat F = F - \Phi$ generates the same canonical transformation as $F$ (which may be seen by differentiating $\hat F$ w.r.t. $q_k$ and $P_k$). This completes the proof.
 A: The key observation is that the function $F$ is defined up to a differentiable function of $t$ alone. That's because, if $F$ satisfies the Lie condition, then
$$\delta\int[P\dot Q - K]\operatorname dt = \delta\int[p\dot q - H - \dot F - \phi]\operatorname dt=\delta\int[p\dot q - H]\operatorname dt - \delta\int[\dot F + \phi]\operatorname dt$$
which equals zero whenever $\phi$ is a function of $t$ alone (the second term is the variation of a constant).
For concreteness, assume that we have $F=F(q,Q,t)$. Since the transformation is time-independent, we have
$$\partial_Q\partial_tF=-\partial_tP=0$$
and
$$\partial_q\partial_tF=\partial_tp=0$$
Therefore there are functions $f(Q,t)$ and $g(q,t)$ such that $\partial_t F = f = g$. This is only possible if $f$ and $g$ depend only on $t$. We then find that $F$ has the structure
$$F(q,Q,t) = \Phi(t) + F'(q,Q).$$
By the assumptions on $F$, $\Phi$ is the primitive of a function $\phi$, and for the previous argument, we can forget about it, effectively reaching to the conclusion that $F$ can be chosen so that $\partial_t F=0$.
A: OP is essentially asking the following question. 

For a given canonical transformation (CT) $z=(q,p)\to Z=(Q,P)$ without explicit time-dependence [and given$^1$ a Hamiltonian $H(z,t)$ and a Kamiltonian $K(Z,t)$] that satisfy the Lie criterion (1), how do we know that there locally exists a generating function $F$ without explicit time dependence? 

That's a good question. The only (somewhat cumbersome) proof I know uses the fact that we may assume that the generating function $F$ (modulo terms quadratic in $z^I$ and $Z^J$) is locally a generating function $F_a$ for a CT of type $a$, which only depends on half the old variables $z^I$ and half the new variable $Z^J$ and time $t$. Lie's criterion (1) then becomes $2n$ conditions and $K-H=\frac{\partial F_a}{\partial t}$. One may use these $2n$ conditions together with OP's eq. (2) to show that the only allowed $t$-dependence in the generating function $F_a$ must be confined to a term that only depends on time $t$ and nothing else. Such term may be dropped (cf. footnote 1), so that $F_a$ (and $F$) does not depend explicitly on time $t$ and hence the Kamiltonian $K(Z,t)=H(z,t)$ becomes just the old Hamiltonian in new variables. $\Box$
--
$^1$ Since Kamilton's equations are invariant if we add a term to $K$ that only depends on time $t$ and nothing else, we will allow such redefinitions of the given $K$. This freedom will be needed in the proof.
