Introduction to Theorem Proving - PowerPoint PPT Presentation

1 / 20
About This Presentation
Title:

Introduction to Theorem Proving

Description:

both p1 and p2 are T. Forward chaining: p1 and p2 are T in rows 1 and 2. but C is F in row 2. ... p1 and p2 are T in row 1 and ... – PowerPoint PPT presentation

Number of Views:60
Avg rating:3.0/5.0
Slides: 21
Provided by: fts2
Category:

less

Transcript and Presenter's Notes

Title: Introduction to Theorem Proving


1
Introduction to Theorem Proving
  • Suppose p1, p2, - - - -, pn and C are
    propositions for which (p1 /\ p2 /\ - - - - -/\
    pn) -gt C is a tautology. Then
  • p1 /\ p2 /\ - - - /\ pn is called the premise
  • C is called the conclusion
  • of a syllogism.
  • - So, a syllogism is a deductive reasoning
    scheme composed of premises and a conclusion.
  • We also say that p1,p2, - - - -, C is a
    Theorem. Then we can represent the theorem as
    follows.
  • p1, p2, - - - , pn gtC

Note that I switched -gt to mean implies and gt
to mean a theorem because I could not find the
right symbol on my keyboard.
2
Checking for Theorem
  • There are 2 standard ways to check for theorems
    using the Truth-Table
  • Forward chaining
  • Check to see that whenever p1, p2, - - -, pn are
    all True, then C is also True
  • Backward chaining
  • Check to see that whenever C is False, there is
    at least one of the p1, p2, - - - , pn is also
    False

3
Strange Example 1
Lets try a little strange set of premises and
conclusion. (Note that premises and conclusions
are all propositions and the truth value of a
compound proposition depends on that of its
components.) let p1 a printer is a device
p2 if Ram is in class, then a printer is a
device C Ram is in class
P2 (C-gtp1)
C
p1
Forward chaining p1 and p2 are T in rows 1 and
2 but C is F in row 2.
T
T
T
T
T
F
Also Backward chaining C is F in rows 2 and 4,
but in row 2 both p1 and p2 are T.
F
T
F
F
F
T
So, p1, p2, C is not a theorem or
p1, p2 /gt C
4
Rewording Example 1
Lets reword this to a more normal look let
p1 Ram is in class p2 if Ram is in
class, then a printer is a device C a
printer is a device
Forward chaining p1 and p2 are T in row 1 and
C is also T in row 1. There is no other row with
p1 and p2 both having T value.
P2 (p1 -gt C)
C
p1
T
T
T
F
T
F
Also Backward chaining C is F in rows 2 and 4.
In row 2, p2 is also F, and in row 4, p1 is also
F.
F
T
T
F
F
T
So, p1, p2, C is a theorem or p1,
p2 gt C
This is an example of modus ponens where we
have p1, p1-gtC gt C.
5
Theorem Proving by Manipulating Syntax
  • We have used the Truth table for demonstrating
    tautologies, proof with forward chaining, and
    backward chaining.
  • Can we demonstrate an expression or set of
    statements to be a theorem by manipulating the
    syntax ?
  • An expression or a set of statements is proven to
    be a theorem if we show that the expression is
    derived from a set of premises.
  • A procedure often used in derivation is
  • Start with a premise which may be a given axiom
    or a previously proven theorem
  • Utilize a logical sequence of tautologies or
    previously proven theorems to arrive at the
    expression which needs to be proven.
  • Another procedure often used is the reverse of
    above
  • Start with the expression that needs to be proven
    as theorem
  • Utilize a sequence of tautologies or previously
    proven theorems to arrive at a known theorem or
    axiom.
  • The term utilize a sequence of - - - means to
    replace any of the expression by any statement
    that is logically equivalent. (the most obvious
    is to use the law of inference such as modus
    ponens)

6
List of Some Tautologies
  • p lt-gt p
  • p /\ q lt - gt q /\ p
  • p \/ q lt - gt q \/ p
  • (p /\ q) /\ r lt - gt p /\ (q /\ r)
    (associative law)
  • (p \/ q) \/ r lt - gt p \/ (q \/ r)
    (associative law)
  • p /\ (q \/ r) lt - gt (p /\ q) \/ (p/\ r)
    (distributive law)
  • p \/ (q /\ r) lt - gt (p \/ q) /\ (p \/ r)
    (distributive law)
  • (p /\ q) lt - gt p \/ q (De Morgan)
  • (p \/ q) lt - gt p /\ q (De Morgan)
  • p \/ p lt - gt p
  • p /\ p lt - gt p
  • p /\ q -gt q
  • p /\ q -gt p
  • p \/ False - gt p
  • p /\ True -gt p
  • p -gt p \/ q
  • q -gt p v q

Note that these are almost reversed
7
List of Some Theorems
  • 1. p, q gt p/\ q
  • 2. p, p- gtq gt q (modus ponens)
  • 3. p, p \/ q gt q
  • 4. q, p-gtq gt p (modus tolens)
  • 5. p \/ q, p-gt r, q -gt r gt r
  • 6. p gt q, q -gt r gt p -gt r
  • 7. p, p -gtq, q -gt r gt r
  • 8. p \/ ( q /\ q) ? p
  • 9. p /\ ( q \/ q) ? p
  • 10. p -gt q ? p \/ q
  • 11. p -gt q ? q -gt p
  • 12 (p -gt q) ? p /\ q
  • 13. p lt-gt q ? (p -gt q) /\ ( q -gt p)
  • 14. plt-gtq ? (p /\ q) \/ (p /\ q)
  • 15. p -gt ( q -gt r) ? (p /\q) -gtr

Note the symbolisms gt means is a theorem ?
means is the same or equals
8
Some Examples of proving theorems
withmanipulating symbols
  • p, p v q gt q
  • p ? ( p v q) -gt q
  • p ? ( p v q) v q
  • p v (p v q) v q
  • p v q v (p v q)
  • (p v q ) v (p v q)
  • True
  • thus p ? ( p v q) -gt q is a tautology
  • p, q gt ( p ? q)
  • p ?q -gt (p ? q)
  • (p ? q) V (p ? q)
  • True
  • thus p ?q -gt (p ? q) is a tautology

9
More example of proving with manipulating
symbols
14. Plt-gtQ ? (P?Q) V (P ? Q)
Plt-gtQ (P-gtQ) ? (Q-gtP) (P VQ) ? (Q
V P) P ? (Q V P) V Q ? (Q v P)
(P ? Q) V(P ? P) V (Q ? Q) V (Q ? P)
(P ? Q) V (F) V ( F)
V (Q ? P) (P ? Q) V
(Q ? P) (Q ? P ) V (P ? Q)
  • P V (Q ? Q) ? P
  • P v ( Q ? Q)
  • P v (F)
  • P

10
Conjunctive Normal Form Disjunctive Normal Form
Conjunctive Normal Form is a conjunction (AND) of
expressions where each expression is a
disjunction (Or) of literals. note a
literal is a proposition such as P, Q, or
P. Example of Conjunctive Normal Form (A V B
V C) ? (B V C)
Disjunctive Normal Form is a disjunction (OR) of
expressions where each expression is a
conjunction (AND) of literals. note a
literal is a proposition such as P, Q, or
P. Example of Disjunctive Normal Form (A ? B
? C) V (B ? C)
11
Can Any Logical Expression be Expressed in either
Disjunctive Normal Form or Conjunctive Normal
Form?
Lets look at an example with truth table
B
Exp
A
Exp is true on 1, 3rd, 4th line (A ? B) or (A
?B) or (A ?B) are true.
T
T
T
T
F
F
T
T
F
T
F
F
We can express Exp with the following
Disjunctive Normal Form
Exp (A ? B) V (A ?B) V (A ?B)
12
Simplify the sample Disjunctive Normal Form
  • (A ? B) V (A ?B) V (A ?B)
  • A V(A ?B) ? B V (A ?B) V (A ? B)
  • (AVA) ? (AVB) ? (BVA) ?(BVB) V (A
    ?B)
  • T ? (AVB) ? (BVA) ? (B)
    V (A ?B)
  • (A V B) ? ( B)
    V (A ?B)
  • (A ? B) V (B ? B)
    V (A ?B)
  • (A ? B) V (B)
    V (A ?B)
  • (B)
    V (A ?B)
  • (B V A) ? (B V B)
  • (B V A) ? T
  • ( B V A )
  • which is ( A V B ) or A -gt B or the
    Exp expression of the truth table in the
    previous slide

We used the following absorption rules in the
above derivation (see page 46 of your text
book) P V (P
? Q ) lt-gt P
P ? (P V Q ) lt-gt P
Check the absorption rules out with truth table
to satisfy yourself.
13
Can we turn the Disjunctive Normal Form of Exp to
Conjunctive Normal Form?
Recall that from the Truth Table, Exp (A ? B)
V (A ?B) V (A ?B)
To turn this into Conjunctive Normal Form, lets
look at using DeMorgan Law. So lets look at
Exp.
Exp (A ? B) V (A ? B) V (A ? B)
(A ? B) ? (A ? B) ?
(A ? B) (A V B ) ? ( A
V B) ? (A V B) (A V B
) ? ( A v (B ? B) ) (A V B
) ? ( A V False ) (A v B
) ? (A) (A ? A) V ( A
? B) F V ( A ?
B) ( A ? B)
But ---- we want Exp, which is (Exp)
So, Exp (A ? B) Exp A V
B or A -gt B This is the same as the
truth table expression, Exp.
Conjunctive Normal Form Form
14
Recapture the Steps
  • From the Truth Table Expression, Exp, pick all
    the rows where the Exp has the value True.
  • Express the each of those True rows as a
    conjunction of the literals, based on the truth
    values of the literals for that row.
  • The disjunction of the conjunctions formulate the
    Disjunctive Normal Form of that Exp.
  • To obtain the Conjunctive Normal Form we need to
    apply the DeMorgan Law to convert Exp to Exp.

15
Introduction to Resolution Theorem
  • A Popular Theorem used in A.I. is the Resolution
    Theorem ( a simplified version)
  • p \/ r, q \/ r
    gt p \/ q
  • Lets look at the first term , p \/ r.
  • Start with the known theorem, p-gtr is equal to
    p \/ r, thus we have (p) -gt r ? (p) \/ r
  • Using the tautology, p lt-gt p, we can convert
    the above to the (p) -gt r ? p \/ r. So we can
    replace the p \/ r with (p) -gtr in the original
    expression.
  • Next, q \/ r is the same as r \/ q from one of
    the known tautologies. And r \/ q can be
    replaced with r -gt q from the same earlier
    theorem.
  • Now we have (p) -gt r, r -gt q gt p v q
  • Finally replace p \/ q with p -gt q and we have
  • (p) -gt r, r -gt q gt p -gt q which
    is the same as one of
  • the earlier known theorem in the form
    of p -gt q, q -gt r gt p -gt r
  • Thus p \/ r, q \/ r gt p \/ q.

16
General Resolution Theorem
  • The General form of Resolution theorem states
    that there may be any number of disjuncts,
    including the case of just one, in either of the
    two expressions. The only requirements is that
    one expression must have a disjunct that is the
    negation of a disjunct in the other.
  • E1 \/ E2 \/ - - - \/ Ek - - - \/ En, E1 \/ E2
    \/ - - - \/ Ek - - -\/ En gt E1 \/ E2 - - - \/
    En
  • Note that the Ek as a disjunct that is
    dropped.
  • Special Case 1 E1, E1 \/ E2 gt E2
  • this is the same as E1, E1 -gt E2 gt E2
    (modus ponens)
  • Special Case 2 E1 \/ E2, E2 gt E1
  • This is the same as E1 -gt E2, E2 gt E1
    (modus tolens)

Note that we are dealing with Conjunctive Normal
Form
17
Refutation Principle or Proof by Contradiction
  • AI and many other fields use a method called
    refutation principle together with the Resolution
    Theorem.
  • Show that the negation of the conclusion is
    inconsistent with the premise(s).
  • Example
  • (prem) local database \/ remote database
  • prove local database v remote database,
    (local database) gt remote database
  • Proof
  • 1. Assume remote database (negation of
    conclusion)
  • 2. local database \/ remote database
    (premise)
  • 3. local database
    (premise from the prove statement)
  • 4. local database \/ remote database, local
    database (combine 2 and 3 above)
  • 5. remote database
    (4 above and resolution theorem)
  • 6. remote database, remote base (1 and 5
    above ------ contradiction)
  • 7. empty (or False)
    ( 6 above and resolution theorem)

18
General Approach to Utilizing Refutation Principle
  • 1. Express the premises and conclusion in
    disjunctive form.
  • 2. Assume the negation of the conclusion and show
    inconsistency via utilizing the Resolution
    Theorem.
  • Show that the negation of the conclusion leads
    to inconsistency (False), thus the conclusion
    must be True

19
Resolution-Refutation Tree with Modus Ponens
- The familiar modus ponens A -gt B
A --------- B - Express the premise in
disjunctive form along with negation of
conclusion A V B A V False
Assume B
A V B
A V False
B
B V False
False
The Resolution-Refutation tree shows that B
assumption is False thus B must be True
20
Example of a Resolution-Refutation Tree used in
A.I.
Prove A-gtB, B-gtC, C-gtD gt A-gtD
  • Assume ( A -gt D)
  • A\/B, B\/C, C\/D gt (A \/ D)
  • We have 3 disjunctive terms and 1 conjunctive
    term
  • A\/B, B\/C, C\/D, A /\ D
  • A\/B, B\/C, C\/D, A /\ D
  • A\/B, B\/C, C\/D, A, D
  • Place these on a reverse tree
  • Process using Resolution Theorem

A\/B
B\/C
C\/D
A\/C
A
A\/D
D
D
Empty (False)
Write a Comment
User Comments (0)
About PowerShow.com