Propositional Logic

advertisement
Propositional Logic
1
Proposition
2
 Propositions can be divided into simple propositions
and compound propositions.
 A simple (or basic) proposition is a proposition that
contains no connectives (e.g., not, and, or, if, etc.).
 Compound propositions are composed of simple
propositions and logical connectives.
3
 In propositional logic, we deal with propositions as
the basic units of meaning.

i.e. We are not concerned about the structure within a simple
proposition.
Simple/basic propositions
4
 John is a man.
 Mary is beautiful.
 Paul stole the watch.
Compound propositions
5
 It is not the case that John is clever.
 If you give me the money, then I will be rich.
 Either Mary is a liar or John misunderstands Mary.
Symbols
6
 We use capitalized letters to represent propositions.
 So if the proposition “John is clever” is A and the
proposition “Mary is happy” is B, then the compound
proposition “John is clever and Mary is happy” is A
and B.
7
 We use the following symbols (called “logical
operators” to translate connectives:
1) ~ negation (not, it is not the case that)
2) • conjunction (and, but, also)
3) v disjunction (or, unless)
4)  implication (if …then, only if)
5) ≡ equivalence (if and only if)
8
 In some books, ‘&’ or ‘’ is used for and; ‘’ is used
for not; ‘’ is used for imply; ‘’ is used for
equivalent.
9
 Example:
It is not the case that E ~E
B and C
B•C
Either C or D
CvD
If A then B
AB
H if and only if D
H≡D
10
 Only ~ is placed in front of an expression.
 Other operators are placed between expressions.
11
 A combination of letters by the legitimate uses of the
logical operators and parentheses is a well-formed
formula (WFF).
 Which of the following are WFFs?
~vBC
A •B •C
~P v ~Q
Main Operator
12
 The main operator is the operator in a compound
proposition that governs the largest component(s)
in the proposition. It is also the last operator to be
dealt with in finding out the truth value (T or F) of
a compound proposition.
 Compare to our use of +, , , .
 In 4  (3 + 2), “” is the main mathematical
operator.
13
 The main operator of the following propositions is “~”
~B
~(A  B)
~((A≡ F) • (D ≡ E))
14
 When a proposition has negation as its main
operator, the proposition is also called “a negation”.
 This also applies to other operators.
15
 Main operator is “•”.
K • ~L
(E v F) • (G v H)
((R  T) v (S  U)) • ((W ≡ X) v (Y ≡ Z))
16
 The main operator is “v”.
~C v ~D
(F • H) v (~K • ~L)
(S • (T  U)) v (X • (Y ≡ Z))
17
 The main operator is “”.
H  ~J
(A v C)  (D • E)
(K v (S • ~T))  (~F v (M • O))
18
 The main operator is “≡”.
M ≡ ~T
(B v D) ≡ (A • C)
(K v (F  I)) ≡ (~L • (G v H))
Translation
19
20
 In order to represent the structure of a compound
proposition or an argument, we need to translate it
into symbols.
 Two different sentences expressing the same
proposition should be translated into the same
capital letter.
21
 Sometimes, two different connectives (e.g., “or” and
“unless”) should also be translated into the same
logical operator.
 The translations should have the same meaning as
the original sentences.
Negation
22
 Negation is not a problematic symbol.
Conjunction
23
 Conjunction means the obtaining of truth for both
conjuncts. Therefore, “but” in English is also read as
a conjunction.
 “John left early but Mary stayed” means it is true
that “John left early” and “Mary stayed”.
 (J • M)
Disjunction
24
 Disjunction should be read as the inclusive “or”.
That means both disjuncts can be true or either
one of the disjuncts is true. The only impossible
case is where both disjuncts are false.
 “Unless” is also considered a disjunction.
 “Unless you work hard, you will fail” is equivalent
to “Either you work hard, or you will fail”.
25
 Parentheses are sometimes required to avoid
ambiguity.
 For example, (A • B) v C has different meaning from
A • (B v C).
 Similar to the use of brackets in mathematics.
Implication
26
 In an implication or conditional proposition, “If A,
then B,” A is called the “antecedent,” and B is called
the “consequent.”
 The antecedent always follows “If”, “provided that”,
“on condition that”, etc.
 The consequent always follows “then”, “only if”, and
“implies that”, etc.
27
 Given that A ⊃ B,
 A is a sufficient condition of B.
 B is a necessary condition of A.
Necessary condition
28
 The necessary condition B is one that must occur in
order for the condition A to occur.
 In other words, without B, A cannot occur.
 E.g.:


Having GPA 1.7 or above is necessary for graduation.
Being vulnerable is necessary for being courageous.
Sufficient condition
29
 The sufficient condition A is one with which that B
can occur.
 But note that there may be many other ways for B to
occur.
 E.g.:


Being a father is sufficient for being a parent.
Cleaning hands is sufficient for removing bacteria from them.
Different relations
30
• Given any two conditions, X and Y, there are 4 ways
in which X may be related to Y:
•
X is both necessary and sufficient for Y.
•
•
X is necessary but not sufficient for Y.
•
•
E.g.: Having water is necessary for making soup.
X is sufficient but not necessary for Y.
•
•
E.g.: Being a father is necessary and sufficient for being a male
parent.
E.g.: Having a son is sufficient for being a parent.
X is neither necessary nor sufficient for Y.
•
E.g.: Getting a university degree is neither necessary nor
sufficient for success
31
 The fact that X is neither necessary nor sufficient
for Y does not imply that X is not important to Y.
 E.g.: Democracy is not necessary nor sufficient for
having a good government. But it might still be
more likely for democracy to produce a good
government.
Possibility
32
 To say that X is necessary for Y is to say that it is
not possible for Y to occur without X.
 To say that X is sufficient for Y is to say that it is
not possible for X to occur without Y.
 Given that there are different kinds of
possibility (technological, physical, logical),
there are different kinds of necessary conditions
and sufficient conditions.
Equivalence
33
 Given two conditions, X and Y, to say that X is
equivalent to Y means that X is the necessary and
sufficient for Y.
 That means “X ≡ Y” is logically equivalent to “(X  Y)
• (Y  X)”.
 We can show that they are logically equivalent by
using truth table (discussed in the next topic).
Translation Exercise
34
 John cooks dinner and Dick reads novels, or Mary
drinks wine.
 John cooks dinner, and Dick reads novels or Mary
drinks wine.
35
 Either John cooks dinner and Dick reads novels or
Mary drinks wine.
 John cooks dinner and either Dick reads novels or
Mary drinks wine.
36
 John cooks dinner or both Dick reads novels and
Mary drinks wine.
 John cooks dinner or Dick and Mary drink wine.
37
 If John cooks dinner, then if Dick reads novels,
then Mary drinks wine.
 If John’s cooking dinner implies that Dick reads
novels, then Mary drinks wine.
 If either John cooks dinner and Dick reads novels
or Billy sleeps late, then Mary drinks wine.
Translation of categorical statements
38
 There are 4 types of categorical statements:
 All apples are plants.


No apples are vegetables.


This statement is equivalent to “If a is an apple, a is not a
vegetable.”
Some apples are red.


This statement is equivalent to “If a is an apple, a is a plant.”
This statement is equivalent to “a is an apple and a is red.”
Some apples are not red.

This statement is equivalent to “a is an apple and a is not red.”
Definitions of Logical Operators
39
Truth Tables
40
 The 5 logical operators are defined by truth tables.
 A truth table shows how the truth value of a
compound proposition depends on the truth value of
its components
P
~P
T
F
F
T
41
P
Q
PQ
T
T
T
T
F
F
F
T
F
F
F
F
42
P
Q
PvQ
T
T
T
T
F
T
F
T
T
F
F
F
43
P
Q
PQ
T
T
T
T
F
F
F
T
T
F
F
T
44
Question
45
 Each one of the 4 cards below has a letter on one side
and a number on the other. Tell me which card(s)
you definitely need to turn over, and only that (those)
card(s), in order to determine whether the cards are
following the rule to the effect that: if a card has
vowel on one side, it has an even number on the
other side.
E
T
4
7
Conditional Statement
46
 Please note that when P is F, whether Q is T or F, P 
Q is T.
 E.g.: The proposition “If Paul is bald, then he is rich”
is true when Paul is not bald.
P
Q
PQ
T
T
T
T
F
F
F
T
F
F
F
T
47
Applications
48
 We use the five tables to compute the truth-values of




any compound propositions.
Steps:
1) Assign letters to basic propositions (avoid
duplication).
2) Translate by joining letters with the logical
operators.
3) Insert parentheses as required.
49
 4) Assign truth-values to individual letters.
 5) Compute the truth-values of the next-smallest
compound proposition, and so on.
 6) Compute the truth-value under the main operator.
Example 1
50
 (A v D)  E
 Given A is true and D, E false, then
 (T v F)  F


T
F
F
Example 2
51
 Given A, B, C true and D, E, F false:
 (~(D v F) • (B v ~A))  ~(F  ~C)
 (~(F v F) • (T v ~T))  ~(F  ~T)
 (~(
 (T


F ) • ( T v F))  ~(F  F)
• ( T ))  ~(T)
T
 F
F
Truth Tables
52
Truth tables for propositions
53
 The previous examples work because the truth
values of individual letters are given in advance.
That corresponds to how normal people
understand a complicated saying by checking the
truth and falsity of the basic propositions first.
 Now we want to exhaust all the possible
combinations of truth-values in order to know the
properties of the compound propositions. This may
save us time to check the truth and falsity of the
individual propositions.
54
 We have a way to know the number of rows of a
complete truth table for any given propositions.
 It depends on the number of letters involved.
 If there are 2 letters, there are 4 rows; 3 letters, 8
rows and so on.
 Therefore, for n Letters, there are 2n rows.
55
 For example, we can draw the truth-table for (A v
~B)  B by constructing 4 rows.
 Then we assign the truth values to individual
letters.
 The rule is to alternate the truth-values for the
rightmost column, then alternate pairs for truthvalues for the next column and so on. In this way,
we need not worry about omission or repetition.
56
(A v ~B)  B
T
T
T
F
F
T
F
F
57
 Then we put in the truth value of the consequent.
(A v ~B)  B
T
T
T
T
F
F
F
T
T
F
F
F
58
 Then we compute the truth-value of the shortest
compound statement.
(A v ~B)  B
T F T
T
T T F
F
F
F T
T
F T F
F
59
 Then we move on to do the same for v and finally we
compute the truth-values under the main connective
.
(A v ~ B)  B
T T F T T T
T T T F F F
F F F T T T
F T T F F F
60
 In the above example, we notice that the truth-values
of the compound proposition only depend on the
truth-values of B.
 That means the compound proposition is a
needlessly complicated way of saying B, if we are
only interested in the truth and falsity of a
proposition in all possible circumstances.
 As a summary, drawing the truth-tables can enable
us to see certain important features of a compound
proposition.
Types of Propositions
61
 Propositions can be divided into 3 types based on
their logical features:

Tautology


Self-contradiction


A compound proposition is a tautology or logically true if it is true
regardless of the truth-values of its components.
A compound proposition is said to be self-contradictory or
logically false if it is false regardless of the truth-values of its
components.
Contingency

A compound proposition is said to be contingent if its truth-values
depend on the truth-values of its components.
Proposition type
Column under main
operator
Tautology
All true
Self-contradictory
All false
Contingent
At least one true, at
least one false
62
Relations between Propositions
63
 Two propositions are (logically) equivalent if they
have the same truth-values regardless of the truthvalues of the components.
 Two propositions are (logically) contradictory if
they have opposite truth-values regardless of the
truth-values of their components.
64
 Two propositions are (logically) consistent if there is
at least one line in the truth table on which both of
them are true.
 Two propositions are (logically) inconsistent if there
is no line on which both of them are true.
Logically equivalent
65
KL
TTT
TFF
FTT
FTF
~L~K
FTTFT
TFFFT
FTTTF
TFTTF
Logically contradictory
66
K
T
T
F
F

T
F
T
T
L
T
F
T
F
K
T
T
F
F
• ~ L
F F T
T T F
F F T
F T F
Logically consistent
67
K
T
T
F
F
V L
T T
T F
T T
F F
K
T
T
F
F
• L
T T
F F
F T
F F
Logically inconsistent
68
K
T
T
F
F
≡
T
F
F
T
L
T
F
T
F
K
T
T
F
F
•
F
T
F
F
~
F
T
F
T
L
T
F
T
F
69
 Any pair of propositions can only be either
consistent or inconsistent.
 If two propositions are logically contradictory, they
are also logically inconsistent.
 But if two propositions are logically equivalent,
they may not be logically consistent (two selfcontradictions are both logically equivalent and
logically inconsistent).
Consistency & Validity
70
 An argument is invalid if and only if the premises
and the falsehood of the conclusion are logically
consistent.

I.e., an argument is invalid if and only if there is a logical
possibility that the premises are true and the conclusion is
false.
 An argument is valid if and only if the premises and
the falsehood of the conclusion are logically
inconsistent.

I.e., an argument is valid if and only if there is no logical
possibility that the premises are true and the conclusion is
false.
Truth tables for arguments
71
 1) Follow the previous rules.
 2) Write out the symbolized argument with single
slash between premises and double slash between
the last premise and the conclusion.
 3) Look for a line in the table in which the main
operators of all of the premises are true and the
main operator of the conclusion false. If there is,
the argument is invalid. Otherwise, the argument is
valid.
72
 4) Any argument having mutually inconsistent
premises is valid regardless of what the conclusion
may be.
 5) Any argument having a tautologous conclusion is
valid regardless of what its premises may be.
Example
73
If Bin Laden is responsible for the 911 attack, then
bombing Afghanistan is a right action.
Bin Laden is not responsible for the 911 attack.
Therefore, bombing Afghanistan is not a right action.
74
 Use letter L, B to symbolize the two propositions.
LB
~L
--------~B
75
LB
TT
TF
FT
FF
L
T
T
F
F

T
F
T
T
B / ~ L // ~ B
T F T F T
F F T T F
T T F FT
F T F T F
Indirect truth tables
76
 Drawing a large table is troublesome.
 We need a faster way to spot invalidity.
 We do it by assuming that the argument is invalid.
 Then we work backward to obtain truth-values for all
the components.
 If no contradiction is seen, then the argument is
indeed invalid.
Testing for Invalidity
77
~A  (B v C)
~B
-----------------CA
78
 ~A  (B v C) / ~B // C  A
 Then assign false to the conclusion and truth to the




premises.
~ A  (B v C) / ~ B // C  A
T
T
F
F
F
TFT F TT T F T F F
79
 The previous slide shows how each step is obtained.
But in practice we need not solve a problem by
showing each step with different lines. The below is
a one-line proof of the argument’s invalidity, the
red T/F highlighting the assumptions.
 ~ A  (B v C) / ~ B // C  A
 TFT FTT
TF T F F
Testing for consistency
80
 Similar to before except that we have no conclusion.
 Instead we assume that all the propositions are
consistent by assigning T to the main operator of
each.
 If there is a contradiction, then the propositions are
inconsistent, otherwise consistent.
Example
81
AvB
B  (C v A)
C  ~B
~A
 A v B / B  (C v A) / C  ~ B / ~ A
F T T
T T TT F TT FT TF
contradiction
Download