You are on page 1of 14

Propositional Logic

Lecture 03
Instructor: Engr. Iqra Saleem
Lecture Outline

• Introduction
• Propositions
• Compound Propositions
• Logical Equivalence
• Practice Questions
Introduction

• Logic – used to distinguish between valid and invalid mathematical arguments.


• Applications in computer science
• – design computer circuits,
• – construction of computer program, verification of the correctness of programs.
Propositions

• A statement that has a truth value either F or T, but never both.


– Propositional variables: p, q, r, s, . . .
– Truth values: T for true, F for false
– Eg:
– 1+ 1 = 2 – TRUE
– What time is it? NOT PROPOSITION
– Read this carefully. NOT PROPOSITION
– x + 1 = 2 – NOT PROPOSITION
Compound Propositions

Used to combine two or more propositions.


• Negation (not) p
• Conjunction (and) pq
• Disjunction (or) pq
• Implication pq
• Biconditional pq
Negation (not) p

• if a statement is true, then its negation is false and if a statement is false, then its
negation is true.
Conjunction (and) pq

• TRUE when both p and q are true, otherwise FALSE.


Disjunction (or) p  q

• FALSE when both p and q are FALSE and TRUE otherwise.


Implication pq

• Let p and q be a proposition. The implication is the preposition that is FALSE


when p is true, q is false, otherwise TRUE.
• If p, then q
• p = hypothesis/antecedent/premise.
• q = conclusion/consequence
Biconditional p  q

•  The biconditional is the preposition that is TRUE when p and q have the same
truth values, and FALSE otherwise.
• Express: “ p if and only if q”
Logically Equivalence

• Two propositions p and q are said to be logically equivalent, or simply equivalent or


equal, if they have identical truth tables.
• The logical equivalence of statement forms P and Q is denoted by writing
P ≡ Q.
• Examples
1.p∨p≡p
2.p∨q≡q∨p,
3.p∧q≡q∧p.
4.p∨(q∧r)≡(p∨q)∧(p∨r)
5.p∧(q∨r)≡(p∧q)∨(p∧r).
Problem

• In a room there are only two types of people, namely Type 1 and Type 2. Type 1
people always tell the truth and Type 2 people always lie. You give a fair coin to a
person in that room, without knowing which type he is from and tell him to toss it
and hide the result from you till you ask for it. Upon asking, the person replies the
following:
• “ The result of toss is head if and only if I am telling the truth”
Which of the following options is correct?
(A) The result is head
(B) The result is tail
(C) If the person is of Type 2, then the result is tail
(D) If the person is of Type 1, then the result is tai
Practice Exercise

Find the truth tables for the following statement forms:


• p∨ ∼ q
• p ∨ (q ∧ r)
• (p ∨ q) ∧ (p ∨ r)
Cont..

Prove that the below is statement is logically equivalent.


1) ∼ (p ∧ q) and ∼ p∨ ∼ q
2) (∼ p ∨ q) ∧ (∼ q) ≡∼ (p ∨ q).
3) (p∧ ∼ q) ∨ (∼ p ∨ q) ≡ t

You might also like