next up previous
Next: Convert Sentences to Implicative Up: Intepreting Language in First-Order Previous: Monadic Combinator Parser For

Convert Sentences to Conjunctive Normal Form

After a raw input string has been converted to \( Sentence \), it needs to be converted into a normal form, which is also of the type \( Sentence \). However, it is much easier to make inferences using resolution in normal form (conjunctive or implicative). The following functions were impleneted to convert an arbitrary sentence into one in CNF:

This function gets rid of the \( \Rightarrow \) connective by replacing \( p\Rightarrow q \) with \( \neg p\vee q \)

Use de Morgan's law to move the \( \neg \) symbol onto atoms (not sentences), replace:

\begin{eqnarray*}
\neg (p\vee q) & becomes & \neg p\wedge \neg q\\
\neg (p\wedg...
...p & becomes & \forall \, x\, \neg p\\
\neg \neg p & becomes & p
\end{eqnarray*}



Rename variables that are quantified more than once in a sentence, eg: rename \( \exists \, x\, Q(x) \) to \( \exists y\, Q(y) \) in the original sentence \( \forall \, x\, P(x)\, \vee \, \exists \, x\, Q(x) \). This is used to avoid confusions when dropping quantifiers. (NOT implemented).

At this stage, we can safely collect all the quantifiers and move them to the left hand side of a sentence.

Eliminate \( \exists \) quantifiers by replacing the quantified variables with skolem constants or skolem functions. In addition, any \( \forall \) quantifiers on the left hand side of the sentence may be dropped because any variable left in the sentence must be universally quantified.

Perform the following convertion:

\begin{eqnarray*}
(a\wedge b)\vee c & becomes & (a\vee c)\wedge (b\vee c)\\
a\vee (b\wedge c) & becomes & (a\vee c)\wedge (b\vee c)
\end{eqnarray*}



as well as flatenning nested conjunctions and disjunctions.

This is basically the top level function that use the listed helper function as pipeline for transforming a raw sentence into one in conjunctive normal form


next up previous
Next: Convert Sentences to Implicative Up: Intepreting Language in First-Order Previous: Monadic Combinator Parser For
Charles Chiou
2001-04-29