CS1502 Formal Methods in Computer Science - PowerPoint PPT Presentation

About This Presentation
Title:

CS1502 Formal Methods in Computer Science

Description:

Tom Hanks is a good actor. After all, all rich actors are good actors, and Tom Hanks is a rich actor. Proof Rules Proof rules are used to construct proofs ... – PowerPoint PPT presentation

Number of Views:79
Avg rating:3.0/5.0
Slides: 23
Provided by: GAN
Category:

less

Transcript and Presenter's Notes

Title: CS1502 Formal Methods in Computer Science


1
CS1502 Formal Methods in Computer Science
  • Lecture Notes 2
  • Introduction to Logic
  • Part 2

2
What is an argument?
  • A series of statements in which one (called the
    conclusion) is meant to follow from the others
    (called the premises).
  • Not talking about the type of argument

3
Fitch-style Argument
  • P1 P2 ... Pn Q

premises
conclusion
4
Valid Argument
  • A valid argument is one that guarantees the truth
    of its conclusion on the assumption that the
    premises are true.
  • A valid argument ensures the conclusion is true
    provided the premises are true.
  • Often written premises conclusion

5
Valid Argument - Example
  • Large(b) v Cube(b) ?Cube(b) Large(b)

?
6
Sound Argument
  • If an argument is valid and its premises are
    true, then the argument is said to be sound.

7
Sound Argument
8
Argument is not sound
9
ExamplesWhich are valid? Sound?
  • (worked out in lecture)
  • All men are mortal. Socrates is a man. So,
    Socrates is Mortal.
  • Bill is a man. After all, Bill is mortal and all
    men are mortal.
  • All women are taller than all men. Ralph is a
    woman and Bill is a man. Therefore, Ralph is
    taller than Bill.

10
ExamplesWhich are valid? Sound?
  • Since this class meets Tuesday after 1245pm, it
    is January.
  • Tom Hanks is a good actor. After all, all rich
    actors are good actors, and Tom Hanks is a rich
    actor.

11
Methods of Proof
  • Formal We will use a Fitch-style proof employed
    in the software.
  • Informal This style of proof, used by
    mathematicians, is just as rigorous. It consists
    of sentences describing the situation at hand,
    the inferences being made, and the justification
    of each inference.
  • Difference? The amount of explicit detail.

12
What constitutes a proof?
  • Proof that P1,P2,,Pn Q is
  • a step-by-step demonstration showing that Q must
    be true in any circumstances in which all of
    P1,P2,,Pn are true.

13
Fitch-style Proof
14
Proof Rules
  • Proof rules are used to construct proofs (both
    formal and informal)
  • That is, each step but the premises has to be
    justified by a proof rule
  • As we introduce more pieces of FOL, we will
    introduce more proof rules
  • Well start now with proof rules involving
    identity

15
Rules
  • EliminationIf b c and P(b) then P(c).
  • Introductiona a
  • Symmetry of IdentityIf a b then b a.
  • Transitivity of IdentityIf a b and b c then
    a c

16
Elimination
  • P(n) n m P(m)

17
Introduction
  • n n

18
Symmetry of Identity
  • a b

1)2)3)
a a
Introduction
b a
Elimination 1, 2
19
(No Transcript)
20
Example Formal Proof
  • Larger(a,b) c b

1)2)3)4) 5)6)
Smaller(b,a)
Ana Con 1
Introduction
c c
b c
Elim 2, 4
Smaller(c,a)
Elim 5, 3
21
Explicit Proof of Ana Con step
This is a look ahead we havent seen these
proof rules before.
Note As this is displaying, the line is in the
wrong place. It should be between lines 2 and 3.
22
Example Informal Proof
Prove If a is smaller than b and c is identical
to b then c is larger than a.
Since we are given that a is smaller than b, it
follows that b must be larger than a. Moreover,
since c is identical to b, it follows that c must
be larger than a.
QED
Write a Comment
User Comments (0)
About PowerShow.com