Say I have a first-order logic formula given like this one:
$$ \forall x \exists y ( (\forall z \ P(x,z) \land Q(x,y) ) \lor (\exists g \ G( (f(x),g) )$$
Now I am interested in creating the prenex-form, which is just pulling the quantifiers from the "local scope" in to the "global scope".
Now to my problem: How do I pull out the quantifiers to the front.
In what order do I pull out the quantifiers and where do they go with respect to the existing quantifiers ?
My current understanding is that the quantifers get pushed to the right side of the preexisting quantifiers.
Also since the variables from the quantifiers are not free in any predicates I can write the above formula like this:
$$ \forall x \exists y \forall z \exists g( P(x,z) \land Q(x,y) ) \lor G( f(x),g) )$$
Is my undestanding correct ?