You are on page 1of 106

 At the end of the period, the student

should be able to:


 Identify propositions from non-
propositions
 Perform operations on simple or compound
propositions using logical operators.
 Find truth values of simple or compound
propositions, conditionals, bi-conditionals,
or propositional functions with or without
quantifiers.
 At the end of the period, the student
should be able to:
 Show logical equivalences of conditional or
bi-conditionals statements.
 Solve problems involving propositional logic
and truth values.
 Prove the validity of arguments by using
the rules of replacement or rules of
inference.
 Reproduce proofs of mathematical
theorems.
 We intuitively know that Truth and
Falsehood are opposites.
 That statements describe the world and
can be true/false.
 That the world is made up of objects and
that objects can be organized to form
collections.
 Axiom: False is the opposite to Truth.
 A statement is a description of something.
 Examples of statements:
 I’m 30 years old.
 I have 1 child.
 I always tell the truth.
 I’m lying to you.

 Question:
Which statements are True? False? Both?
Neither?
 Answers:
True: I have 1 child.
False: I’m 30 years old.
I always tell the truth.
Both: IMPOSSIBLE, by our Axiom.
Neither: I’m lying to you.
 Neither: I’m lying to you. (If viewed on its
own)
HUH? Well suppose that
 S = “I’m lying to you.”
were true.
 In particular, I am actually lying, so S is
false.
 So it’s both true and false, impossible by
the Axiom.
 Okay, so I guess S must be false.
But then I must not be lying to you.
So the statement is true.
Again it’s both true and false.
In both cases we get the opposite of our
assumption, so S is neither true nor
false.
 To avoid painful head-aches, we ban such
silly non-sense and avoid the most general
type of statements limiting ourselves to
statements with valid truth-values instead:

 DEF: A proposition is a statement that is


true or false.
 EXAMPLES:
 The following are propositions:
– the computer is on;
– the door is open;
– Lebron James is a basketball player.
 whereas the following are not:
– are you going out somewhere?
– 2+3
 Propositional Logic is a static discipline of
statements which lack semantic content.
 Example:
p = “Noynoy Aquino was the president.”
q = “The list of presidents includes
Noynoy Aquino.”
r = “Lions like to sleep.”
 p and q are no more closely related than q and
r are, in propositional calculus.
 They are both equally related as all three
statements are true.
 Propositional logic is the study of how
simple propositions can come together to
make more complicated propositions.
 If the simple propositions were endowed
with some meaning then the complicated
proposition would have meaning as well, and
then finding out the truth value is actually
important!
 In Propositional Logic, we assume a
collection of atomic propositions are
given:
p, q, r, s, t, …

 Then we form compound propositions by


using logical connectives (logical
operators) to form propositional
“molecules”.
 Logical Connectives
Operator Symbol Usage
Negation  not
Conjunction  and
Disjunction  or
Exclusive or  xor
Conditional  if, then
Biconditional  iff
 Examples:
p = “Cruise ships only go on big rivers.”
q = “Cruise ships go on the Hudson.”
r = “The Hudson is a big river.”
r = “The Hudson is not a big river.”
 pq = “Cruise ships only go on big rivers
and go on the Hudson.”
 pq r = “If cruise ships only go on big
rivers and go on the Hudson, then the
Hudson is a big river.”
 Negation:
 This just turns a false proposition to
true and the opposite for a true
proposition.
 Example:
p : “23 = 15 +7”
 p happens to be false, so p is true.
 So p has the boolean value true
whenever evaluated.
 Negation – truth table
 Logical operators are defined by truth
tables –tables which give the output of
the operator in the right-most column.
 Here is the truth table for negation:
p p
F T
T F
 Conjunction:
 Conjunction is a binary operator in that
it operates on two propositions when
creating compound proposition.
 On the other hand, negation is a unary
operator (the only non-trivial one
possible).
 Conjunction:
 Conjunction is supposed to encapsulate
what happens when we use the word
“and” in English.
for “p and q ” to be true, it must be
the case that BOTH p is true, as well
as q.
 If one of these is false, than the
compound statement is false as well.
 Conjunction:
 EG.
p = “Clinton was the president.”
q = “Monica was the president.”
r = “The meaning of is is important.”
 Assuming p and r are true, while q false.
Out of pq, pr, qr
only pr is true.
 Conjunction – truth table
p q p q
T T T
T F F
F T F
F F F
 Disjunction – truth table
 Conversely, disjunction is true when at
least one of the components is true:
p q p q
T T T
T F T
F T T
F F F
 Disjunction:
 Note: English version of disjunction
“or” does not always satisfy the
assumption that one of p/q being true
implies that “p or q ” is true.
 Disjunction:
 Example:
 Disjunction:
 Example:
A: The entrée is served with soup or
salad.
 Most restaurants definitely don’t allow
you to get both soup and salad so that
the statement is false when both soup
and salad is served.
 To address this situation, exclusive-or
is introduced next.
 Exclusive-Or – truth table
p q p q
T T F
T F T
F T T
F F F

 Note: in this course any usage of “or”


will connote the logical operator 
as opposed to the exclusive-or.
 Conditional (Implication):
 This one is probably the least intuitive.
It’s only partly akin to the English usage
of “if,then” or “implies”.
 DEF: p  q is true if q is true, or if p is
false. In the final case (p is true while q
is false) p  q is false.
 Semantics: “p implies q ” is true if one
can mathematically derive q from p.
 Conditional -- truth table
p q p q
T T T
T F F
F T T
F F T
 Conditional:
 Q: Does this makes sense? Let’s try
examples for each row of truth table:
If pigs like mud then pigs like mud.
If pigs like mud then pigs can fly.
If pigs can fly then pigs like mud.
If pigs can fly then pigs can fly.
 Answer:
1. If pigs like mud then pigs like mud.
True: nothing about this statement is
false.
2. If pigs like mud then pigs can fly.
False: seems to assert falsehood
 Answer:
3. If pigs can fly then pigs like mud.
True: argument for –only care about
end-result.
4. If pigs can fly then pigs can fly.
True. WAIT! By first reasoning in 3,
when “if” part is false, should only
care about “then” part!!!!!
 Conditional: Conditional: why FF is True
 Mathematically, p should imply q whenever
it is possible to derive q by from p by
using valid arguments.
 For example consider the mathematical
analog of no. 4:
 If 0 = 1 then 3 = 9.
 Q: Is this true mathematically?
 Conditional: why FF is True
A: YES mathematically and YES by the
truth table.
Here’s a mathematical proof:
1. 0 = 1 (assumption)
 Conditional: why FF is True
A: YES mathematically and YES by the
truth table.
Here’s a mathematical proof:
1. 0 = 1 (assumption)
2. 1 = 2 (added 1 to both sides)
 Conditional: why FF is True
A: YES mathematically and YES by the
truth table.
Here’s a mathematical proof:
1. 0 = 1 (assumption)
2. 1 = 2 (added 1 to both sides)
3. 3 = 6 (multiplied both sides by 3)
 Conditional: why FF is True
A: YES mathematically and YES by the
truth table.
Here’s a mathematical proof:
1. 0 = 1 (assumption)
2. 1 = 2 (added 1 to both sides)
3. 3 = 6 (multiplied both sides by 3)
4. 0 = 3 (multiplied no. 1 by 3)
 Conditional: why FF is True
A: YES mathematically and YES by the
truth table.
Here’s an example:
1. 0 = 1 (assumption)
2. 1 = 2 (added 1 to both sides)
3. 3 = 6 (multiplied both sides by 3)
4. 0 = 3 (multiplied no. 1 by 3)
5. 3 = 9 (added no. 3 and no. 4)
 Conditional synonyms:
 Q: There are many ways to express the
conditional statement p  q :
If p then q. p implies q. If p, q.
p only if q. p is sufficient for q.
 Some of the ways reverse the order of p
and q but have the same connotation:
q if p. q whenever p. q is necessary for
p.
 Bi-Conditional -- truth table :
 For p  q to be true, p and q must have
the same truth value. Else, p  q is false:
p q pq
T T T
T F F
F T F
F F T

 Q : Which operator is  the opposite of?


 Bi-Conditional -- truth table :
 A :  has exactly the opposite truth table
as .
 This means that we could have defined the
bi-conditional in terms of other previously
defined symbols, so it is redundant.
 In fact, we only need negation and
disjunction to define everything else.
 Extra operators are for convenience.
 Logical Equivalence:
 Suppose that the compound propositions P
and Q are made up of propositions p1, p2, …,
pn .
 We say that P and Q are logically
equivalent and write
𝑃≡𝑄
provided that given any interpretation of
p1, p2, …,pn, either P and Q are both true or
both false
 Two propositions are said to be logically
equivalent if their truth tables are identical.

p q ~p  q pq
TT TT TT TT

TT FF FF FF
FF TT TT TT
FF FF T
T TT

Example: ~p  q is logically equivalent to p  q


 De Morgan’s laws for logic:
~ (p  q) and (~p) ^ (~q)
~ (p ^ q) and (~p)  (~q)

 Distributive laws of propositions:


p  (q ^ r) = (p  q) ^ (p r)
p ^ (q  r) = (p ^ q)  (p ^ r)
 The converse of a conditional statement
is formed by interchanging the
hypothesis and conclusion of the original
statement.
In other words, the parts of the
sentence change places but the words
"if" and "then" do not leave their places.
 Conditional: "If x is a multiple of 4, then
x is divisible by 2.“
 Converse: "If x is divisible by 2, x is a
multiple of 4.“
 Is the Converse of a given condition
logically equivalent to the Condition?
 The truth table for the proposition & its
converse are p  q & q  p
p q pq qp
TT T
T T
T TT
TT FF FF TT
F T T F
F F T T
 The two propositions are not logically
equivalent
 The inverse of a conditional statement is
formed by negating the hypothesis and
negating the conclusion of the original
statement. In other words, the word "not"
is added to both parts of the sentence.
 Conditional: "If x is a multiple of 4, then
x is divisible by 2.“
 Inverse: "If x is not a multiple of 4, then
x is not divisible by 2.“
 Is the Inverse of a given condition logically
equivalent to the Condition? Or is it logically
equivalent to the Converse of the condition?

Condition converse Inverse


p q pq qp ~p  ~q
TT TT TT TT TT
TT F
F FF TT T
T
FF T
T TT F
F F
F

FF FF TT TT T
T
 The contrapositive of a conditional
statement is formed by
negating both the hypothesis and the
conclusion, and then
interchanging the resulting negations.

 In other words, the contrapositive negates


and switches the parts of the sentence.
It does BOTH the jobs of the INVERSE
and the CONVERSE
 Example: Contrapositive
 Conditional: "If x is a multiple of 4, then
x is divisible by 2.“

 Contrapositive: "If x is not divisible by


2, then x is not a multiple of 4."
 The Contrapositive of the proposition
p  q is ~q  ~p are logically equivalent.

p q pq ~q  ~p
T T T T
T F F F
F T T T
F F T T
 The double implication “p if and only if q” is
defined in symbols as p  q
p q pq (p  q) ^ (q  p)
T T T T
T F F F
F T F F
F F T T

p  q is logically equivalent to (p q)^(q  p)


 A proposition is a tautology if its truth table
contains only true values for every case
Example: p  p v q
p q ppvq
T T T
T F T
F T T
F F T
 A proposition is a contradiction if its truth
table contains only false values for every case
Example: p ^ ~p

p p ^ (~p)
T F
F F
 A tautology is a compound proposition that is
always true
 A contradiction is a compound proposition
that is always false.
 Example:
 Two compound propositions, P and Q, are
logically equivalent if P  Q is a tautology.
 Notation: P  Q
De Morgan’s Laws:
p q  p q
p q  p q
Let’s build a truth table!


 List of Logical Equivalences:
 Identity Laws
pT  p
pF  p
 Domination Laws
pT  T
pF  F
 Idempotent Laws
pp  p
pp  p
 List of Logical Equivalences:
 Double Negation Law
(p)  p
 Tautology
p  p  T
 Contradiction
p  p  F
 List of Logical Equivalences:
 Commutative Laws
pq  qp
pq  qp
 Associative Laws
(pq) r  p (qr)
(pq)  r  p  (qr)
 Distribution Laws
p(qr)  (pq)(pr)
p(qr)  (pq)(pr)
 List of Logical Equivalences:
 De Morgan’s Laws
(pq)  (p  q)
(pq)  (p  q)
 Implication Equivalence
(pq)  (p  q)
 Biconditional Equivalence
pq  (pq)  (qp)
 Show
 Conditionals
p  q  p  q
p  q  q  p
 p  q   p  q
 Biconditionals
p  q  p  q q  p
p  q  p q
 p  q  p q
 Biconditionals
~ is the highest
^


↔ lowest
 Example:
 The proposition
~p^qr↔qp^r
is equivalent to or is computed according to:
(((~p) ^ q)  r) ↔ ( q  (p ^ r))
Prove:
 (p ⇒ (q ∧ r)) ⇔ (p ⇒ q) ∧ (p ⇒ r)
 (p ⇒ (q ⇒ r)) ⇒ ((p ∧ q) ⇒ r)
 ((¬r ⇒ ¬p ∧ ¬q) ∨ s) ⇔ (p ∨ q ⇒ r ∨ s)
 (p ∧ (q ⇒ r)) ⇔ ((¬p ∨ q) ⇒ (p ∧ r))

Lecture 1 64
 The Proof Process

Assumptions

-Definitions
-Already-proved
Logical Steps equivalences
-Statements
(e.g., arithmetic
or algebraic)

Conclusion
(That which was to be proved)
 Prove: (pq)  q  pq
(pq)  q Left-Hand Statement
 q  (pq) Commutative
 (qp)  (q q) Distributive
 (qp)  T Or Tautology
 qp Identity
 pq Commutative
 Prove: p  q  q  p
pq
 p  q Implication Equivalence
 q  p Commutative
 (q)  p Double Negation
 q  p Implication Equivalence
 Prove : p  p  q is a tautology
ppq
 p  (p  q) Implication Equivalence
 (p  p)  q Associative
 (p  p)  q Commutative
 Tq Or Tautology
 qT Commutative
T Domination
This tautology is called the addition rule of inference.
 Prove : (pq)  p is a tautology
(pq)  p
 (pq)  p Implication Equivalence
 (pq)  p DeMorgan’s
 (qp)  p Commutative
 q (p  p) Associative
 q (p  p) Commutative
 q T Or Tautology
 T Domination
 Exercise:
 1. Prove: (¬p→r) ∧ (¬p→¬r) ≡ p
 2. Prove: ¬ (p v (¬p ∧ q)) ≡ ¬p ∧ ¬q
 3. ((¬r ⇒ ¬p ∧ ¬q) ∨ s) ⇔ (p ∨ q ⇒ r ∨ s)
 Prove or Disprove:
 To prove that something is not true it is
enough to provide one counter-example.
(Something that is true must be true in every
case.)
p  q  p  q ???
p q pq pq
---------------------
F T T F
The statements are not logically equivalent
A mathematical system consists of
Undefined terms
Definitions
Axioms
 Undefined terms are the basic building
blocks of a mathematical system.
 These are words that are accepted as
starting concepts of a mathematical system.
Example:
In Euclidean geometry we have undefined
terms such as
Point
Line
 A definition is a proposition constructed from
undefined terms and previously accepted
concepts in order to create a new concept.
 Example:
In Euclidean geometry:
Two triangles are congruent if their
vertices can be paired so that the
corresponding sides are equal and so are
the corresponding angles.
 An axiom is a proposition accepted as true
without proof within the mathematical
system.
Example: In Euclidean geometry the
following are axioms.
Given two distinct points, there is
exactly one line that contains them.
Given a line and a point not on the line,
there is exactly one line through the
point which is parallel to the line.
 A theorem is a proposition of the form
p  q
 which must be shown to be true by a sequence
of logical steps that assume that p is true,
and use definitions, axioms and previously
proven theorems.
 A proof is a logical argument that consists of
a series of steps using propositions in such a
way that the truth of the theorem is
established.
 Direct proof: p  q
A direct method of attack that assumes
the truth of proposition p, axioms and
proven theorems so that the truth of
proposition q is obtained.
 Indirect proofs:
 The method of proof by contradiction of a
theorem p  q consists of the following
steps:
1. Assume p is true and q is false
2. Show that ~p is also true.
3. Then we have that p ^ (~p) is true.
4. But this is impossible, since the
statement p ^ (~p) is always false. There
is a contradiction!
5. So, q cannot be false and therefore it is
true.
 Indirect proofs:
 The method of proof by showing that the
Contrapositive (~q)  (~p) is true.
Since (~q)  (~p) is logically equivalent to
p  q,
then the theorem is proved.
 Deductive reasoning: the process of
reaching a conclusion q from a sequence of
propositions p1, p2, …, pn.
 The propositions p1, p2, …, pn are called
premises or hypothesis.
 The proposition q that is logically obtained
through the process is called the conclusion.
 The argument is valid provided that if p1,
p2,…pn are all true, then q must be true;
otherwise the argument is invalid ( or a
fallacy)
 1. Law of detachment or modus
ponens
p  q
p
Therefore, q

 2. Modus tollens
p  q
~q
Therefore, ~p
 Modus Ponens
 3. Rule of Addition
p
Therefore, p  q

 4. Rule of simplification
p ^ q
Therefore, p
 5. Rule of conjunction
p
q
Therefore, p ^ q

 6. Rule of hypothetical syllogism


p  q
q  r
Therefore, pr
 7. Rule of disjunctive syllogism
p  q
~p
Therefore, q
 Truth tables, as we have seen, can
theoretically be used to solve any question in
classical truth-functional propositional logic.
 However, this method has its drawbacks.
 The size of the tables grows exponentially
with the number of distinct statement letters
making up the statements involved.
 Moreover, truth tables are alien to our normal
reasoning patterns.
 Another method for establishing the validity
of an argument exists that does not have
these drawbacks: the method of natural
deduction.
 In natural deduction an attempt is made to
reduce the reasoning behind a valid argument
to a series of steps each of which is
intuitively justified by the premises of the
argument or previous steps in the series.
 Consider the following argument stated in
natural language:
 Either cat fur or dog fur was found at the
scene of the crime. If dog fur was found at
the scene of the crime, officer Thompson
had an allergy attack. If cat fur was found at
the scene of the crime, then Macavy is
responsible for the crime.
 But officer Thompson didn’t have an allergy
attack, and so therefore Macavy must be
responsible for the crime.
 The validity of this argument can be made more
obvious by representing the chain of reasoning
leading from the premises to the conclusion:
 1. Either cat fur was found at the scene of the
crime, or dog fur was found at the scene of the
crime. (Premise)
 2. If dog fur was found at the scene of the
crime, then officer Thompson had an allergy
attack. (Premise)
 3. If cat fur was found at the scene of the
crime, then Macavy is responsible for the crime.
(Premise)
 4. Officer Thompson did not have an allergy attack.
(Premise)
 5. Dog fur was not found at the scene of the crime.
(Follows from 2 and 4.)
 6. Cat fur was found at the scene of the crime.
(Follows from 1 and 5.)
 7. Macavy is responsible for the crime. (Conclusion.
Follows from 3 and 6.)
 In this example, the form of reasoning exemplified
in line 5 is called modus tollens.
 The form of reasoning exemplified in step 6 is
called disjunctive syllogism.
 Lastly, the form of reasoning found at line 7 is
called modus ponens.
 “Modus ponens” is Latin for affirming mode, and
“modus tollens” is Latin for denying mode.
 A direct deduction of a conclusion from a set of
premises consists of an ordered sequence of
statements such that each member of the sequence is
either
 (1) a premise,
 (2) derived from previous members of the sequence
by one of the inference rules,
 (3) derived from a previous member of the sequence
by the replacement of a logically equivalent part
according to the rules of replacement, and such that
the conclusion is the final step of the sequence.
 Example:
 Prove:
 Given
 pq
 ~p  r
 Therefore,
 qr
 Proof:
1. p  q premise
2. ~p  r premise
3. p  q Ξ ~ ~p  q double negation
4. ~ ~p  q Ξ ~p  q implication equivalence
5. ~p  q Ξ ~q  p contrapositive
6. ~p  r Ξ p  r implication equivalence
7. ~q  p & p  r
implies ~q  r hypothetical syllogism
8. ~q  r Ξ q  r implication equivalence
 Example:
 Given
 p  (p q)
 p
 show
 q and p  q
 Proof:
1. p  (p q) premise
2. p premise
3. p  (p q) ↔ ~ p  (p q)
4. ↔ ~ p  (~ p  q)
5. ↔ (~ p  ~ p)  q
6. ↔~pq
7. p
8. From 6, 7, and rule 7 q
9. From 7, 8 since p & q then p  q
 Example: (Indirect Proof)
 Let p, q, r & s be four propositions such
that
 p v q,
 p  r,
 qs
 therefore
 rvs
 Proof:
1. Assume ~ (r v s)= ~r ^ ~s.
2. ~r & ~s are true from rule 4
3. ~p v r from p  r
4. ~q v s from q  s
5. ~p from 3, 2 and rule 7
6. ~q from 4, 2 and rule 7
7. ~(pvq) from De Morgans’s
8. Contradicting p v q
 Exercise:
Prove:
P → (Q v R)
P → ¬S
S↔Q
P→R
 Proof:
1. P → (Q v R) Premise
2. P → ¬S Premise
3. S ↔ Q Premise
4. P Assumption
5. 1,4 MP
6. 2,4 MP
7. 3 Equiv
8. 7 Simp
9. 6,8 MT
10. 5,9 DS
11. 4-10 CP
 Proof:
1. P → (Q v R) Premise
2. P → ¬S Premise
3. S ↔ Q Premise
4. P Assumption
5. Q v R 1,4 MP
6. ¬S 2,4 MP
7. (S → Q) & (Q → S) 3 Equiv
8. Q → S 7 Simp
9. ¬Q 6,8 MT
10. R 5,9 DS
11. P → R 4-10 CP
 Exercise:
Prove:
P ↔ Q
(S v T) → Q
¬P v (¬T & R)
T→U
 Proof:
1. P ↔ Q Premise
2. (S v T) → Q Premise
3. ¬P v (¬T & R) Premise
4. (P → Q) & (Q → P) 1 Equiv
5. Q → P 4 Simp
6. (S v T) → P 2,5 HS
7. P → (¬T & R) 3 Impl
8. (S v T) → (¬T & R) 6,7 HS
9. ¬(S v T) v (¬T & R) 8 Impl
10. (¬S & ¬T) v (¬T & R) 9 DM
11. [(¬S & ¬T) v ¬T] & [(¬S &
10 Dist
¬T) v R]
12. (¬S & ¬T) v ¬T 11 Simp
13. ¬T v (¬S & ¬T) 12 Com
14. (¬T v ¬S) & (¬T v ¬T) 13 Dist
15. ¬T v ¬T 14 Simp
16. ¬T 15 Taut
17. ¬T v U 16 Add
 Exercise:
 Constructive dilemma (CD):
(α → γ) & (β → δ)
αvβ
γvδ
 Prove:
(p ⇒ (q ∧ r)) ⇔ (p ⇒ q) ∧ (p ⇒ r)
(p ⇒ (q ⇒ r)) ⇒ ((p ∧ q) ⇒ r)
(¬p ∨ ¬q) ⇒ ¬(p ∧ q)
((¬r ⇒ ¬p ∧ ¬q) ∨ s) ⇔ (p ∨ q ⇒ r ∨ s)
(p ∧ (q ⇒ r)) ⇔ ((¬p ∨ q) ⇒ (p ∧ r))
((¬p ∨ q) ⇒ (q ∧ (p ⇔ q))
((¬p ⇒ q) ⇒ (¬q ⇒ p)) ∧ (p ∨ q)

You might also like