We use Hilbert-style systems. Let $\mathrm{Ax}$ be the set of all logic axioms (tautologies and quantifer axioms). Then for any formula $P$ where there's a free variable $x$, we have $\mathrm{Ax} \cup \{P\} \vdash \forall x(P)$ (using UG) and $\mathrm{Ax} \cup \{\forall x(P)\} \vdash P$ (using Specification Axiom, Q1 in this page). Then from deduction theorem and biconditional introduction we have $\mathrm{Ax} \vdash P \leftrightarrow \forall x(P)$.
Then consider tautology $(Q \leftrightarrow R) \to (\lnot Q \leftrightarrow \lnot R)$, substituting $P$ and $\forall x P$ into $Q$ and $R$ respectively, we get $$\mathrm{Ax} \vdash (P \leftrightarrow \forall xP) \to (\lnot P \leftrightarrow \lnot \forall x P),$$ and again from deduction theorem, we have $\mathrm{Ax} \vdash (\lnot P \leftrightarrow \lnot \forall x P)$. Next, take any forumula $T$ with a free variable $x$ and let $P = \lnot T$, we have $$\mathrm{Ax} \vdash (\lnot \lnot T \leftrightarrow \lnot \forall x \lnot T).$$ Since $\lnot \lnot T$ is equivalent to $T$ and $\lnot \forall x (\lnot T)$ is equivalent to $\exists x (T)$, we have $$\mathrm{Ax} \vdash (T \leftrightarrow \exists x T).$$ However, this conclusion is obviously wrong. Where does the error occur in the deduction above?