Formal Methods in Computer Science CS1502 Quantifiers and Proofs - PowerPoint PPT Presentation

1 / 26
About This Presentation
Title:

Formal Methods in Computer Science CS1502 Quantifiers and Proofs

Description:

... girl. ( intro) Since d was an arbitrarily chosen boy, thus every boy likes some girl. 19 ... Every boy likes some girl or other. Let e be any boy in the domain. ... – PowerPoint PPT presentation

Number of Views:77
Avg rating:3.0/5.0
Slides: 27
Provided by: patchrawat
Category:

less

Transcript and Presenter's Notes

Title: Formal Methods in Computer Science CS1502 Quantifiers and Proofs


1
Formal Methods in Computer ScienceCS1502Quantif
iers and Proofs
  • Patchrawat Uthaisombut
  • University of Pittsburgh

2
Goals
  • To gain skills in creating FOL sentences from a
    given situation.
  • To learn proof rules involving quantifiers
  • ? Elim, ? Intro
  • ? Intro, ? Elim
  • To gain skills in doing proofs using these rules.

3
Exercise
  • Create an argument with the shortest proof
    containing ? Elim and ? Intro.
  • Create an argument with the shortest proof
    containing ? Intro.
  • Create an argument with the shortest proof
    containing ? Elim.

4
? Elim
  • 1 ?x (Cube(x) /\ Large(x))
  • 2 c Cube(c) /\ Large(c)
  • 3 Cube(c) /\ Elim 2
  • 4 ?x Cube(x) ? Intro 3
  • 5 ?x Cube(x) ? Elim 1,2-4

5
? Intro (Universal Intro)
  • 1 ?x (Cube(x) /\ Large(x))
  • 2 c
  • 3 Cube(c) /\ Large(c) ? Elim 1
  • 4 Cube(c) /\ Elim 3
  • 5 ?x Cube(x) ? Intro 2-4

6
? Intro
  • Universal Generalization andGeneral Conditional
    Proof

7
Two forms of ? Intro
  • Universal Generalization
  • c
  • Q(c)
  • ?x Q(x)
  • General conditional proof
  • c P(c)
  • Q(c)
  • ?x (P(x) ? Q(x))

8
General conditional proof
  • ?x (Cube(x) ? Large(x))
  • ?x (Cube(x) ? Small(x))
  • ?x (Cube(x) ? Large(x))
  • c Cube(c)
  • Cube(c) ? Large(c) ? Elim 1
  • Large(c) ? Elim 3,4
  • Small(c) AnaCon 6
  • ?x (Cube(x) ? Small(x)) ? Intro 3-7

9
General conditional proof
  • ?x (P(x) ? Q(x))
  • ?x (Q(x) ? R(x))
  • ?x (P(x) ? R(x))

10
General conditional proof
  • ?x (P(x) ? Q(x))
  • ?x (Q(x) ? R(x))
  • c P(c)
  • P(c) ? Q(c) ? Elim 1
  • Q(c) ? Elim 3,4
  • Q(c) ? R(c) ? Elim 2
  • R(c) ? Elim 5,6
  • ?x (P(x) ? R(x)) ? Intro 3-7

11
? Intro (General Conditional)
  • 1 ?x Large(x)
  • 2 c Cube(c)
  • 3 Large(c) ? Elim 1
  • 4 ?x (Cube(x) ? Large(x)) ? Intro 2-4

12
Translation Proofswith multiple quantifiers
  • Boys and Girls
  • Euclids Theorem
  • The Barber Paradox

13
Boys and Girls
  • There is a girl that every boy likes.
  • Every boy likes some girl.
  • Are they equivalent?
  • How to phrase them in logic?
  • Does one imply another?
  • How to support your answer?
  • ?y Girl(y) /\ ?x(Boy(x) ? Likes(x,y))
  • ?x Boy(x) ? ?y(Girl(y) /\ Likes(x,y))

14
Euclids Theorem
  • Theorem There are infinitely many primes.
  • How to phrase this in logic?
  • Predicates
  • Prime, Largest, Larger,
  • Function
  • x y
  • AnaCon
  • If x is an integer, then x1 is an integer.
  • How to prove it?
  • ?x (Integer(x) ? ?y (Integer(y) /\ ygtx))

15
The Barber Paradox
  • There was once a small town where there was a
    barber who shaved all and only the men of the
    town who did not shave themselves.
  • Is there such a town?
  • How to support the answer?
  • ?x ?y (S(x,y) ? S(y,y))

16
Examples (proof)
  • Boys and Girls
  • Euclids Theorem
  • The Barber Paradox

17
Boys and Girls
  • There is a girl that every boy likes.
  • Every boy likes some girl.
  • Are they equivalent?
  • How to phrase them in logic?
  • Does one imply another?
  • How to support your answer?

18
  • ?y Girl(y) /\ ?x(Boy(x) ? Likes(x,y))
  • ?x Boy(x) ? ?y(Girl(y) /\ Likes(x,y))
  • Let c be one of these popular girls in the
    kindergarten class.
  • Assume that d is any boy in the kindergarten
    class.
  • Every boy likes c.
  • Thus, d likes c.
  • Thus, d likes some girl. (? intro)
  • Since d was an arbitrarily chosen boy, thus every
    boy likes some girl.

19
Boys and Girls
20
  • ?x Boy(x) ? ?y(Girl(y) /\ Likes(x,y))
  • ?y Girl(y) /\ ?x(Boy(x) ? Likes(x,y))
  • Pseudo-proof
  • Every boy likes some girl or other.
  • Let e be any boy in the domain.
  • Thus, e likes some girl or other.
  • Lets use f to name the girl that e likes.
  • Since e was an arbitrarily chosen boy, then every
    boy likes f.
  • Thus, there is some girl that every boy likes.

21
Boys and Girls
,6
22
Euclids Theorem
  • Theorem There are infinitely many primes.
  • How to phrase this in logic?
  • Predicates
  • Prime, Largest, Larger,
  • Function
  • x y
  • AnaCon
  • If x is an integer, then x1 is an integer.
  • How to prove it?

23
There are infinitely many integers
24
The Barber Paradox
  • There was once a small town where there was a
    barber who shaved all and only the men of the
    town who did not shave themselves.
  • Is there such a town?
  • How to support the answer?

25
(No Transcript)
26
The Barber Paradox
Write a Comment
User Comments (0)
About PowerShow.com