A Partial Instantiation Method for Inference in FirstOrder Logic

1 / 51
About This Presentation
Title:

A Partial Instantiation Method for Inference in FirstOrder Logic

Description:

... a satisifability problem we transform our input to a first-order logic formula P ... a first-order logic satisfiability problem we convert the formula ... –

Number of Views:70
Avg rating:3.0/5.0
Slides: 52
Provided by: compu363
Category:

less

Transcript and Presenter's Notes

Title: A Partial Instantiation Method for Inference in FirstOrder Logic


1
A Partial Instantiation Method for Inference in
First-Order Logic
  • Presented by Eric McGregor
  • Advisor Christopher Lynch

2
Overview
  • Automated Theorem Proving and Satisfiability
  • First-Order Logic and Formula Convention
  • Substitutions
  • Viewing First-Order Formula As Propositional
    Formula
  • General Form of the PI Algorithm
  • Interpretations Restricted to the Herbrand
    Universe
  • Implications of Unsatisfiability in Propositional
    Logic
  • Implication of Satisfiability in Propositional
    Logic
  • An Example
  • Correctness and Completeness

3
Automated Theorem Proving
  • Given a set of hypothesis and a conclusion,
    Automated Theorem Proving, seeks a mechanized
    means to deduce if the hypothesis implies the
    conclusion.
  • This is a decision problem.
  • A theorem proving problem can be reduced to a
    satisfiability problem.

4
Satisfiability
  • To reduce it to a satisifability problem we
    transform our input to a first-order logic
    formula P-gtQ.
  • Our original problem is true if P-gtQ is valid.
  • For automated theorem proving we determine if
    is unsatisfiable.

5
Common Strategies for Checking First-Order Logic
Satisfiability
  • Resolution a method of repeatedly applying
    resolution rule. If empty clause is generated,
    then set of clauses is unsatisfiable.
  • Resolution rule
  • Partial-Instantiation (PI) a method which solves
    a series of propositional satisfiability problems
    each derived by partially instantiating one or
    more variables in the last.

6
Renewed Interest In PI
  • Advances in the computational performance of
    propositional logic satisfiability algorithms.
  • Many problems are solved when only a few of the
    many possible instantiations have been generated.

7
Source
  • The PI method we will show today is given in the
    paper titled Partial Instantiation Methods for
    Inference in First-Order Logic by J.N. Hooker, G.
    Rago, V. Chandru, and A. Shrivastava, 2001
  • Based on method by R. Jeroslow, 1988

8
First-Order Logic
  • Recall that a term is defined recursively by
  • Variables x,y,z and constants a,b,c are
    terms.
  • If f is a function symbol and v is a vector of
    terms then f(v) is a term.
  • If P is a predicate symbol and v is a vector of
    terms then P(v) is an atom.
  • A literal is an atom or the negation thereof.
  • A clause is a disjunction of literals.

9
Formula Convention
  • When we consider a first-order logic
    satisfiability problem we convert the formula to
    one in the following form
  • Formula is in prenex clausal form.
  • All variables are universally quantified.
  • Each clause is standardized apart.

10
Substitutions
  • A substitution replaces one or more variables of
    a formula F with terms, in such a way that each
    occurrence of a given variable is replaced by the
    same term.
  • Example

11
Instantiation
  • The result of a substitution on a formula F
    is an instantiation of F.
  • A formula F is ground if it has no variables.
  • If is ground then it is a complete
    instantiation, otherwise it is a partial
    instantiation.

12
Unifier, Most General Unifier
  • A unifier of predicates and is a
    substitution such that
    .
  • A unifier is a most general unifier (mgu) if
    for any unifier there is a substitution
    such that .

13
Example of mgu
  • Let and
  • Let
  • is a most general unifier of D and E.
  • Consider
  • is a unifier.
  • Notice for that

14
Renaming, Variant
  • A renaming is a substitution which replaces
    variables with variables.
  • We say that two formulas E and F are variants if
    they can be unified by a renaming of variables.
  • Example Let E P(x,a) and F P(y,a).
    Let be a renaming .
    As E P(y,a) F ,
    then E and F are variants.

15
Viewing First-Order Formula as Propositional
Formula
  • A quanitifier-free first order logic formula can
    be viewed as a propositional formula in which
    variants of an atom are treated as the same atom.

16
Viewing First-Order Formula as Propositional
Formula
  • Example
    .
  • and are variants
  • and are not variants
  • Thus F can be viewed as the propositional formula
    .
  • We can then give this new formula to a
    propositional satisfiability checker.

17
General Form Of The PI Algorithm
  • Given a first-order logic formula F determine if
    F (F viewed as a propositional formula) is
    satisfiable.
  • If F is unsatisfiable, F is unsatisfiable and
    we are done.
  • Else F is satisfiable. Check for conflicts.
  • If no conflicts exist, F is satisfiable and we
  • are done.
  • Else, add additional clauses to F in order to
  • resolve conflicts and repeat from beginning.

18
Satisfiability Obstacle
  • What Universe do we consider?

19
Herbrand Universe
  • The Herbrand Universe, , of a formula F is
    the set of all terms built up by constants and
    functions in F. If no constants occur in F then
    we add a single element, say a.
  • Example If
    then

20
Herbrand Base
  • The Herbrand Base, , of a formula F is the
    set of all atoms generated by predicate symbols
    in F and terms in the Herbrand Universe of F.
  • Example If
    then
  • and

21
Herbrand Interpretations
  • A Herbrand interpretation for F assigns a truth
    value to each atom in the Herbrand Base of F.
  • F is true in a Herbrand interpretation I if every
    ground instance of F using terms in the Herbrand
    universe is a true propositional formula in I.
  • F is satisfiable if it is true in some Herbrand
    interpretation.

22
A Herbrand Interpretation Example
  • Example If
    then
  • and
  • Consider the Herbrand interpretation I which maps
    all atoms containing predicate P to true and all
    others to false.
  • Then all ground instances of F are true in I.
  • Hence F is satisfiable.

23
Unsatisfiability
  • A formula is unsatisfiable iff it is false in all
    its Herbrand Interpretations.
  • Furthermore, it is unsatisfiable iff some finite
    conjunction of ground instances is an
    unsatisfiable propositional formula.

24
M-satisfiability
  • F is M-satisfiable if there is some Herbrand
    interpretation I such that every ground instance
    of F is true in I or contains a term with depth
    greater than M.

25
Example of M-satisfiability
  • Suppose that F is
  • Clearly F is unsatisfiable.
  • Consider the Herbrand Interpretation which maps
    P(s(a)) to true and all other atoms to false.
  • Then F is 1-satisfiable since there is a Herbrand
    interpretation in which every ground instance is
    true or contains a term of depth greater than 1.

26
M-Satisfiability For All M
  • A formula that is M-satisfiable for all M is
    satisfiable. Furthermore, an M-satisfiable
    formula is (M-1) satisfiable.

27
General Form Of The PI Algorithm
  • Given a first-order logic formula F determine if
    F (F viewed as a propositional formula) is
    satisfiable.
  • If F is unsatisfiable, F is unsatisfiable and
    we are done.
  • Else F is satisfiable. Check for conflicts.
  • If no conflicts exist, F is satisfiable and we
  • are done.
  • Else, add additional clauses to F in order to
  • resolve conflicts and repeat from beginning.

28
Implications of Unsatisfiability as Propositional
Logic Formula
  • Suppose F is a first-order formula.
  • Let F be the propositional formula derived from
    F where variants are treated as the same atom.
  • Suppose F was found to be unsatisfiable.
  • How do we conclude F is unsatisfiable?

29
Implications of Unsatisfiability as Propositional
Logic Formula
  • Let F be a ground instance of F where each
    variable in F is replaced with a term in the
    Herbrand Universe not found in F.
  • F is equivalent to F as propositional
    formulas.
  • F is therefore unsatisfiable.
  • As F is a finite conjunction of ground
    instances of F and F is unsatisfiable as a
    propositional formula, then F is unsatisfiable.

30
General Form Of The PI Algorithm
  • Given a first-order logic formula F determine if
    F (F viewed as a propositional formula) is
    satisfiable.
  • If F is unsatisfiable, F is unsatisfiable and
    we are done.
  • Else F is satisfiable. Check for conflicts.
  • If no conflicts exist, F is satisfiable and we
  • are done.
  • Else, add additional clauses to F in order to
  • resolve conflicts and repeat from beginning.

31
Implication of Satisfiability as Propositional
Formula
  • Recall, to show F is satisfiable we need to show
    that there is some interpretation I such that all
    ground instances of F are satisfiable as
    propostional formula under I.
  • If some ground instance of F is satisfiable, are
    all ground instances of F satisfiable? Not
    necessarily.

32
Implication of Satisfiability as Propositional
Formula
  • Consider
  • Let . F
    is a ground instance of F that is satisfiable.
  • Let
    . F is a ground instance that is
    unsatisfiable.

33
A Satisfiability Check
  • If a formula is found satisfiable as a
    propositional formula, before claiming the
    formula is satisfiable as a first-order formula,
    we look for conflicts in the truth valuation.
  • If a conflict is found we append more
    information to the formula to resolve the
    conflict and run the propositional satisfiability
    checker on the new formula.

34
Satisfier Mapping
  • Let v be a truth valuation which satisfies F.
  • For each clause C in F, let L(C) be a literal of
    C for which v makes L(C) true.
  • For each clause, let S(C) be the atom of L(C).
  • S is called a satisfier mapping for F.
  • S(C) is called a satisfier of C.
  • If S(C) L(C) then S(C) is a true satisfier,
    otherwise S(C) is a false satisfier.

35
Example Of A Satisfier Mapping
  • T
  • F
  • F
  • F
  • In this example, the first literal of each clause
    contains the satisfier for the clause.
  • i.e. P(s(a)), P(x), Q(s(y)) and R(s(a)) are
    satisfiers.
  • P(s(a)) is a true satisfier.
  • While P(x), Q(s(y)) and R(s(a)) are false
    satisfiers.

36
Blocked
  • Given a satisfier mapping S for a quantifier-free
    formula F, a pair of satisfiers P(t), P(t') is
    blocked if
  • P(t) is a true satisfier
  • P(t') is a false satisfier
  • P(t) and P(t') have a most general unifier
    such that P(t) P(t') .
  • There are clauses C, C' in F for which P(t) and
    P(t') are respectively satisfiers and for which
    either (a) C is not in F or (b) C' is not
    in F.

37
Blocked Example
  • Consider

  • T F
  • is a true satisfier.
  • is a false satisfier.
  • and have a most
    general unifier
    such that
  • is not in F.

38
Resolving Blocked Pairs
  • Suppose the satisfiers P(t) and P(t') are blocked
    in some formula F. Then P(t) is the satisfier
    for some clause C and P(t) is the satisfier for
    some clause C.
  • Let be the mgu for P(t) and P(t).
  • We attempt to resolve the blockage by conjoining
    the clauses and to F then checking
    for a new propositional valuation.

39
Resolving Blocks
  • Let where
  • T

  • F
  • We conjoin the following constraints to F

40
M-Blocked
  • A pair of satisfiers P(t) and P(t') are
    M-blocked if they are blocked and their most
    general unifier is such that P(t) and
    P(t) contains no terms of depth strictly
    greater than M.

41
Satisfiability
  • Given , let S be a
    satisfier mapping for F. Then
  • (a) if S is not M-blocked then F is
  • M-satisfiable, and
  • (b) if S is unblocked then F is satisfiable.

42
A Primal PI Algorithm
  • Let F be a first-order formula of the proper
    form.
  • 1. Initialization Set
    .
  • 2. Ground Satisfiability Try to find a
    satisfier mapping S for that treats
    variants of the same atom as the same atom.
  • 3. Termination Check
  • - If S does not exist, then stop. F is
    unsatisfiable.
  • - Otherwise, if S is unblocked, then stop. F is
    satisfiable.
  • - Otherwise, if S is not M-blocked, then F is
    M-satisfiable. Let
  • MM1, and repeat step 3.
  • 4. Refinement (S is M-blocked) Let and
    be two clauses in whose satisfiers are
    M-blocked, and let be a most general
    unifier of and . Set
    after
    standardizing apart, set kk1 and repeat step 2.

43
Example Of Satisfiability With Termination
  • T
  • F
  • F
  • F

44
Example Of Satisfiability With Termination
  • T
  • F
  • F
  • F
  • For M 0
  • Blocked
  • mgu
  • is not 0-blocked
  • F is 0-satisfiable

45
Example Of Satisfiability With Termination
  • T
  • F
  • F
  • F
  • For M 1
  • Blocked
  • mgu
  • is 1-blocked

46
Example Of Satisfiability With Termination
  • T
  • F
  • F
  • F

  • T
  • For M 1
  • Blocked
  • is not 1-blocked
  • F is 1-satisfiable

47
Example Of Satisfiability With Termination
  • T
  • F
  • F
  • F

  • T
  • For M 2
  • Blocked
  • is 2-blocked

48
Example Of Satisfiability With Termination
  • T
  • F
  • F
  • F

  • T

  • T
  • is unblocked
  • PI terminates with
  • satisfiability

49
Correctness and Completeness of PI
  • The algorithm PI indicates (a) unsatisfiability
    only if F is unsatisfiable, (b) satisfiability
    only if F is satisfiable, and (c)
    M-satisfiability only when F is M-satisfiable.
  • If F is unsatisfiable, then PI terminates with an
    indication of unsatisfiability.

50
Conclusion
  • PI is one method to determine the validity of
    first-order logic formula.
  • PI methods are appealing with advances in the
    computational performance of propositional logic
    satisfiability algorithms.
  • In many cases PI terminates after only a few
    iterations thus providing a timely answer.

51
Thank you
Write a Comment
User Comments (0)
About PowerShow.com