Chapter 3: Basic Propositional Logic - PowerPoint PPT Presentation

1 / 45
About This Presentation
Title:

Chapter 3: Basic Propositional Logic

Description:

Chapter 3: Basic Propositional Logic. Based on Harry Gensler's book. For ... 9. I'll go to Paris during spring break if and only if I'll win the lottery. ... – PowerPoint PPT presentation

Number of Views:196
Avg rating:3.0/5.0
Slides: 46
Provided by: char459
Category:

less

Transcript and Presenter's Notes

Title: Chapter 3: Basic Propositional Logic


1
Chapter 3 Basic Propositional Logic
  • Based on Harry Genslers book
  • For CS2209A, 2009
  • By Dr. Charles Ling cling_at_csd.uwo.ca

2
3.1 Translation from English to Logic
  • Need a (formal) language to
  • deal with simple statements that may be true and
    false use capital letters (P, Q, )
  • They are called propositions
  • deal with if-then, and, or, not, etc.

3
Well-Formed Formula (wff)
  • 1. Any capital letter is a wff.
  • 2. The result of prefixing any wff with is a
    wff.
  • 3. The result of joining any two wffs by or
    ? or ? or and enclosing the result in
    parentheses is a wff.
  • Examples and usual meaning of connectives

4
Parentheses are important
5
Examples of Invalid wff
  • (P), (Q), ((R))
  • PQ, P Q R, (P Q R)
  • Logic (thus, wff) is very precise

6
Some useful rules
  • Rule put ( wherever you see both, either,
    or if.

7
  • Rule Group together parts on either side of a
    comma.

8
  • Rule have your capital letters stand for whole
    statements

9
Exercise (also LogiCola C (EM ET))
  • 1. Not both A and B.
  • 2. Both A and either B or C.
  • 3. Either both A and B or C.
  • 4. If A, then B or C.
  • 5. If A then B, or C.
  • 6. If not A, then not either B or C.
  • 7. If not A, then either not B or C.
  • 8. Either A or B, and C.
  • 9. Either A, or B and C.
  • 10. If A then not both not B and not C.
  • 11. If you get an error message, then the disk is
    bad or its a Macintosh disk.
  • 12. If I bring my digital camera, then if my
    batteries dont die then Ill take pictures of my
    backpack trip and put the pictures on my Web
    site.

10
3.2 Simple truth tables the meaning/semantics of
wff
  • A truth table gives a logical diagram for a wff.
    It lists all possible truth-value combinations
    for the letters and says whether the wff is true
    or false in each case.
  • Define connectives first

11


12
(No Transcript)
13
Real-life or may have different meanings
  • Inclusive or
  • Exclusive or A or B but not both
    ((A?B)(AB))

14
(No Transcript)
15
An interesting example
  • The Conservatives have issued another apology,
    this time for comments caught on video Wednesday
    by an assistant to Transport Minister Lawrence
    Cannon.
  • The exchange was caught on video and broadcast as
    the lead item Wednesday by the Aboriginal Peoples
    Television Network.
  • If you behave and you're sober and there's no
    problems and if you don't do a sit down and
    whatever, I don't care, said Mr. Cannon's
    assistant Darlene Lannigan to Mr. Matchewan. She
    then added One of them showed up the other day
    and was drinking.
  • Are you calling me an alcoholic? replied Mr.
    Matchewan.
  • If A then B does NOT imply A but often
    misunderstood.

16
(No Transcript)
17
3.3 Truth evaluations
  • We can calculate the truth value of a wff if we
    know the truth value of its letters.
  • LogiCola D (TM TH)

18
3.3a Exercise
  • Assume that A1 and B1 (A and B are both true)
    while X0 and Y0 (X and Y are both false).
    Calculate the truth value of each wff below.

19
3.4 Unknown evaluations
  • We can sometimes figure out a formulas truth
    value even if we dont know the truth value of
    some letters.
  • ExerciseLogiCola D (UE, UM, UH)
  • T1 (T is true), F0 (F is false), and U?

20
3.5 Complex truth tables
  • A formula with n distinct letters has 2n possible
    truth-value combinations

21
  • The truth table for (P?P) is true in all
    caseswhich makes the formula a tautology
  • the law of the excluded middle, says that every
    statement is true or false. This law holds in
    propositional logic
  • The truth table for (PP) is false in all
    caseswhich makes the formula a
    self-contradiction
  • Otherwise, the formula is a contingent
  • 3.5a ExerciseLogiCola D (FM FH)

22
(No Transcript)
23
Logical Paradox
  • Everything I say is a lie.
  • Barber paradox An adult male barber shaves all
    men who do not shave themselves, and no one else.
    Can he shave himself?
  • One thing is certain in this world nothing is
    certain.

24
Logical Paradox
  • Logical proof that God does not exist. ?
  • God is supposed to be omnipotent (all-powerful). 
  • If He is omnipotent, then He can create a rock so
    big that He can't pick it up. 
  • If He cannot make a rock like this, then He is
    not omnipotent. 
  • If He can make a rock so big that He can't pick
    it up, then He isn't omnipotent either. 
  • Either way we demonstrated that God cannot do
    something. 
  • Therefore God is not omnipotent. 
  • Therefore God does not exist.  

25
3.6 The truth-table test
  • To prove a propositional argument (given premises
    and conclusion)
  • Construct a truth table showing the truth value
    of the premises and conclusion for all possible
    cases.
  • The argument is VALID if and only if no possible
    case has the premises all true and conclusion
    false (VALID if and only if for all possible
    cases that the premises are all true, the
    conclusion is also true).

26
  • If youre a dog, then youre an animal. Youre
    not a dog. ? Youre not an animal

27
3.6a ExerciseLogiCola D (AE, AM, AH)
Short-cut table do it faster
28
3.6a Exercise (selected)
  • 3. If television is always right, then Anacin is
    better than Bayer. If television is always right,
    then Anacin isnt better than Bayer. ? Television
    isnt always right.     Use T and B.
  • 4. If it rains and your tent leaks, then your
    down sleeping bag will get wet. Your tent wont
    leak. ? Your down sleeping bag wont get
    wet.     Use R, L, and W.
  • 7. If ethics depends on Gods will, then
    something is good because God desires it.
    Something isnt good because God desires it.
    (Instead, God desires something because its
    already good.) ? Ethics doesnt depend on Gods
    will.     Use D and B this argument is from
    Platos Euthyphro.
  • 9. Ill go to Paris during spring break if and
    only if Ill win the lottery. I wont win the
    lottery. ? I wont go to Paris during spring
    break.  Use P and W.

29
  • If an argument passes the truth-table test, it
    means that the premises entails the conclusion
    (in semantics).
  • The truth-table test can get tedious for long
    arguments. Arguments with 6 letters need 64
    linesand ones with 10 letters need 1024 lines
  • Can we do it based only on syntax? Yes, see
    3.10- , Chapter 4,

30
3.7 The truth-assignment test
  • Take a propositional argument. Set each premise
    to 1 and the conclusion to 0. The argument is
    VALID if and only if no consistent way of
    assigning 1 and 0 to the letters will make this
    workso we cant make the premises all true and
    conclusion false.
  • You REFUTE the argument if you can find such an
    assignment

31
  • ExerciseLogiCola E (S) E (E)

32
(No Transcript)
33
  • (Read Chapter 3.8 by yourselves)
  • (Read Chapter 3.9 by yourselves)
  • 3.8a ExerciseLogiCola C (HM HT)
  • 3.9a ExerciseLogiCola E (F I)

34
3.8a ExerciseLogiCola C (HM HT)
Multiple Choice
Translation
35
3.9a ExerciseLogiCola E (F I)
Finding Conclusion
Valid or not?
36
Some extra topics
  • See extra slides posted
  • Adequate set of connectives (set2)
  • Normal forms (set3)

37
3.10/3.11 S-rules, I-rules
  • Inference rules, which state that certain
    formulas can be derived with validity from
    certain other formulas, mechanically
  • Deduce, formally deducible
  • Will be building blocks for formal proofs
  • Also check mechanically a proof
  • They reflect common forms of reasoning
  • What we hope to have (see later)
  • Everything that is deduced is valid. Sound
  • Everything that is valid can be deduced. Complete

38
3.10a ExerciseLogiCola F (SE SH)
39
(No Transcript)
40
All S-rules
41
3.11a ExerciseLogiCola F (IE IH)
42
(No Transcript)
43
3.12 Combining S- and I-rules
  • 3.12a ExerciseLogiCola F (CE CH)

44
3.13 Extended inferences
45
  • Exercise

46
Rules you can use
47
3.14 Logic gates and computers
Write a Comment
User Comments (0)
About PowerShow.com