deduction theorem holds for first order logic
In this entry, we show that the deduction theorem holds for first order logic. Actually, depending on the axiom systems, some modifications to the deduction theorem^{} may be necessary. If we use the system given in the beginning of this entry (http://planetmath.org/AxiomSystemForFirstOrderLogic), no modifications are necessary, and the proof is mutatis mutandis the same as the one for propositional logic^{}. However, if we instead use the system given in the remark of that entry, the deduction theorem needs to be revised. For convenience, we briefly state the axiom system here:

1.
tautologies^{}

2.
$\forall xA\to A[a/x]$, where $x\in V$, $a\in V(\mathrm{\Sigma})$, and $a$ is free for $x$ in $A$

3.
$\forall x(A\to B)\to (A\to \forall xB)$, where $x\in V$ is not free in $A$
with modus ponens^{} and generalization as inference rules. A deduction^{} of a wff $A$ from a set $\mathrm{\Delta}$ is a finite sequence^{} of wff’s, where each wff is either an axiom, an element of $\mathrm{\Delta}$, or the result of an application of an inference rule.
Theorem 1.
(Modified Deduction Theorem). If $\mathrm{\Delta}\mathrm{,}A\mathrm{\u22a2}B$, then $\mathrm{\Delta}\mathrm{\u22a2}A\mathrm{\to}B$, provided that there is a deduction $\mathrm{E}$ of $B$ from $\mathrm{\Delta}\mathrm{\cup}\mathrm{\{}A\mathrm{\}}$ that contains no applications of universal generalization
A big portion of the proof is the same as the one given for the deduction theorem for propositional logic, namely, the cases that $B$ is an axiom, an element of $\mathrm{\Delta}$, or as the result of an application of modus ponens. We will not repeat the proof here, but refer the reader to this entry (http://planetmath.org/DeductionTheoremHoldsForClassicalPropositionalLogic) for that. In this entry, we will concentrate on the proof of the last case: when $B$ is the result of an application of universal generalization.
Proof.
Let us first rephrase the conditions in the theorem^{}. We are given a deduction $\mathcal{E}$ of $B$ from $\mathrm{\Delta}\cup \{A\}$, that is, sequence of wff’s
$${A}_{1},\mathrm{\dots},{A}_{n}$$ 
such that if ${A}_{i}$ is $\forall x{A}_{j}$ (where $$), then either

•
the variable $x$ is not free in $A$, or

•
the deduction of ${A}_{j}$ in the sequence ${A}_{1},\mathrm{\dots},{A}_{j}$ does not contain $A$
As mentioned, we assume that $B$ is $\forall x{A}_{k}$, where ${A}_{k}$ is in $\mathcal{E}$.
We induct on the length $n$ of $\mathcal{E}$. By the assumption on $B$, $n$ is at least $2$. If $n=2$, then $\mathcal{E}$ is
$${A}_{1},\forall x{A}_{1}.$$ 
Then ${A}_{1}$ is either an axiom, or an element of $\mathrm{\Delta}\cup \{A\}$. Furthermore, $x$ does not occur free in ${A}_{1}$. If ${A}_{1}$ is either an axiom or in $\mathrm{\Delta}$, then
$${A}_{1},\forall x{A}_{1},\forall x{A}_{1}\to (A\to \forall x{A}_{1}),A\to \forall x{A}_{1}$$  (1) 
is a deduction of $A\to B$ from $\mathrm{\Delta}$. If ${A}_{1}$ is $A$, then
$$\mathrm{\cdots},A\to A,\forall x(A\to A),\forall x(A\to A)\to (A\to \forall xA),A\to \forall xA$$  (2) 
is a deduction of $A\to B$ from $\mathrm{\Delta}$, where $\mathrm{\cdots},A\to A$ is a deduction of the tautology $A\to A$ (see here (http://planetmath.org/AxiomSystemForPropositionalLogic)).
Now assume the length of $\mathcal{E}$ is $n>2$. Furthermore, we may assume that it has the form
$${A}_{1},\mathrm{\dots},{A}_{n1},\forall x{A}_{n1}$$ 
from $\mathrm{\Delta}\cup \{A\}$. Then none of ${A}_{1},\mathrm{\dots},{A}_{n1}$ contain $x$ free. Now, let us look at the conditions above:

•
$x$ is not free in $A$. As ${A}_{1},\mathrm{\dots},{A}_{n1}$ is a deduction of ${A}_{n1}$ of length $n1$, by induction^{}, there is a deduction of
$${B}_{1},\mathrm{\dots},{B}_{m}$$ of $A\to {A}_{n1}$ from $\mathrm{\Delta}$. Since $x$ does not occur free in $A$,
$${B}_{1},\mathrm{\dots},{B}_{m},\forall x(A\to {A}_{n1}),\forall x(A\to {A}_{n1})\to (A\to \forall x{A}_{n1}),A\to \forall x{A}_{n1}$$ (3) is a deduction of $A\to \forall x{A}_{n1}$.

•
the deduction of ${A}_{j}$ in the sequence ${A}_{1},\mathrm{\dots},{A}_{j}$ does not contain $A$. Let
$${B}_{1},\mathrm{\dots},{B}_{m}$$ be this deduction of ${A}_{j}$ in $\mathcal{E}$. Then
$${B}_{1},\mathrm{\dots},{B}_{m},\forall x{A}_{n1},\forall x{A}_{n1}\to (A\to \forall x{A}_{n1}),A\to \forall x{A}_{n1}$$ (4) is a deduction of $A\to \forall x{A}_{n1}$.
In both cases, since $A$ does not occur in the deduction, $\mathrm{\Delta}\u22a2A\to B$. ∎
Note that the last three steps of deductions $(1)$ and $(4)$ use generalization, the axiom schema^{} $A\to (B\to A)$, and modus ponens, and the last steps of deductions $(2)$ and $(3)$ use generalization, the axiom schema $\forall x(A\to B)\to (A\to \forall xB)$, and modus ponens.
As a corollary, we have
Corollary 1.
If $\mathrm{\Delta}\mathrm{,}A\mathrm{\u22a2}B$, and $A$ a sentence^{}, then $\mathrm{\Delta}\mathrm{\u22a2}A\mathrm{\to}B$.
Remark. If we want to restore the modified deduction theorem to its original version (Theorem 2 below), and we want keep the axiom system stated above, the way deductions are constructed needs to be modified. In this case, the modification is: if ${A}_{1},\mathrm{\dots},{A}_{n}$ is a deduction of $A$, and $A$ is $\forall x{A}_{i}$, the result of an application of generalization to an earlier wff ${A}_{i}$, then $x$ does not occur free in any of the wff’s in the deduction. With this change, we have the original version:
Theorem 2.
(Deduction Theorem). If $\mathrm{\Delta}\mathrm{,}A\mathrm{\u22a2}B$, then $\mathrm{\Delta}\mathrm{\u22a2}A\mathrm{\to}B$.
This is an immediate consequence of the following fact: if $B$ can be deduced with $A$ as a hypothesis^{}, then $A\to B$ can be deduced without $A$ as a hypothesis, which can be easily proved using induction.
Title  deduction theorem holds for first order logic 

Canonical name  DeductionTheoremHoldsForFirstOrderLogic 
Date of creation  20130322 19:32:31 
Last modified on  20130322 19:32:31 
Owner  CWoo (3771) 
Last modified by  CWoo (3771) 
Numerical id  26 
Author  CWoo (3771) 
Entry type  Definition 
Classification  msc 03B10 