I am following the book Propositional and Predicate Calculus: A Model of Argument by Derek Goldrei, which includes a proof of the deduction theorem, first for propositional logic and then outlines a proof for predicate logic based on the proof for propositional logic. I do not see how (parts of) the proof for prop. logic works also for predicate logic.
The proof (for prop. logic) inductively shows that if $\Gamma, \phi \vdash \psi$ has a derivation $\psi_1,\dots,\psi_n = \psi$ under $\Gamma, \phi$, then we also have $\Gamma \vdash (\phi \rightarrow \psi_i)$ for $i = 1,\dots,n$. The inductive step involves "gluing" together different derivations to obtain the required derivation to complete the proof (see picture below for details).
The book later states that proving the deduction theorem for predicate calculus doesn't require much more and the prop. logic proof is most of the work required with an extended argument needed to cover Generalization as an inference rule.
Question: In predicate calculus, because of the Thinning Rule, $\Gamma \vdash \phi$ is defined by the book as there existing some $\Gamma_0 \subseteq \Gamma $ such that there exists a derivation (using certain Axioms, Modus Ponens and Generalization for variables not occurring free in any formula in the set of hypotheses) of $\phi$ under the hypotheses $\Gamma_0$. Because of this definition, how can we glue together two different derivations under $\Gamma$? What if one of the derivations involves Generalization which isn't valid unless one makes the set of hypotheses "smaller", i.e. work under $\Gamma_0$ rather than $\Gamma$.
I may be misunderstanding some definition here. If that is the case, please let me know. Thank you.
Inductive step in proof of deduction theorem for prop. logic: