Title: Chapter 3: Basic Propositional Logic
1Chapter 3 Basic Propositional Logic
- Based on Harry Genslers book
- For CS2209A, 2009
- By Dr. Charles Ling cling_at_csd.uwo.ca
23.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.
3Well-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
4Parentheses are important
5Examples of Invalid wff
- (P), (Q), ((R))
- PQ, P Q R, (P Q R)
- Logic (thus, wff) is very precise
6Some 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
9Exercise (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.
103.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)
13Real-life or may have different meanings
- Inclusive or
- Exclusive or A or B but not both
((A?B)(AB))
14(No Transcript)
15An 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)
173.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)
183.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.
193.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?
203.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)
23Logical 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.
24Logical 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.
253.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
273.6a ExerciseLogiCola D (AE, AM, AH)
Short-cut table do it faster
283.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,
303.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)
343.8a ExerciseLogiCola C (HM HT)
Multiple Choice
Translation
353.9a ExerciseLogiCola E (F I)
Finding Conclusion
Valid or not?
36Some extra topics
- See extra slides posted
- Adequate set of connectives (set2)
- Normal forms (set3)
373.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
383.10a ExerciseLogiCola F (SE SH)
39(No Transcript)
40All S-rules
413.11a ExerciseLogiCola F (IE IH)
42(No Transcript)
433.12 Combining S- and I-rules
- 3.12a ExerciseLogiCola F (CE CH)
443.13 Extended inferences
45 46Rules you can use
473.14 Logic gates and computers