I have a following sentence:
$$\forall x~(Fx \to \forall y~(Fy \to Gy)) ~\vdash~ \forall x~(Fx \to Gx) $$
Why I cannot use UI twice and get:
$$Fa \rightarrow (Fa \rightarrow Ga) $$
This is my proof:
1) $\forall x~(Fx \to \forall y~(Fy \to Gy))$
$\quad$2) $Fa \to (Fa \to Ga)$
$\qquad$3) $Fa$ (Assumption)
$\qquad$4) $Ga$ (From 2,3)
$\quad$5) $Fa \to Ga$
6) $\forall x~(Fx \to Gx) $
And the second line was marked as the wrong one by somehow.
Thanks in advance.
UI allows us to deduce $\phi$ from $(\forall x)(\phi)$ and nothing more.
In your case, it seems like you have tried to deduce $Fa\to \phi$ from $Fa\to (\forall y)(\phi)$ with a single application of UI. This is an invalid use of UI.