Propositional Logic

Entailment, derivation

KB={ϕ1,...,ϕn}KB=\{\phi_1, ..., \phi_n\}

KBψKB \models \psi, or KBKB entails ψ\psi     \iff every model of KBKB is a model of ψ\psi. To check entailment we need to check that KB{¬ψ}KB \cup \{\neg \psi\} is unsatisfiable, which means that we can derive false from it:

KB{¬ψ}KB \cup \{\neg \psi\} \models \bot

KBψKB \vdash \psi, or ψ\psi is derived from KBKB     \iff ψ\psi can be obtained from KBKB via an inference algorithm. To check derivation we need to use calculus rules.

Given KBKB and ψ\psi, assess if KBψKB \models \psi. This is done via model checking, which is just a check performed with truth tables or via DPLL. A different approach is logic inference theorem proving (synctactical proof), which works by applying inference rules.

DPLL Algorithm

Model checking via backtracking search algorithm. It uses CNF formulas representation, in particular we start by looking for pure symbols, that are symbols for which the following constraint holds true: . A pure symbol can be assumed to be true when applying DPLL. If for example we have egReg R in our domain, then we can assume that R=R=\bot .

Even simpler the case in which we have unit clauses, which are clauses which are made up of just one literal. We start simplifying clauses from them, and then we continue by reducing clauses to pure clauses by applying FOL rules.

If we do not have neither pure symbols, nor unit clauses, we need to try some possible values. This is done by branching, which consists of assuming that a symbol has a certain value, and checking if we can find a valuation that is true for all formulas. If we find at least a false, then we need to try another branch, until we try every possible value (true or false) for every possible symbol.

Resolution calculus

Resolution is similar to DPLL (when this is used to establish entailment): it starts from a CNF representation of the premises and the negation of the conclusion.

Forward chaining

Considers definite clauses and applies Modus Ponens to generate new facts:

MP: and , infer YY.

Graphical example:

![Schermata 2022-02-16 alle 19.12.44](assets/Schermata 2022-02-16 alle 19.12.44.png)

Backward chaining

Same, but in reverse (we start building the graph from the top, which is the goal). Example:

Schermata 2022-02-16 alle 19.13.45

![Schermata 2022-02-16 alle 19.13.58](assets/Schermata 2022-02-16 alle 19.13.58.png)

Last updated