Introduction

An interesting example for showing how we can automate the reasoning with a language where there are quantifiers, is an algorithm proposed by Mojzesz Presburger in 1929 to decide the validity of a subset of arithmetic.

Language

The language considered by Presburger has the following operators: For example ∀x. ∃y. (x+y)=0 is a formula of the language under consideration.

Such simple language allows us to also define derived operators:

Prenex form

Here, we will consider only the first steps of the Presburger algorithm that aim at reducing any formula into an equivalent one in Prenex DNF. The first operation of the algorithm consists in transforming a formula in such way to have all quantifiers at the beginning of the formula (prenex form). Such a transformation is only valid in the classical logic:

For the negation
¬(∀x. (P x)) equivalent to ∃x. (¬(P x))
¬(∃x. (P x)) equivalent to ∀x. (¬(P x))
For the implication:
(∀x. (P x)) ⇒ Q equivalent to ∃x. ((P x) ⇒ Q)
(∃x. (P x)) ⇒ Q equivalent to ∀x. ((P x) ⇒ Q)
Q ⇒(∀x. (P x)) equivalent to ∀x. (Q ⇒ (P x))
(Q ⇒ ∃x. (P x)) equivalent to ∃x. (Q ⇒ (P x))
These transformations are valid if there exists no x inside Q that is free. If such x exists, one needs to rename variables suitably. So, ∃x. ((∀x. (P x)) ⇒ (Q x)) is transformed into ∃y. ∃x. ((P x) ⇒ (Q y)) and not in ∃x. ∃x. ((P x) ⇒ (Q x)).

DNF

The second operation of the algorithm is the one that transforms the formula in prenex form into DNF (Disjunctive Normal Form), so to have first the quantifiers, then the disjunctons, then the conjuctions and finally the variables (possibly with negations).
First we expand the implications:
P ⇒ Q equivalent to ¬P ∨ Q
Second, we push down the negations:
¬(P ∨ Q) equivalent to ¬P ∧ ¬Q
¬(P ∧ Q) equivalent to ¬P ∨ ¬Q
¬(¬P) equivalent to P
Third, we pull the disjunctions before the conjunctions:
P ∧ (Q ∨ R) equivalent to (P ∧ Q) ∨ (P ∧ R)
(Q ∧ R) ∧ P equivalent to (Q ∧ P) ∨ (R ∧ P)

Exercises

*H5. Transform the formula ¬((x∨¬y)⇒z) into DNF.

*H6. Transform the formula ¬((∃x. (P x)) ⇒(∀x. (Q x))) into prenex DNF.

*H7. Transform the formula (∀x.∃y. (P x y)) ⇒(∃x. (P x x)) into prenex DNF.


Monica Nesi