Formal Methods in Computer Science CS1502 Proofs with Boolean Connectives - PowerPoint PPT Presentation

1 / 19
About This Presentation
Title:

Formal Methods in Computer Science CS1502 Proofs with Boolean Connectives

Description:

Elim. To gain skills in constructing proofs using proof by cases as well as simple proof rules. ... Elim. Select the conjunct that you want / Intro. Combine ... – PowerPoint PPT presentation

Number of Views:51
Avg rating:3.0/5.0
Slides: 20
Provided by: patchrawat
Category:

less

Transcript and Presenter's Notes

Title: Formal Methods in Computer Science CS1502 Proofs with Boolean Connectives


1
Formal Methods in Computer ScienceCS1502Proofs
with Boolean Connectives
  • Patchrawat Uthaisombut
  • University of Pittsburgh

2
Goals
  • To learn 4 simple proof rules
  • /\ Elim, /\ Intro, \/ Intro, Reit
  • To learn about subproof.
  • To learn the method of proof by cases
  • \/ Elim
  • To gain skills in constructing proofs using proof
    by cases as well as simple proof rules.

3
Rules learned so far
Line 1 says ab. In line 3, we replace the first
a in line 2 with a b.
If ab, anything that is true with a is also true
with b. We can replace a with b (but not vice
versa).
4
Motivation
  • Why do we need proofs? Truth table method
    already works fine.
  • If there are many atomic sentences, a large truth
    table is needed.
  • Truth table method does not work when we
    introduce quantifiers ?, ?. Methods of proof can
    be extended to accommodate this.

5
Simple Rules (Cut-and-Paste Rules)
  • /\ Elim /\ Intro \/ Intro
  • P1 /\ P2 /\ P3 P1 Pi
  • P2
  • P3
  • P1 P1 /\ P2 /\ P3 P1 \/ P2 \/ P3

(or P2 or P3)
6
Reit(eration)
  • Reit
  • P
  • P

7
Simple Rules (Cut-and-Paste Rules)
  • /\ Elim
  • Select the conjunct that you want
  • /\ Intro
  • Combine multiple sentences into one
  • \/ Intro
  • Add extra stuff to a sentence

8
Example Cut and Paste Rules
  • A /\ B
  • C
  • A \/ (B /\ C)

9
Exercise Cut and Paste Rules
  • (A \/ B) /\ C (A \/ B) /\ C
  • A /\ D A /\ D
  • C /\ A B /\ D
  • Is each of the arguments valid?
  • Give a proof or a counterexample.

10
Goals
  • To learn 4 simple proof rules
  • /\ Elim, /\ Intro, \/ Intro, Reit
  • To learn about subproof.
  • To learn the method of proof by cases
  • \/ Elim
  • To gain skills in constructing proofs using proof
    by cases as well as simple proof rules.

11
Example Proof by cases
  • (Cube(a) /\ Small(a)) \/ (Cube(a) /\ Large(a))
  • Cube(a)
  • It is given that (Cube(a) /\ Small(a)) \/
    (Cube(a) /\ Large(a)).
  • Well break it into 2 cases.
  • First, assume that (Cube(a) /\ Small(a)) holds.
  • Then it implies that Cube(a) holds.
  • In the second case, we assume that Cube(a) /\
    Large(a) holds.
  • Thus, it follows that Cube(a).
  • In either case, we have Cube(a), as desired.

12
Subproofs
  • A subproof is a proof that occurs within the
    context of a larger proof.
  • The assumption of a subproof can be used only in
    the subproof. It cannot be used outside the
    scope of the subproof.
  • This is similar to a local variable in a
    subroutine.

13
\/ Elim (Proof by cases)
P1 or P2 is true
  • P1 \/ P2
  • P1
  • S
  • P2
  • S
  • S

S follows from P1
S follows from P2
Since P1 or P2 is true, then S is true.
PAUSE
14
Example \/ Elim (Proof by cases)
  • 1. (A /\ B) \/ (C /\ A)
  • 2. A /\ B
  • 3. A /\ Elim 2
  • 4. C /\ A
  • 5. A /\ Elim 4
  • 6. A \/ Elim 1, 2-3, 4-5

15
Example \/ Elim with \/ Intro
  • 1. (A /\ B) \/ (C /\ D)
  • 2. A /\ B
  • 3. B /\ Elim 2
  • 4. B \/ D \/ Intro 3
  • 5. C /\ D
  • 6. D /\ Elim 5
  • 7. B \/ D \/ Intro 6
  • 8. B \/ D \/ Elim 1, 2-4, 5-7
  • Use \/ Intro to put conclusion in the right form

16
Example \/ Elim with Reit
  • 1. (A /\ B) \/ A
  • 2. A /\ B
  • 3. A /\ Elim 2
  • 4. A
  • 5. A Reit 4
  • 6. A \/ Elim 1, 2-3, 4-5
  • What if the conclusion is A \/ B?

17
Exercises \/ Elim
  • (A /\ B) \/ C
  • A \/ B \/ C
  • (A /\ B) \/ (B /\ C) \/ (C /\ A)
  • B \/ C

18
Exercise
  • What can be concluded from this premise?
  • What cannot?
  • Prove or give counterexample.
  • (A /\ (B \/ C)) \/ (C /\ (A \/ B))
  • ???

19
Exercise (more detail)
  • Which of these are consequences of(A /\ (B \/
    C)) \/ (C /\ (A \/ B))?
  • Prove or find a counterexample
  • A
  • B
  • C
  • A \/ B
  • A \/ C
  • B \/ C
  • A \/ B \/ C
  • At least 2 of the 3 variables are true.
  • How do you express this in logic?
Write a Comment
User Comments (0)
About PowerShow.com