In predicate calculus, one of the logical axioms is given like:
Let $p,q$ be any formulae in predicate calculus and variable $x$ is not free in $p$ (or doesn't occur), then the formula below is an axiom: $$ \forall x(p\to q)\to (p\to \forall x q). $$
I'm wondering if the formula below is a theorem, given $x$ does not occur in $p$: $$ (p\to \forall x q)\to \forall x(p\to q). $$
MY PROGRESS
I tried these steps of inference:
$p\to \forall x q$
$\forall x q\to q$$\qquad$(Predicate axiom)
$(s\to t)\wedge (t\to u)\to (s\to u)$$\qquad$(Tautology)
$p\to q$$\qquad$(By 1. and 2.)
$\forall x(p\to q)$$\qquad$(Generalization)
But I can't show these steps are correct, especially step 2. and 4.
The converse of the axiom is a theorem and the proof is correct.
I am accustomed to the system given in John Kelly's The Essence of Logic:
Instead of the 3rd line, Kelly employs a derived rule called transitivity of implication (TI) (proved in the chapter on propositional calculus):