# Prenex normal form

A formula of the predicate calculus is in prenex[1] normal form (PNF) if it is written as a string of quantifiers and bound variables, called the prefix, followed by a quantifier-free part, called the matrix.[2]

Every formula in classical logic is equivalent to a formula in prenex normal form. For example, if ${\displaystyle \phi (y)}$, ${\displaystyle \psi (z)}$, and ${\displaystyle \rho (x)}$ are quantifier-free formulas with the free variables shown then

${\displaystyle \forall x\exists y\forall z(\phi (y)\lor (\psi (z)\rightarrow \rho (x)))}$

is in prenex normal form with matrix ${\displaystyle \phi (y)\lor (\psi (z)\rightarrow \rho (x))}$, while

${\displaystyle \forall x((\exists y\phi (y))\lor ((\exists z\psi (z))\rightarrow \rho (x)))}$

is logically equivalent but not in prenex normal form.

## Conversion to prenex form

Every first-order formula is logically equivalent (in classical logic) to some formula in prenex normal form.[3] There are several conversion rules that can be recursively applied to convert a formula to prenex normal form. The rules depend on which logical connectives appear in the formula.

### Conjunction and disjunction

The rules for conjunction and disjunction say that

${\displaystyle (\forall x\phi )\land \psi }$ is equivalent to ${\displaystyle \forall x(\phi \land \psi )}$ under (mild) additional condition ${\displaystyle \exists x\top }$, or, equivalently, ${\displaystyle \lnot \forall x\bot }$ (meaning that at least one individual exists),
${\displaystyle (\forall x\phi )\lor \psi }$ is equivalent to ${\displaystyle \forall x(\phi \lor \psi )}$;

and

${\displaystyle (\exists x\phi )\land \psi }$ is equivalent to ${\displaystyle \exists x(\phi \land \psi )}$,
${\displaystyle (\exists x\phi )\lor \psi }$ is equivalent to ${\displaystyle \exists x(\phi \lor \psi )}$ under additional condition ${\displaystyle \exists x\top }$.

The equivalences are valid when ${\displaystyle x}$ does not appear as a free variable of ${\displaystyle \psi }$; if ${\displaystyle x}$ does appear free in ${\displaystyle \psi }$, one can rename the bound ${\displaystyle x}$ in ${\displaystyle (\exists x\phi )}$ and obtain the equivalent ${\displaystyle (\exists x'\phi [x/x'])}$.

For example, in the language of rings,

${\displaystyle (\exists x(x^{2}=1))\land (0=y)}$ is equivalent to ${\displaystyle \exists x(x^{2}=1\land 0=y)}$,

but

${\displaystyle (\exists x(x^{2}=1))\land (0=x)}$ is not equivalent to ${\displaystyle \exists x(x^{2}=1\land 0=x)}$

because the formula on the left is true in any ring when the free variable x is equal to 0, while the formula on the right has no free variables and is false in any nontrivial ring. So ${\displaystyle (\exists x(x^{2}=1))\land (0=x)}$ will be first rewritten as ${\displaystyle (\exists x'(x'^{2}=1))\land (0=x)}$ and then put in prenex normal form ${\displaystyle \exists x'(x'^{2}=1\land 0=x)}$.

### Negation

The rules for negation say that

${\displaystyle \lnot \exists x\phi }$ is equivalent to ${\displaystyle \forall x\lnot \phi }$

and

${\displaystyle \lnot \forall x\phi }$ is equivalent to ${\displaystyle \exists x\lnot \phi }$.

### Implication

There are four rules for implication: two that remove quantifiers from the antecedent and two that remove quantifiers from the consequent. These rules can be derived by rewriting the implication ${\displaystyle \phi \rightarrow \psi }$ as ${\displaystyle \lnot \phi \lor \psi }$ and applying the rules for disjunction above. As with the rules for disjunction, these rules require that the variable quantified in one subformula does not appear free in the other subformula.

The rules for removing quantifiers from the antecedent are (note the change of quantifiers):

${\displaystyle (\forall x\phi )\rightarrow \psi }$ is equivalent to ${\displaystyle \exists x(\phi \rightarrow \psi )}$,
${\displaystyle (\exists x\phi )\rightarrow \psi }$ is equivalent to ${\displaystyle \forall x(\phi \rightarrow \psi )}$.

The rules for removing quantifiers from the consequent are:

${\displaystyle \phi \rightarrow (\exists x\psi )}$ is equivalent to ${\displaystyle \exists x(\phi \rightarrow \psi )}$,
${\displaystyle \phi \rightarrow (\forall x\psi )}$ is equivalent to ${\displaystyle \forall x(\phi \rightarrow \psi )}$.

### Example

Suppose that ${\displaystyle \phi }$, ${\displaystyle \psi }$, and ${\displaystyle \rho }$ are quantifier-free formulas and no two of these formulas share any free variable. Consider the formula

${\displaystyle (\phi \lor \exists x\psi )\rightarrow \forall z\rho }$.

By recursively applying the rules starting at the innermost subformulas, the following sequence of logically equivalent formulas can be obtained:

${\displaystyle (\phi \lor \exists x\psi )\rightarrow \forall z\rho }$.
${\displaystyle (\exists x(\phi \lor \psi ))\rightarrow \forall z\rho }$,
${\displaystyle \neg (\exists x(\phi \lor \psi ))\lor \forall z\rho }$,
${\displaystyle (\forall x\neg (\phi \lor \psi ))\lor \forall z\rho }$,
${\displaystyle \forall x(\neg (\phi \lor \psi )\lor \forall z\rho )}$,
${\displaystyle \forall x((\phi \lor \psi )\rightarrow \forall z\rho )}$,
${\displaystyle \forall x(\forall z((\phi \lor \psi )\rightarrow \rho ))}$,
${\displaystyle \forall x\forall z((\phi \lor \psi )\rightarrow \rho )}$.

This is not the only prenex form equivalent to the original formula. For example, by dealing with the consequent before the antecedent in the example above, the prenex form

${\displaystyle \forall z\forall x((\phi \lor \psi )\rightarrow \rho )}$

can be obtained:

${\displaystyle \forall z((\phi \lor \exists x\psi )\rightarrow \rho )}$
${\displaystyle \forall z((\exists x(\phi \lor \psi ))\rightarrow \rho )}$,
${\displaystyle \forall z(\forall x((\phi \lor \psi )\rightarrow \rho ))}$,
${\displaystyle \forall z\forall x((\phi \lor \psi )\rightarrow \rho )}$.

### Intuitionistic logic

The rules for converting a formula to prenex form make heavy use of classical logic. In intuitionistic logic, it is not true that every formula is logically equivalent to a prenex formula. The negation connective is one obstacle, but not the only one. The implication operator is also treated differently in intuitionistic logic than classical logic; in intuitionistic logic, it is not definable using disjunction and negation.

The BHK interpretation illustrates why some formulas have no intuitionistically-equivalent prenex form. In this interpretation, a proof of

${\displaystyle (\exists x\phi )\rightarrow \exists y\psi \qquad (1)}$

is a function which, given a concrete x and a proof of ${\displaystyle \phi (x)}$, produces a concrete y and a proof of ψ(y). In this case it is allowable for the value of y to be computed from the given value of x. A proof of

${\displaystyle \exists y(\exists x\phi \rightarrow \psi ),\qquad (2)}$

on the other hand, produces a single concrete value of y and a function that converts any proof of ${\displaystyle \exists x\phi }$ into a proof of ψ(y). If each x satisfying φ can be used to construct a y satisfying ψ but no such y can be constructed without knowledge of such an x then formula (1) will not be equivalent to formula (2).

The rules for converting a formula to prenex form that do fail in intuitionistic logic are:

(1) ${\displaystyle \forall x(\phi \lor \psi )}$ implies ${\displaystyle (\forall x\phi )\lor \psi }$,
(2) ${\displaystyle \forall x(\phi \lor \psi )}$ implies ${\displaystyle \phi \lor (\forall x\psi )}$,
(3) ${\displaystyle (\forall x\phi )\rightarrow \psi }$ implies ${\displaystyle \exists x(\phi \rightarrow \psi )}$,
(4) ${\displaystyle \phi \rightarrow (\exists x\psi )}$ implies ${\displaystyle \exists x(\phi \rightarrow \psi )}$,
(5) ${\displaystyle \lnot \forall x\phi }$ implies ${\displaystyle \exists x\lnot \phi }$,

(x does not appear as a free variable of ${\displaystyle \,\psi }$ in (1) and (3); x does not appear as a free variable of ${\displaystyle \,\phi }$ in (2) and (4)).

## Use of prenex form

Some proof calculi will only deal with a theory whose formulae are written in prenex normal form. The concept is essential for developing the arithmetical hierarchy and the analytical hierarchy.

Gödel's proof of his completeness theorem for first-order logic presupposes that all formulae have been recast in prenex normal form.

Tarski's axioms for geometry is a logical system whose sentences can all be written in universal-existential form, a special case of the prenex normal form that has every universal quantifier preceding any existential quantifier, so that all sentences can be rewritten in the form ${\displaystyle \forall u}$ ${\displaystyle \forall v}$ ${\displaystyle \ldots }$ ${\displaystyle \exists a}$ ${\displaystyle \exists b}$ ${\displaystyle \phi }$, where ${\displaystyle \phi }$ is a sentence that does not contain any quantifier. This fact allowed Tarski to prove that Euclidean geometry is decidable.

## Notes

1. The term 'prenex' comes from the Latin praenexus "tied or bound up in front", past participle of praenectere (archived as of May 27, 2011 at )
2. Hinman, P. (2005), p. 110
3. Hinman, P. (2005), p. 111

## References

• Richard L. Epstein (18 December 2011). Classical Mathematical Logic: The Semantic Foundations of Logic. Princeton University Press. pp. 108–. ISBN 1-4008-4155-0.
• Peter B. Andrews (17 April 2013). An Introduction to Mathematical Logic and Type Theory: To Truth Through Proof. Springer Science & Business Media. pp. 111–. ISBN 978-94-015-9934-4.
• Elliott Mendelson (1 June 1997). Introduction to Mathematical Logic, Fourth Edition. CRC Press. pp. 109–. ISBN 978-0-412-80830-2.
• Hinman, P. (2005), Fundamentals of Mathematical Logic, A K Peters, ISBN 978-1-56881-262-5