0% found this document useful (0 votes)
3 views

Lecture 2 Propositional Logic

The document provides an overview of propositional logic, defining propositions, atomic propositions, and various logical connectives such as negation, conjunction, disjunction, and implication. It also discusses logical equivalences, including tautologies and contradictions, and presents truth tables for different operations. The presentation concludes with examples and a quiz to reinforce understanding of the concepts covered.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Lecture 2 Propositional Logic

The document provides an overview of propositional logic, defining propositions, atomic propositions, and various logical connectives such as negation, conjunction, disjunction, and implication. It also discusses logical equivalences, including tautologies and contradictions, and presents truth tables for different operations. The presentation concludes with examples and a quiz to reinforce understanding of the concepts covered.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

Propositional Logic

Dr. Maryam Khan


Presentation Outline
• What is Proposition Logic?
• What is Atomic Proposition?
• Connectives/Operations
• Logical Equivalences
• Quiz
Definition
• Proposition: A proposition is a statement that is either true
or false, but not both.
– Example: "Grass is green and snow is white“.

• Atomic Proposition: a unit in a proposition statement, a


fundamental block in a proposition statement
– Example:
• Grass is green
• Snow is white
Connectives / Operations
• Proposition statements or formulas are constructed from atomic
propositions by using logical connectives
C1. Negation
Table 1.
The Truth Table for the
Let p be a proposition. Negation of a Proposition

p ¬p
The statement “It is not the case that
p” is also a proposition, called the T F
“negation of p” or ¬p (read “not p”)
F T
p = The sky is blue.
p = The sky is not blue.
C2. Conjunction (AND)
Let p and q be propositions. Table 2. The Truth Table for
the Conjunction of two
propositions
The proposition “p and q,” denoted by pq
is true when both p and q are true and is p q pq
false otherwise.
T T T
T F F
This is called the conjunction of p and q. F T F
F F F
C3. Disjunction (OR)
Let p and q be propositions. Table 3. The Truth Table for
the Disjunction of two
propositions

The proposition “p or q,” denoted by


pq, is the proposition that is false p q pq
when p and q are both false and
T T T
true otherwise. T F T
F T T
F F F
C4. Exclusive OR
Let p and q be propositions. Table 4. The Truth Table for
the Exclusive OR of two
propositions

The exclusive or of p and q, denoted p q pq


by pq, is the proposition that is
true when exactly one of p and q is T T F
true and is false otherwise. T F T
F T T
F F F
C5. Implication p→q
Let p and q be propositions.
Table 5. The Truth Table for
the Implication of p→q.

The implication p→q is the proposition


that is false when p is true and q is p q p→q
false, and true otherwise.
T T T
In this implication p is called the T F F
hypothesis (or antecedent or premise) F T T
and q is called the conclusion (or F F T
consequence).
C5. Implication p→q
How can both p and q be false, and p→q be true?
•Think of p as a “contract” and q as its “obligation” that is only carried out if the
contract is valid.

•Example 1: “If you make more than $25,000, then you must file a tax return.”
This says nothing about someone who makes less than $25,000. So the
implication is true no matter what someone making less than $25,000 does.

•Example 2:
p: Bill Gates is poor.
q: Cows can fly.
p→q is always true because Bill Gates is not poor. Another way of saying the
implication is “Cows can fly whenever Bill Gates is poor” which is true since
neither p nor q is true.
C6. Equivalence - XNOR
Let p and q be propositions.
Table 6. The Truth Table for
the biconditional pq.

The proposition that is true when p and


p q p.q
q have the same truth values and is
false otherwise. T T T
T F F
F T F
“p if and only if q, p is necessary and
F F T
sufficient for q”
Practice 1
p: You learn the simple things well.
q: The difficult things become easy.
• You do not learn the simple things well. p

• If you learn the simple things well then the difficult things become easy. p→q

• If you do not learn the simple things well, then the difficult things will not
become easy. p → q

• The difficult things become easy or you did not learn the simple things well.
q  p

• You learn the simple things well and the difficult things did not become easy.
p  q
PL Terminologies
• User defines the semantics of each propositional symbol:
– P means “It is hot”
– Q means “It is humid”
– R means “It is raining”
• Example:
– (P  Q) → R
“If it is hot and humid, then it is raining”
–Q→P
“If it is humid, then it is hot”

13
Logical Equivalence
• An important technique in proofs is to replace a statement
with another statement that is “logically equivalent.”

• Tautology: compound proposition that is always true


regardless of the truth values of the propositions in it.
– p  p  T
• Contradiction: Compound proposition that is always false
regardless of the truth values of the propositions in it.
– p  p  F
Logically Equivalent
• Compound propositions P and Q are logically
equivalent if P Q is a tautology. In other words, P
and Q have the same truth values for all combinations
of truth values of simple propositions.
• This is denoted: PQ
Example: DeMorgans
• Prove that (pq)  (p  q)
p q (pq) (pq) p q (p  q)
TT T F F F F
TF T F F T F
FT T F T F F
FF F T T T T
Example: Distribution
Prove that: p  (q  r)  (p  q)  (p  r)

p q r qr p(qr) pq pr (pq)(pr)


T T T T T T T T
T T F F T T T T
T F T F T T T T
T F F F T T T T
F T T T T T T T
F T F F F T F F
F F T F F F T F
F F F F F F F F
Prove: pq(p→q)  (q→p)
pq pq p→q q→p (p→q)(q→p)
TT T T T T
TF F F T F
FT F T F F
FF T T T T

We call this biconditional equivalence.


List of Logical Equivalences
pT  p; pF  p Identity Laws

pT  T; pF  F Domination Laws

pp  p; pp  p Idempotent Laws

(p)  p Double Negation Law

pq  qp; pq  qp Commutative Laws

(pq) r  p (qr); (pq)  r  p  (qr) Associative Laws


List of Equivalences
p(qr)  (pq)(pr) Distribution Laws
p(qr)  (pq)(pr)

(pq)(p  q) De Morgan’s Laws


(pq)(p  q)

(p→q)  (p  q) Implication Equivalence

pq(p→q)  (q→p) Biconditional Equivalence


Summary
• Logical constants: true, false
• Propositional symbols: P, Q, S, ... (atomic sentences)
• Wrapping parentheses: ( … )
• Sentences are combined by connectives:
 ...and [conjunction]
 ...or [disjunction]
→ ...implies [implication / conditional]
 ... is equivalent [biconditional]
 ...not [negation]
21
Quiz!!

You might also like