Lecture 2 (part 2) - PowerPoint PPT Presentation

1 / 58
About This Presentation
Title:

Lecture 2 (part 2)

Description:

Peter : 'The dean said that we must take cs1101 AND one GEM course. So of course, you must take a GEM course.' 2.3 Natural Deduction: -Intro, -Elim ... – PowerPoint PPT presentation

Number of Views:98
Avg rating:3.0/5.0
Slides: 59
Provided by: gohai
Category:
Tags: gem | lecture | part

less

Transcript and Presenter's Notes

Title: Lecture 2 (part 2)


1
Lecture 2 (part 2)
  • Natural Deduction in Propositional Calculus
  • Reading Epp Chp 1.3
  • (For a math perspective of cs1104, read Epp 1.4,
    1.5)

2
Lectures 1-4 Logic and Proofs
Studying Logic, is like studying another
programming language.
SEMANTICS
Classical (Truth Tables)
Constructive (Derivations)
(System of Proof)
SYNTAX
(System of Logic)
Propositional Calculus
Lecture 1
Lecture 2
Predicate Calculus
Lecture 3
Lecture 4 Application of Constructive Proofs to
Elementary Number Theory
3
Overview
  • 1. Motivation Arguments and Validity
  • 2. Natural Deduction
  • 2.1 Definition
  • 2.2 Derivation Scheme
  • 2.3 Ù-Intro, Ù-Elim Inference Rules
  • 2.4 Ú-Intro, Ú-Elim Inference Rules
  • 2.5 Reiteration
  • 2.6 -Intro, -Elim Inference Rules
  • 2.7 -Intro, -Elim, -Intro Inference Rules
  • 2.8 -Intro, -Elim Inference Rules
  • 3. Using what was proven earlier
  • 4. Translation of problems
  • 5. Demo of the proof checker

This Lecture
4
2.3 Natural Deduction Ù-Intro, Ù-Elim
  • Motivating Example (Ù-Intro)
  • John The handbook says that we must take 5
    modules from our area of specialization.
  • Peter I read also that we must take 3 cross
    faculty modules.
  • John So I must take 5 modules from our area of
    specialization AND 3 cross faculty modules?
  • Peter Yes.

5
2.3 Natural Deduction Ù-Intro, Ù-Elim
6
2.3 Natural Deduction Ù-Intro, Ù-Elim
  • Motivating Example (Ù-Elim)
  • John zzzzzzzz
  • Dean For this semester, freshmen must take
    cs1101 AND one GEM course.
  • John wakes up and asks Peter
  • Peter, must I take a GEM course.
  • Peter Yes.
  • John Why?
  • Peter The dean said that we must take cs1101
    AND one GEM course. So of course, you must take
    a GEM course.

7
2.3 Natural Deduction Ù-Intro, Ù-Elim
8
2.3 Natural Deduction Ù-Intro, Ù-Elim
Note that p and q need not be simple propositions.
9
2.3 Natural Deduction Ù-Intro, Ù-Elim
1, Ù-Elim (Left)
2, Ù-Elim (Right)
p Ù s
10
2.3 Natural Deduction Ù-Intro, Ù-Elim
1, Ù-Elim (Left)
2, Ù-Elim (Left)
2, Ù-Elim (Right)
1, Ù-Elim (Right)
4,5, Ù-Intro
11
Overview
  • 1. Motivation Arguments and Validity
  • 2. Natural Deduction
  • 2.1 Definition
  • 2.2 Derivation Scheme
  • 2.3 Ù-Intro, Ù-Elim Inference Rules
  • 2.4 Ú-Intro, Ú-Elim Inference Rules
  • 2.5 Reiteration
  • 2.6 -Intro, -Elim Inference Rules
  • 2.7 -Intro, -Elim, -Intro Inference Rules
  • 2.8 -Intro, -Elim Inference Rules
  • 3. Using what was proven earlier
  • 4. Translation of problems
  • 5. Demo of the proof checker

This Lecture
12
2.4 Natural Deduction Ú-Intro, Ú-Elim
  • Motivating Example (Ú-Intro)
  • Lecturer The pre-requisite for cs4212 is a pass
    in either cs2104 OR cs3212.
  • John I have passed cs3212...
  • (So it is true that I have a pass in either
    cs2104 OR cs3212). Therefore I fulfil the
    pre-requisite for cs4212.

13
2.4 Natural Deduction Ú-Intro, Ú-Elim
14
2.4 Natural Deduction Ú-Intro, Ú-Elim
  • Motivating Example (Ú-Elim)
  • The prime minister is either a criminal or
    insane.
  • Suppose that he is a criminal,
  • Then he ought to be locked up.
  • Suppose on the other hand, that he is insane,
  • Again, he ought to be locked up.
  • Therefore in any case, the prime minister ought
    to be locked up.

15
2.4 Natural Deduction Ú-Intro, Ú-Elim
  • Motivating Example (Ú-Elim)
  • At this point in time, either John is at the
    movies, or he is out playing tennis.
  • Lets assume hes at the movies.
  • John told me that he never watches movies wearing
    spectacles. Because the specs restrict hes
    field of view.
  • Therefore John is wearing contact lens.
  • Lets assume hes playing tennis.
  • Tennis is a sport.
  • John always wears contact lens when he is playing
    any sport.
  • Therefore John is wearing contact lens.
  • Therefore, in any case, John is wearing contact
    lens now.

16
2.4 Natural Deduction Ú-Intro, Ú-Elim
Reality
Ú-Elimination (Proof by considering cases)
17
2.4 Natural Deduction Ú-Intro, Ú-Elim
  • Note
  • i points to the or-statement
  • j-k points to the nested sub-scheme (1 level
    deeper) with assumption that LHS of the or-stmt
    is true.
  • l-m points to the nested sub-scheme (1 level
    deeper) with assumption that RHS of the or-stmt
    is true.
  • Note that the conclusion r must be the same.

Note that p, q, r need not be simple propositions.
18
2.4 Natural Deduction Ú-Intro, Ú-Elim
2, Ú-Intro (Left)
4, Ú-Intro (Right)
19
2.4 Natural Deduction Ú-Intro, Ú-Elim
2.4.2 Prove
(p Ú q) Ú r
p Ú (q Ú r)
5
5, Ú-Intro (Right)
Ú-Elim
9
9, Ú-Intro (Left)
Ú-Elim
20
2.4 Natural Deduction Ú-Intro, Ú-Elim
2.4.3 Prove
2,ÚIntro(R)
6,ÙElim(R)
7,ÚIntro(L)
8,ÚIntro(L)
Ú-Elim
21
Overview
  • 1. Motivation Arguments and Validity
  • 2. Natural Deduction
  • 2.1 Definition
  • 2.2 Derivation Scheme
  • 2.3 Ù-Intro, Ù-Elim Inference Rules
  • 2.4 Ú-Intro, Ú-Elim Inference Rules
  • 2.5 Reiteration
  • 2.6 -Intro, -Elim Inference Rules
  • 2.7 -Intro, -Elim, -Intro Inference Rules
  • 2.8 -Intro, -Elim Inference Rules
  • 3. Using what was proven earlier
  • 4. Translation of problems
  • 5. Demo of the proof checker

This Lecture
22
2.5 Natural Deduction Reiteration
  • 2.5.1 Recall (Derivation Scheme)
  • Purpose Model our line of thought
  • Outermost Derivation Scheme is the main line of
    thought. It corresponds to reality.
  • Inner derivation schemes create an alternate
    reality - a world which exists due to the
    assumption that you have made.

23
2.5 Natural Deduction Reiteration
Wrong kind of Layout.
Right kind of Layout.
24
2.5 Natural Deduction Reiteration
  • 2.5.2 Reiteration
  • Brings a proposition which has been derived
    previously the Outside scheme to the Inside (and
    not the other way around).
  • Hofstadter points out that when you start a
    mathematical argument with if, let, suppose, you
    are stepping into a fantasy world where not only
    are all the facts of the real world true but
    whatever you are supposing is also true. (p246
    Textbook)

25
Overview
  • 1. Motivation Arguments and Validity
  • 2. Natural Deduction
  • 2.1 Definition
  • 2.2 Derivation Scheme
  • 2.3 Ù-Intro, Ù-Elim Inference Rules
  • 2.4 Ú-Intro, Ú-Elim Inference Rules
  • 2.5 Reiteration
  • 2.6 -Intro, -Elim Inference Rules
  • 2.7 -Intro, -Elim, -Intro Inference Rules
  • 2.8 -Intro, -Elim Inference Rules
  • 3. Using what was proven earlier
  • 4. Translation of problems
  • 5. Demo of the proof checker

This Lecture
26
2.6 Natural Deduction -Intro, -Elim
  • Motivating Example (-Intro)
  • Peter Lets assume that I get caught for drunk
    driving.
  • John Well, then you would go to jail. Your
    mother would know about it and that would make
    her unhappy.
  • Peter Correct. So what can we conclude?
  • John IF you get caught for drunk driving, THEN
    you would make your mother unhappy.

27
2.6 Natural Deduction -Intro, -Elim
Reality
Alternate reality a world of which the truth of
the statements here depends on your assumption
being true
-Introduction
28
2.6 Natural Deduction -Intro, -Elim
  • Motivating Example (-Elim)
  • Fact1 IF it is a cat, THEN it is an animal
  • Fact2 It is a cat
  • Conclusion Therefore, it is an animal.
  • Fact1 IF it is a cat, THEN it is an animal
  • Fact2 It is NOT an animal
  • Conclusion Therefore, it is NOT a cat.

29
2.6 Natural Deduction -Intro, -Elim
-Elimination (LR) (Modus Ponens) Method of
Affirming
30
2.6 Natural Deduction -Intro, -Elim
Note i points to the Conditional
Note that p and q need not be simple propositions.
31
2.6 Natural Deduction -Intro, -Elim
1,Reiteration
4,3,-Elim(LR)
2,Reiteration
-Intro
32
2.6 Natural Deduction -Intro, -Elim
2.6.2 Prove
1,Reiteration
3,2,-Elim(LR)
-Intro
1,Reiteration
8,7,-Elim(LR)
-Intro
Ù-Intro
33
2.6 Natural Deduction -Intro, -Elim
2.6.3 Prove
1,Reiteration
2,Reiteration
4,5,-Elim(LR)
8,9,-Elim(LR)
Ú-Elim
-Intro
34
Overview
  • 1. Motivation Arguments and Validity
  • 2. Natural Deduction
  • 2.1 Definition
  • 2.2 Derivation Scheme
  • 2.3 Ù-Intro, Ù-Elim Inference Rules
  • 2.4 Ú-Intro, Ú-Elim Inference Rules
  • 2.5 Reiteration
  • 2.6 -Intro, -Elim Inference Rules
  • 2.7 -Intro, -Elim, -Intro Inference Rules
  • 2.8 -Intro, -Elim Inference Rules
  • 3. Using what was proven earlier
  • 4. Translation of problems
  • 5. Demo of the proof checker

This Lecture
35
2.7 Natural Deduction -Intro,-Elim,-Intro
  • Motivating Example (-Elim)
  • Boy to girl Its not that I dont love you,
    its just thatblah blah blah
  • (not not love you love you)

36
2.7 Natural Deduction -Intro,-Elim,-Intro
37
2.7 Natural Deduction -Intro,-Elim,-Intro
  • Motivating Example (-Intro)
  • A I did NOT read newspapers in the kitchen.
  • B Why?
  • A Suppose its true that I really did read
    newspapers in the kitchen
  • Now, IF I was reading newspapers in the kitchen,
    THEN my glasses will be on the kitchen table.
  • So my glasses should be on the kitchen table.
  • But my glasses are not there.
  • So I did NOT read newspapers in the kitchen.

38
2.7 Natural Deduction -Intro,-Elim,-Intro
39
2.7 Natural Deduction -Intro,-Elim,-Intro
Note that p need not be a simple proposition.
40
2.7 Natural Deduction -Intro,-Elim,-Intro
2.7.1 Prove
2,Ù-Elim (L)
1,Reiteration
-Intro
41
2.7 Natural Deduction -Intro,-Elim,-Intro
2.7.2 Prove
1,Reiteration
4,3,-Elim (LR)
2,Reiteration
-Elim
-Intro
42
2.7 Natural Deduction -Intro,-Elim,-Intro
2.7.3 Prove
2, Ú-Intro (R)
1,Reiteration
-Intro
7, Ú-Intro (L)
1,Reiteration
-Intro
Ù-Intro
43
2.7 Natural Deduction -Intro,-Elim,-Intro
2,Ù-Elim (L)
2,Ù-Elim (R)
-Intro
44
Overview
  • 1. Motivation Arguments and Validity
  • 2. Natural Deduction
  • 2.1 Definition
  • 2.2 Derivation Scheme
  • 2.3 Ù-Intro, Ù-Elim Inference Rules
  • 2.4 Ú-Intro, Ú-Elim Inference Rules
  • 2.5 Reiteration
  • 2.6 -Intro, -Elim Inference Rules
  • 2.7 -Intro, -Elim, -Intro Inference Rules
  • 2.8 -Intro, -Elim Inference Rules
  • 3. Using what was proven earlier
  • 4. Translation of problems
  • 5. Demo of the proof checker

This Lecture
45
Introduction and Elimination
46
2.8 Natural Deduction -Intro, -Elim
Note that p and q need not be simple propositions.
47
2.8 Natural Deduction -Intro, -Elim
2.8.1 Prove
p q
q r
r p
p q
2,Reiteration
5,4,-Elim (LR)
3,Reiteration
q p
-Intro
-Intro
48
Overview
  • 1. Motivation Arguments and Validity
  • 2. Natural Deduction
  • 2.1 Definition
  • 2.2 Derivation Scheme
  • 2.3 Ù-Intro, Ù-Elim Inference Rules
  • 2.4 Ú-Intro, Ú-Elim Inference Rules
  • 2.5 Reiteration
  • 2.6 -Intro, -Elim Inference Rules
  • 2.7 -Intro, -Elim, -Intro Inference Rules
  • 2.8 -Intro, -Elim Inference Rules
  • 3. Using what was proven earlier
  • 4. Translation of problems
  • 5. Demo of the proof checker

This Lecture
49
3. Using what was proven earlier.
(Left as an exercise)
-Elim
50
3. Using what was proven earlier.
1,Reiteration
4,3,-Elim (LR)
Ú-Elim
51
Overview
  • 1. Motivation Arguments and Validity
  • 2. Natural Deduction
  • 2.1 Definition
  • 2.2 Derivation Scheme
  • 2.3 Ù-Intro, Ù-Elim Inference Rules
  • 2.4 Ú-Intro, Ú-Elim Inference Rules
  • 2.5 Reiteration
  • 2.6 -Intro, -Elim Inference Rules
  • 2.7 -Intro, -Elim, -Intro Inference Rules
  • 2.8 -Intro, -Elim Inference Rules
  • 3. Using what was proven earlier
  • 4. Translation of problems
  • 5. Demo of the proof checker

This Lecture
52
4. Translation of problems
  • The famous detective Percule Hoirot was called in
    to solve a baffling murder mystery. He
    determined the following facts
  • Lord Hazelton, the murdered man, was killed by a
    blow on the head with a brass candle stick.
  • Either Lady Hazelton or a maid, Sara, was in the
    dining room at the time of the murder.
  • If the cook was in the kitchen at the time of the
    murder, then the butler killed Lord Hazelton with
    a fatal dose of strychnine.
  • If Lady Hazelton was in the dining room at the
    time of the murder, then the chauffeur killed
    Lord Hazelton.
  • If the cook was not in the kitchen at the time of
    the murder, then Sara was not in the dining room
    when the murder was committed.
  • If Sara was in the dining room at the time the
    murder was committed, then the wine steward
    killed Lord Hazelton.

53
4. Translation of problems
  • Lord Hazelton, the murdered man, was killed by a
    blow on the head with a brass candle stick.
  • weapon_CandleStick
  • Either Lady Hazelton or a maid, Sara, was in the
    dining room at the time of the murder.
  • lady_dining Ú sara_dining
  • If the cook was in the kitchen at the time of the
    murder, then the butler killed Lord Hazelton with
    a fatal dose of strychnine.
  • cook_kitchen butlerDidIt
  • cook_kitchen weapon_CandleStick
  • If Lady Hazelton was in the dining room at the
    time of the murder, then the chauffeur killed
    Lord Hazelton.
  • lady_dining chauffeurDidIt
  • If the cook was not in the kitchen at the time of
    the murder, then Sara was not in the dining room
    when the murder was committed.
  • cook_kitchen sara_dining
  • If Sara was in the dining room at the time the
    murder was committed, then the wine steward
    killed Lord Hazelton.
  • sara_dining stewardDidIt

54
4. Translation of problems
  • weapon_CandleStick
  • lady_dining Ú sara_dining
  • cook_kitchen butlerDidIt
  • cook_kitchen weapon_CandleStick
  • lady_dining chauffeurDidIt
  • cook_kitchen sara_dining
  • sara_dining stewardDidIt
  • --------------------------------------------------
    -
  • chauffeurDidIt

55
Overview
  • 1. Motivation Arguments and Validity
  • 2. Natural Deduction
  • 2.1 Definition
  • 2.2 Derivation Scheme
  • 2.3 Ù-Intro, Ù-Elim Inference Rules
  • 2.4 Ú-Intro, Ú-Elim Inference Rules
  • 2.5 Reiteration
  • 2.6 -Intro, -Elim Inference Rules
  • 2.7 -Intro, -Elim, -Intro Inference Rules
  • 2.8 -Intro, -Elim Inference Rules
  • 3. Using what was proven earlier
  • 4. Translation of problems
  • 5. Demo of the proof checker

This Lecture
56
  • End of Lecture.

57
Have a break
  • There is an ancient story about the Sophist
    philosopher Protagoras, who agreed to instruct
    Euathlus in rhetoric so that Euathlus could
    practice law.
  • Euathlus in turn agreed to pay Protagoras his fee
    only after winning his first case.
  • However, upon completion of his training,
    Euathlus chose not to practise law.
  • So Protagoras brought Euathlus to court and sued
    him for his fee.
  • Protagoras maintained that he should be paid no
    matter what. He argued
  • If you (i.e. Euathlus) win the case, I should be
    paid, by the terms of my agreement with you.
  • If you lose the case, I should also be paid, by
    by order of the court.
  • What would you do if you were Euathlus?

58
Have a break
  • There is an ancient story about the Sophist
    philosopher Protagoras, who agreed to instruct
    Euathlus in rhetoric so that Euathlus could
    practice law.
  • Euathlus in turn agreed to pay Protagoras his fee
    only after winning his first case.
  • However, upon completion of his training,
    Euathlus chose not to practise law.
  • So Protagoras brought Euathlus to court and sued
    him for his fee.
  • Protagoras maintained that he should be paid no
    matter what. He argued
  • If you (i.e. Euathlus) win the case, I should be
    paid, by the terms of my agreement with you.
  • If you lose the case, I should also be paid, by
    by order of the court.
  • Euathlus No, no, no
  • If I win the case, then I should not pay, by
    order of the court.
  • If I lose the case, then I still should not pay,
    by the terms of my agreement with Protagoras.
Write a Comment
User Comments (0)
About PowerShow.com