automated reasoning with propositional and predicate logics
DESCRIPTION
Automated reasoning with propositional and predicate logics. Spring 2007, Juris V īksna. Propositional logic. Propositional logic. A formal definition of propositional logic formulas:. [Adapted from M.Davis, E.Weyukerl]. Propositional logic - assignments. [Adapted from M.Davis, E.Weyukerl]. - PowerPoint PPT PresentationTRANSCRIPT
Automated reasoning with propositional and predicate logics
Spring 2007, Juris Vīksna
Propositional logic
Propositional logicA formal definition of propositional logic formulas:
[Adapted from M.Davis, E.Weyukerl]
Propositional logic - assignments
[Adapted from M.Davis, E.Weyukerl]
Propositional logicHow useful is propositional logic?
Satisfiability and tautologies
In Latvian:
satisfiable = nepretrunīgaunsatisfiable = pretrunīga
[Adapted from M.Davis, E.Weyukerl]
Some useful equivalences
[Adapted from M.Davis, E.Weyukerl]
Normal forms - DNF
Normal forms - CNF
Logical consequence
[Adapted from M.Davis, E.Weyukerl]
How it looks for CNFs/DNFs?
[Adapted from M.Davis, E.Weyukerl]
Logical consequence
Deciding (1) is much simpler for DNFsDeciding (2) is much simpler for CNFs
Unfortunately:When applying case (1) it is easy to obtain CNF, not DNF...When applying case (2) it is easy to obtain DNF, not CNF...
(This also means that CNFDNF conversion in general requires an exponential time)
Largely by following the tradition we will use case (2)
[Adapted from M.Davis, E.Weyukerl]
Conversion of formula to CNF
(III) Use distributive laws to obtain CNF[Adapted from M.Davis, E.Weyukerl]
CNF - some more simplifications
[Adapted from M.Davis, E.Weyukerl]
Thus, we currently have:
[Adapted from M.Davis, E.Weyukerl]
Some useful notation
[Adapted from M.Davis, E.Weyukerl]
Empty clauses and empty formulas
[Adapted from M.Davis, E.Weyukerl]
Yet more of notation
[Adapted from M.Davis, E.Weyukerl]
Davis-Putnam rules I
[Adapted from M.Davis, E.Weyukerl]
Davis-Putnam rules I
[Adapted from M.Davis, E.Weyukerl]
Davis-Putnam rules I
[Adapted from M.Davis, E.Weyukerl]
Davis-Putnam rules II and III
[Adapted from M.Davis, E.Weyukerl]
Davis-Putnam procedure
Use rules II, III and I (in this order of preference)[Adapted from M.Davis, E.Weyukerl]
Complexity of Davis-Putnam procedureEach step decreases the number of literals by 1 (thus for n literals there will be up to n steps)
Rules II and III do not increase the number of formulas to bechecked
Unfortunately, when only rule I applies, the number of formulasdoubles
In worst case the complexitymight be (2n)
Davis-Putnam procedure - some improvements
Resolvent
[Adapted from M.Davis, E.Weyukerl]
Notation again...
[Adapted from M.Davis, E.Weyukerl]
Resolution method
[Adapted from M.Davis, E.Weyukerl]
Resolution method
[Adapted from M.Davis, E.Weyukerl]
Ground Resolution Theorem
[Adapted from M.Davis, E.Weyukerl]
Ground Resolution Theorem
[Adapted from M.Davis, E.Weyukerl]
Finite satisfiabilityThis will be useful when we move up to predicate logic...
[Adapted from M.Davis, E.Weyukerl]
Enumeration principle
[Adapted from M.Davis, E.Weyukerl]
Finite satisfiability - some lemmas
[Adapted from M.Davis, E.Weyukerl]
Finite satisfiability - some lemmas
[Adapted from M.Davis, E.Weyukerl]
Finite satisfiability - some lemmas
Finite satisfiability - some lemmas
[Adapted from M.Davis, E.Weyukerl]
Compactness theorem
[Adapted from M.Davis, E.Weyukerl]
Predicate logicLets start with a formal definition:
[Adapted from M.Davis, E.Weyukerl]
Predicate logic - an alphabet
[Adapted from M.Davis, E.Weyukerl]
Predicate logic - terms
[Adapted from M.Davis, E.Weyukerl]
Predicate logic - formulas
[Adapted from M.Davis, E.Weyukerl]
Free and bound occurrences
[Adapted from M.Davis, E.Weyukerl]
Predicate logic - interpretations
[Adapted from M.Davis, E.Weyukerl]
Interpretations - some notation
[Adapted from M.Davis, E.Weyukerl]
Interpretations
[Adapted from M.Davis, E.Weyukerl]
Interpretations
[Adapted from M.Davis, E.Weyukerl]
Interpretations
[Adapted from M.Davis, E.Weyukerl]
Interpretations
[Adapted from M.Davis, E.Weyukerl]
Interpretations
[Adapted from M.Davis, E.Weyukerl]
Interpretations
[Adapted from M.Davis, E.Weyukerl]
Models, valid and satisfiable formulas
An interpretation I is called a model of a sentence , if I=1
An interpretation I is a model for a set of sentences, if itis a model for each of the sentences from this set
A predicate logic formula is satisfiable, if it has a model
A predicate logic formula is valid, if every it's interpretation is it's model
Logical consequence
[Adapted from M.Davis, E.Weyukerl]
Logical consequence
Looks very similar to what we had for propositional logic
A problem: What to use here instead of DNFs/CNFs?
[Adapted from M.Davis, E.Weyukerl]
Simplification of formulas
[Adapted from M.Davis, E.Weyukerl]
Simplification of formulas
[Adapted from M.Davis, E.Weyukerl]
Skolemization
[Adapted from M.Davis, E.Weyukerl]
Skolemization
[Adapted from M.Davis, E.Weyukerl]
Skolemization
[Adapted from M.Davis, E.Weyukerl]
Simplification of formulas
[Adapted from M.Davis, E.Weyukerl]
Universal sentences
[Adapted from M.Davis, E.Weyukerl]
Herbrand universe
[Adapted from M.Davis, E.Weyukerl]
Checking for satisfiabilty
Thus, we have reduced the problem of satisfiabilty of apredicate logic formula to a problem of satisfiability for a (maybe infinite) set of propositional logic formulas
Recall that by compactness theorem if a set of propositional formulas is unsatisfiable, it is also finitely unsatisfiable
[Adapted from M.Davis, E.Weyukerl]
Checking for satisfiabilty
[Adapted from M.Davis, E.Weyukerl]
Again some lemmas
[Adapted from M.Davis, E.Weyukerl]
Returning to proof
[Adapted from M.Davis, E.Weyukerl]
Returning to proof
[Adapted from M.Davis, E.Weyukerl]
Lemmas again
[Adapted from M.Davis, E.Weyukerl]
Proof completed
[Adapted from M.Davis, E.Weyukerl]
Herbrands theorem
[Adapted from M.Davis, E.Weyukerl]
The procedure for checking satisfiability
But - if the formula is unsatisfiable we eventually will be able toprove this )although we might not be able wait as long as willbe necessary)
If the formula is satisfiable the current procedure will terminatejust if the Herbrand universe will be finite... [Adapted from M.Davis, E.Weyukerl]
Satisfiability?
If the formula is unsatisfiable we eventually will be able toprove this )although we might not be able wait as long as willbe necessary)
If the formula is satisfiable the current procedure will terminatejust if the Herbrand universe will be finite...
It can be shown that in general the problem whether a givenpredicate logic formula is satisfiable is algorithmically unsolvable(the famous Gödel's Theorem)
Still, we can do a little better than with a current procedure...
Unification
[Adapted from M.Davis, E.Weyukerl]
Robinson's theorem
This is the version of resolution method that is generally used
You may be able to show that a formula is satsifiable also in thecase when the unification procedure does not produce any newterms
[Adapted from M.Davis, E.Weyukerl]