Clausal Form in Deductive Databases
In clausal form, the formula is made up of a number of clauses, where each clause is composed of a number of literals connected by OR logical connectives only.
A formula can have the following quantifiers:
- Universal quantifier –
It can be understood as – “For all x, P(x) holds”, meaning P(x) is true for every object x in the universe.
Example: All trucks has wheels.
- Existential quantifier –
It can be understood as – “There exists an x such that P(x)”, meaning P(x) is true for at least one object x of the universe.
Example: Someone cares for you.
A clausal form formula must be transformed into another formula with the following characteristics :
- All variables in the formula are universally quantified. Hence, it is not necessary to include the universal quantifiers explicitly for all. The quantifiers are removed, and all variables in the formula are implicitly quantified by the universal quantifier.
- As the formula is made up of a number of clauses, and each clause is composed of a number of literals connected by OR logical connectives only. Hence, each clause is a disjunction of literals.
- To form a formula, the clauses themselves are connected by AND logical connectives only. Hence, clausal form of a formula is a conjunction of clauses.
Any formula can be converted into clausal form.
Literals can be positive literals or negative literals. For the forms of the individual clauses where each of is a disjunction of literals. For the clause form:
NOT(P1) OR NOT(P2) OR ..... OR NOT(Pn) OR Q1 OR Q2 OR ..... OR Qm
The above clause has n negative literals and m positive literals. This clause can be transformed into the following equivalent logical formula:
P1 AND P2 AND ..... AND Pn => Q1 OR Q2 OR ..... OR Qm
where ‘=>’ is the implies symbol.
If all the p literals (i = 1, 2, …, ) are true, the 2nd formula is true only if at least one of the Q’s is true, which is the meaning of the (implies) symbol. For 1st formula, if all the P literals (i = 1, 2, …, n) are true, their negations are all false; so in this case it is true only if at least one of the Q’s is true.
Thus the above two formulas are equivalent, hence their truth values are always the same.