Converting a formula to prenex normal form

437 Views Asked by At

I need to convert the following formula into Prenex normal form:

$ (∃z)S(z) ∧ (∃x)(∀y)\{ (∀z)[S(z) → P(y,z)] → R(x,y) \} $

Now I started by doing this:

$(∃z)S(z) ∧ (∃x)(∀y)\{ \neg(∀z)[S(z) → P(y,z)] \vee R(x,y) \} $

By using the formula $ P\rightarrow Q = \neg P \vee Q $

and then:

$(∃z)S(z) ∧ (∃x)(∀y)\{ (\exists z)[S(z) \land \neg P(y,z)] \vee R(x,y) \} $

By using the formula $\neg \forall z P = \exists z \neg P $

From here I extracted the $\exists z$

and got:

$(∃z)S(z) ∧ (∃x)(∀y)(\exists z)\{[S(z) \land \neg P(y,z)] \vee R(x,y) \} $

and now took $\exists z$ outside:

$(∃z)(∃x)(∀y)\{S(z) \land [S(z) \land \neg P(y,z)] \vee R(x,y) \} $

and now I received a prenex normal form, although this is not the answer and I do not know where have I mistaken.

Thanks for the help.