I know that ∀xG(a,x) is not true in the general case where the only premise given is ∃xG(a,x), but using the rules for predicate logic in natural deduction, I've managed to deduce ∃xG(a,x) ⊨ ∀xG(a,x) anyway, but I'm unable to see the flaw(s) in my proof. The proof is:
1 ∃xG(a,x) premise
2 x0: G(a,x0) [x/x0] assumption
x0:
3 G(a,x0) [x/x0] Copy 2
4 ∀xG(a,x) ∀x i 3-3
5 ∀xG(a,x) ∃x e 1,2-4
Where am I deducing things incorrectly?
The wrong step in the purported derivation of $\exists x G(a,x) \vdash \forall x G(a,x)$ is the "generalization" used in deriving 4 from 3.
In Natural Deductin the $\forall$I rule: $φ(x)⊢∀xφ(x)$ [or: if $\Gamma \vdash φ[a/x]$, then $\Gamma ⊢ ∀xφ(x)$] has the essential proviso: provided that $x$ is not free in any assumption.
In your derivation, $G(a,x)$ is assumed in step 2 and we cannot apply $\forall$I to derive $∀xG(a,x)$.
Regarding the use of $\exists$E in step 2, it is correct; in Natural Deduction the $∃$E rule licenses the derivation of $ψ$ from $∃xφ(x)$ assuming $φ[a/x]$, provided that $y$ is not free in any other assumption nor in $ψ$.