Professional Documents
Culture Documents
1
INTRODUCTION
Proposition:
A proposition is a statement that is either true or false, but
not both.
Propositional Logic:
The area of logic that deals with propositions.
2
“Elephants are bigger than mice.”
3
NEGATION (Unary Operator)
Let p be a proposition. The negation of p, denoted by ¬p, is
the statement “It is not the case that p.”
The proposition ¬p is read as “not p.”
Examples
p:Today is Friday.
¬p: Today is not Friday.
or
It is not Friday today.
Truth tables are used to display relationships
between the truth value of propositions.
4
“520 < 111”
5
“y > 5”
Is this a proposition? no
6
“What time is it?”
Is this a statement? no
Is this a proposition? no
A proposition has to be a
statement.
7
Truth table:
9
CONJUNCTION: (Binary Operator)
Let p and q be propositions. The conjunction of p and q,
denoted by pΛq, is the proposition “p and q” which is true
when both p and q are true and is false otherwise.
Examples
p:“Today is Friday.”
q:“It is raining today.”
p Λ q: “Today is Friday and it is raining today”.
10
Truth table :
The Truth Table for
the Conjunction of
Two Propositions.
p q pΛq
T T T
T F F
F T F
F F F
11
DISJUNCTION: (Binary Operator)
Let p and q be propositions. The disjunction of p and q,
denoted by p ν q, is the proposition “p or q” which is false
when both p and q are false and is true otherwise.
Note:
inclusive or : The disjunction is true when at least one of
the two propositions is true.
E.g. “Students who have taken calculus or computer
science can take this class.”
12
Truth table :
13
CONDITIONAL STATEMENT:
Let p and q be propositions. The conditional statement p → q, is
the proposition “if p, then q” which is false when p is true and q
is false, and true otherwise.
14
Example:
Let p be the statement “Maria learns discrete mathematics.”
and q the statement “Maria will find a good job.” Express
the statement p → q as a statement in English.
1. “If Maria learns discrete mathematics, then she will
find a good job.
2. “Maria will find a good job if she learns discrete
mathematics.”
3. “For Maria to get a good job, it is sufficient for her to
learn discrete mathematics.”
4. “Maria will find a good job unless she does not learn
discrete mathematics.”
15
If p then q
p implies q
q if p
q whenever p
p is sufficient for q
q is necessary for p
p only if q
16
Other conditional statements:
Converse of p → q : q → p
Contrapositive of p → q : ¬ q → ¬ p
Inverse of p → q : ¬ p → ¬ q
17
BICONDITIONAL STATEMENT:
Let p and q be propositions. The biconditional statement
p ↔ q is the proposition “p if and only if q” which is true
when p and q have the same truth values, and is false
otherwise.
Example:
Let p be the statement “You can take the flight” and
let q be the statement “You buy a ticket.”
p ↔ q: “You can take the flight if and only if you buy
a ticket.”
18
The Truth Table for the
Biconditional p ↔ q.
p q p↔ q
T T T
T F F
F T F
F F T
19
Connectives can be used to build up complicated
compound propositions involving any number of
propositional variables.
20
PRECEDENCE/ORDER OF LOGICAL OPERATORS
21
TRANSLATING ENGLISH SENTENCES
22
Example: How can this English sentence be translated
into a logical expression?
“You can access the Internet from campus only if
you are a computer science major or you are not a
freshman.”
p → (q ν ¬r)
23
LOGIC PUZZLES
You visit an island where there are two kinds of inhabitants,
knights, who always tell the truth, and knaves, who always lie.
You encounter two people A and B. A says “ B is a knight” and
B says “ the two of us are opposite types”. What are A and B?
Let p: A is a knight
q: B is a knight
Suppose p is true,
A’s statement that B is a knight is true.
Contradiction with B’s statement, therefore p is false.
Suppose p is false, then q is false i.e. B is also a knave.
Therefore B’s statement is also false. Both A and B are knaves.
24
TAUTOLOGY:
A compound proposition that is always true, no
matter what the truth values of the propositions that
occurs in it, is called a tautology.
CONTRADICTION:
A compound proposition that is always false is
called a contradiction.
CONTINGENCY:
A compound proposition that is neither a tautology
or a contradiction is called a contingency.
25
Examples of a Tautology and a Contradiction.
p ¬p p ν ¬p p Λ ¬p
T F T F
F T T F
26
The compound propositions p and q are called
logically equivalent if p ↔ q is a tautology.
Notation p ≡ q
27
Logical Equivalences
Law Name
pFp Identity laws
pTp
pTT Domination laws
pFF
ppp Idempotent laws
ppp
( p) p Double-negation law
Law Name
pqqp Commutative
pqqp laws
(p q) r p (q r) Associative laws
(p q) r p (q r)
(p q) (p r) p (q r) Distributive laws
(p q) (p r) p (q r)
(p q) p q De Morgan’s laws
(p q) p q
p (p q) p Absorption laws
p (p q) p
Some useful logical
Equivalences
p p T
p p F
p → q p q
Example: Show that ¬(p → q ) and p Λ ¬q are logically equivalent.
Solution:
¬(p → q ) ≡ ¬(¬p ν q)
≡ ¬(¬p) Λ ¬q De Morgan’s law
≡ p Λ ¬q Double negation law
31
Prove Absorption Laws
p (p q) p
p (p q) p
Proof
p (p q) (p T) (p q)
p (T q)
pT
p