The $\forall I$ rule in Val Dalen's Logic and Structure is $\def\f{\varphi}$
$$\frac{\f(x)}{\forall x \f(x)}$$
where $x$ does not appear free on any hypothesis on which $\f(x)$ depends. As an explanation for this restruction, the author shows that if the restriction was removed we could argue as follows:
which is obviously incorrect. As he explains, the $\forall$ introduction at the first step was illegal. What confuses me here is that I thought
$$\vdash \f(x) \ \ \ \ \text{ if and only if } \vdash \forall x \f(x)$$
for any $\f$ with free $x$. I even thought to have proven it. Therefore, the first step in Van Dalen's erroneous proof would be valid, and so would the erroneous argument as a whole.
What am I missing?
The current post is different from this one as I'm presently concerned with the erroneous derivation in the text. In particular, I'm wondering why the first step of the derivation is consistent with the result
$$\vdash \f(x) \ \ \ \ \text{ if and only if } \vdash \forall x \f(x).$$
