SlideShare a Scribd company logo
2
Most read
3
Most read
6
Most read
Gazi Zahirul Islam, Assistant Professor, Department of CSE, Daffodil International University, Dhaka
1
Propositional Logic:
A proposition is a declarative sentence that is either true or false, but not both.
EXAMPLE 1:
All the following declarative sentences are propositions.
1. Washington, D.C., is the capital of the United States of America.
2. Toronto is the capital of Canada.
3. 1 + 1 = 2.
4. 2 + 2 = 3.
Propositions 1 and 3 are true, whereas 2 and 4 are false.
Some sentences that are not propositions are given in Example 2.
EXAMPLE 2:
Consider the following sentences.
1. What time is it?
2. Read this carefully.
3. x + 1 = 2.
4. x + y = z.
Sentences 1 and 2 are not propositions because they are not declarative sentences. Sentences 3 and
4 are not propositions because they are neither true nor false. Note that each of sentences 3 and 4
can be turned into a proposition if we assign values to the variables.
DEFINITION 1:
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 “not p.” The truth value of the negation of p, ¬p, is the opposite of the
truth value of p.
EXAMPLE 3:
Find the negation of the proposition
“Michael’s PC runs Linux”
and express this in simple English.
Solution:
The negation is
“It is not the case that Michael’s PC runs Linux.”
This negation can be more simply expressed as
Gazi Zahirul Islam, Assistant Professor, Department of CSE, Daffodil International University, Dhaka
2
“Michael’s PC does not run Linux.”
Truth Table:
Table 1 displays the truth table for the negation of a proposition p.
DEFINITION 2
Let p and q be propositions. The conjunction of p and q, denoted by p ∧ q, is the proposition “p and
q.” The conjunction p ∧ q is true when both p and q are true and is false otherwise. Table 2 displays
the truth table of p ∧ q.
EXAMPLE 4:
Find the conjunction of the propositions p and q where p is the proposition “Today is Friday ” and q
is the proposition “It is raining today”
Solution: The conjunction of these propositions, p ∧ q, is the proposition “Today is Friday and it is
raining today”
DEFINITION 3:
Gazi Zahirul Islam, Assistant Professor, Department of CSE, Daffodil International University, Dhaka
3
Let p and q be propositions. The disjunction of p and q, denoted by p ∨ q, is the proposition “p or
q.” The disjunction p ∨ q is false when both p and q are false and is true otherwise. Table 3 displays
the truth table for p ∨ q.
EXAMPLE 5:
Find the disjunction of the propositions p and q where p is the proposition “Today is Friday ” and q is
the proposition “It is raining today”
Solution: The conjunction of these propositions, p ∨ q, is the proposition “Today is Friday or it is
raining today”
DEFINITION 4:
Let p and q be propositions. The exclusive or of p and q, denoted by p ⊕ q, is the proposition that is
true when exactly one of p and q is true and is false otherwise. The truth table for the exclusive or of
two propositions is displayed in Table 4.
Gazi Zahirul Islam, Assistant Professor, Department of CSE, Daffodil International University, Dhaka
4
DEFINITION 5: Let p and q be propositions. The conditional statement p → q is the proposition “if p,
then q.” The conditional statement p → q is false when p is true and q is false, and true otherwise.
In the conditional statement p → q, p is called the hypothesis (or antecedent or premise)and q is
called the conclusion (or consequence). The conditional statement is also known as implication.
EXAMPLE 6:
Let, p be the statement “I am elected” and q “I will lower taxes” then implication p → q will be
“ If I am elected, then I will lower taxes ”
CONVERSE, CONTRAPOSITIVE, AND INVERSE:
The proposition q → p is called the converse of p → q. The contrapositive of p → q is the
proposition ¬q →¬p. The proposition ¬p →¬q is called the inverse of p → q. Out of these, only
the contrapositive always has the same truth value as p → q.
EXAMPLE 7:
What are the contrapositive, the converse, and the inverse of the conditional statement “The home
team wins whenever it is raining?”
Solution:
Because “q whenever p” is one of the ways to express the conditional statement p → q, the original
statement can be rewritten as
“If it is raining, then the home team wins.”
Where, p denotes “It is raining” and q denotes “The home team wins”.
Gazi Zahirul Islam, Assistant Professor, Department of CSE, Daffodil International University, Dhaka
5
The contrapositive (¬q →¬p) of this conditional statement is
“If the home team does not win, then it is not raining.”
The converse (q → p) is
“If the home team wins, then it is raining.”
The inverse (¬p →¬q) is
“If it is not raining, then the home team does not win.”
Only the contrapositive is equivalent to the original statement.
DEFINITION 6:
Let p and q be propositions. The biconditional statement p ↔ q is the proposition “p if and only if q.”
The biconditional statement p ↔ q is true when p and q have the same truth values, and is false
otherwise. Biconditional statements are also called ‘bi-implications’, ‘exclusive nor’ and
‘equivalance’.
The truth table for p ↔ q is shown in Table 6
Gazi Zahirul Islam, Assistant Professor, Department of CSE, Daffodil International University, Dhaka
6
Propositional Equivalences
DEFINITION 1: A compound proposition that is always true is called a tautology. A compound
proposition that is always false is called a contradiction. A compound proposition that is neither a
tautology nor a contradiction is called a contingency.
Example 1 illustrates these types of compound propositions.
EXAMPLE 1:
Consider the truth tables of p ∨¬p and p ∧¬p, shown in Table 1. Because p ∨¬p is always true,
it is a tautology. Because p ∧¬p is always false, it is a contradiction.
DEFINITION 2:
Compound propositions that have the same truth values in all possible cases are called logically
equivalent. The notation p ≡ q denotes that p and q are logically equivalent.
EXAMPLE 2: Show that ¬(p ∨ q) and ¬p ∧¬q are logically equivalent.
Solution:
EXAMPLE 3: Show that p → q and ¬p ∨ q are logically equivalent.
Gazi Zahirul Islam, Assistant Professor, Department of CSE, Daffodil International University, Dhaka
7
Solution:
EXAMPLE 4:
Show that p ∨ (q ∧ r) and (p ∨ q) ∧ (p ∨ r) are logically equivalent.
Solution:
Table 6 contains some important logical equivalances and laws.
Gazi Zahirul Islam, Assistant Professor, Department of CSE, Daffodil International University, Dhaka
8
EXAMPLE 5: Show that ¬(p ∨ (¬p ∧ q)) and ¬p ∧¬q are logically equivalent by developing a
series of logical equivalences.
Solution:
¬(p ∨ (¬p ∧ q))
≡ ¬p ∧¬(¬p ∧ q) by the second De Morgan law
≡ ¬p ∧ [¬(¬p)∨¬q] by the first De Morgan law
≡ ¬p ∧ (p ∨¬q) by the double negation law
≡ (¬p ∧ p) ∨ (¬p ∧¬q) by the second distributive law
Gazi Zahirul Islam, Assistant Professor, Department of CSE, Daffodil International University, Dhaka
9
≡ F ∨ (¬p ∧¬q) because ¬p ∧ p ≡ F
≡ (¬p ∧¬q) ∨ F by the commutative law for disjunction
≡ ¬p ∧¬q by the identity law for F
Consequently ¬(p ∨ (¬p ∧ q)) and ¬p ∧¬q are logically equivalent.
EXAMPLE 6:
Show that (p ∧ q) → (p ∨ q) is a tautology.
Solution:
(p ∧ q) → (p ∨ q)
≡ ¬(p ∧ q) ∨ (p ∨ q)
≡ (¬p ∨¬q) ∨ (p ∨ q) by the first De Morgan law
≡ (¬p ∨ p) ∨ (¬q ∨ q) by the associative and commutative laws for disjunction
≡ T ∨ T by the commutative law for disjunction
≡ T by the domination law
Gazi Zahirul Islam, Assistant Professor, Department of CSE, Daffodil International University, Dhaka
10
Predicates and Quantifiers
Statements involving variables, such as
“x > 3,” “x = y + 3,” “x + y = z”
are often found in mathematical assertions, in computer programs, and in system specifications.
These statements are neither true nor false when the values of the variables are not specified.
We can denote the statement “x is greater than 3” by P(x), where P denotes the predicate “is greater
than 3” and x is the variable. The statement P(x) is also said propositional function.
EXAMPLE 1:
Let P(x) denote the statement “x > 3.” What are the truth values of P(4) and P(2)?
Solution:
We obtain the statement P(4) by setting x = 4 in the statement “x > 3.” Hence,
P(4), which is the statement “4 > 3,” is true. However, P(2), which is the statement “2 > 3,”
is false.
EXAMPLE 2:
Let Q(x, y) denote the statement “x = y + 3.” What are the truth values of the propositions Q(1, 2)
and Q(3, 0)?
Solution:
To obtain Q(1, 2), set x = 1 and y = 2 in the statement Q(x, y). Hence, Q(1, 2) is the statement “1 = 2 +
3,” which is false. The statement Q(3, 0) is the proposition “3 = 0 + 3,” which is true.
EXAMPLE 3:
Let R(x, y, z) denote the statement “x + y = z”. What are the truth values of the propositions R(1, 2, 3)
and R(0, 0, 1)?
Solution: The proposition R(1, 2, 3) is obtained by setting x = 1, y = 2, and z = 3 in the statement R(x,
y, z). We see that R(1, 2, 3) is the statement “1 + 2 = 3,” which is true. Also note that R(0, 0, 1), which
is the statement “0 + 0 = 1,” is false.
DEFINITION 1: The universal quantification of P(x) is the statement
“P(x) is true for all values of x in the domain.”
The notation ∀xP(x) denotes the universal quantification of P(x). Here ∀ is called the universal
quantifier.
Gazi Zahirul Islam, Assistant Professor, Department of CSE, Daffodil International University, Dhaka
11
EXAMPLE 4: Let P(x) be the statement “x + 1 > x.” What is the truth value of the quantification
∀xP(x), where the universe of discourse (domain)consists of all real numbers?
Solution: Because P(x) is true for all real numbers x, the quantification
∀xP(x)
is true.
EXAMPLE 5:
Let Q(x) be the statement “x < 2.” What is the truth value of the quantification ∀xQ(x), where the
domain consists of all real numbers?
Solution:
Q(x) is not true for every real number x, because, for instance, Q(3) is false. Thus
∀xQ(x)
is false.
EXAMPLE 6: What is the truth value of ∀xP(x), where P(x) is the statement “x2
< 10” and the
universe of discourse consists of the positive integers not exceeding 4?
Solution:
Since P(4), which is the statement “42
< 10,” is false,
it follows that ∀xP(x) is false.
EXAMPLE 7:
What is the truth value of ∀x(x2
≥ x) if the domain consists of all real numbers? What is the truth
value of this statement if the domain consists of all integers?
Solution:
The universal quantification ∀x(x2
≥ x) is false, where the domain consists of all real numbers. For
example,
Consequently, x2
≥ x if and only if x ≤ 0 or x ≥ 1. Therefore, if the domain consists of the integers,
∀x(x2
≥ x) is true, because there are no integers x with 0 < x < 1.
DEFINITION 2:
The existential quantification of P(x) is the proposition
“There exists an element x in the universe of discourse such that P(x) is true.”
Gazi Zahirul Islam, Assistant Professor, Department of CSE, Daffodil International University, Dhaka
12
We use the notation ∃xP(x) for the existential quantification of P(x). Here ∃ is called the existential
quantifier.
EXAMPLE 8:
Let P(x) denote the statement “x > 3.” What is the truth value of the quantification ∃xP(x), where
the domain consists of all real numbers?
Solution:
When x = 4 for instance, the statement “x > 3” is true.
Therefore, the existential quantification ∃xP(x) is true.
EXAMPLE 9:
Let Q(x) denote the statement “x = x + 1.”What is the truth value of the quantification ∃xQ(x),
where the domain consists of all real numbers?
Solution: Since Q(x) is false for every real number x, the existential quantification of Q(x), which is
∃xQ(x), is false.
Negating Quantified Expressions:
Case 1: ¬∀xP(x) ≡ ∃x ¬P(x)
Case 2: ¬∃xQ(x) ≡ ∀x ¬Q(x)
Case 1:
Consider the statement,
“Every student in the class has taken a course in calculus.”
This statement is a universal quantification, namely,
∀xP(x),
where P(x) is the statement “x has taken a course in calculus” and the domain consists of the
students in the class.
The negation of this statement is “There is a student in the class who has not taken a course in
calculus.” And this is simply the existential quantification, namely,
∃x ¬P(x).
This example illustrates the following logical equivalence:
¬∀xP(x) ≡ ∃x ¬P(x).
Gazi Zahirul Islam, Assistant Professor, Department of CSE, Daffodil International University, Dhaka
13
Case 2:
Consider the proposition,
“There is a student in this class who has taken a course in calculus.” This is the existential
quantification
∃xQ(x),
where Q(x) is the statement “x has taken a course in calculus.”
The negation of this statement is the proposition “Every student in this class has not taken calculus,”
And this is simply the universal quantification, namely,
∀x ¬Q(x).
This example illustrates the equivalence
¬∃xQ(x) ≡ ∀x ¬Q(x).

More Related Content

PPTX
Chapter 4 logical reasoning
PPT
Kant power point
PDF
Socratic method
PPTX
Empiricism and Rationalism
PPTX
Lexical variation
PPTX
Rationalism
DOCX
Krashen
PDF
Cross-lingual Information Retrieval
Chapter 4 logical reasoning
Kant power point
Socratic method
Empiricism and Rationalism
Lexical variation
Rationalism
Krashen
Cross-lingual Information Retrieval

What's hot (20)

PPTX
Natural Language Processing
PPTX
Phrase Structure Tree
PPTX
"Linguistics is a Science"
PPT
12 metaphysics
DOCX
General introduction to logic
PPTX
Dulce, evangeline l empiricism
PPTX
Empiricism and Rationalism
PDF
How does Optimality Theory work? -Aicha Adoui
PPTX
Turn taking in conversations ppt
ODP
Syllogism
PPTX
Components of language
PPTX
Pakistani English Vs. British English
PPT
Deductive and Inductive Arguments
PPTX
Analytical philosophy
PDF
Language Planning and Policy
PPTX
CMSC 56 | Lecture 2: Propositional Equivalences
PPTX
Logic Ppt
PDF
Formal Logic - Lesson 7 - Rules of Inference
DOCX
Rules of inference
PPTX
Introduction to Logic
Natural Language Processing
Phrase Structure Tree
"Linguistics is a Science"
12 metaphysics
General introduction to logic
Dulce, evangeline l empiricism
Empiricism and Rationalism
How does Optimality Theory work? -Aicha Adoui
Turn taking in conversations ppt
Syllogism
Components of language
Pakistani English Vs. British English
Deductive and Inductive Arguments
Analytical philosophy
Language Planning and Policy
CMSC 56 | Lecture 2: Propositional Equivalences
Logic Ppt
Formal Logic - Lesson 7 - Rules of Inference
Rules of inference
Introduction to Logic
Ad

Viewers also liked (14)

PPT
Object oriented programming using c++
PPT
Communication primitives
PDF
CS9222 ADVANCED OPERATING SYSTEMS
PPT
Predicates and Quantifiers
PDF
Deductive Databases
PPT
Aggrement protocols
PDF
CS9222 ADVANCED OPERATING SYSTEMS
PPT
Chapter24
PPT
Syntax and semantics of propositional logic
PPT
Predicate Logic
PPT
Cipher techniques
PPT
Advantages and disadvantages of multimedia
PPT
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
PPT
Propositional And First-Order Logic
Object oriented programming using c++
Communication primitives
CS9222 ADVANCED OPERATING SYSTEMS
Predicates and Quantifiers
Deductive Databases
Aggrement protocols
CS9222 ADVANCED OPERATING SYSTEMS
Chapter24
Syntax and semantics of propositional logic
Predicate Logic
Cipher techniques
Advantages and disadvantages of multimedia
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
Propositional And First-Order Logic
Ad

Similar to Propositional logic (20)

PPT
desmath(1).ppt
PPT
Discrete mathematics Chapter1 presentation.ppt
PPT
First order predicate logic - Artificial Intelligence
PPTX
proposition Logic-1.pptx Discrete Mathematics
PPT
PPT
PROPOTIONAL CALCULUS for students to.ppt
PDF
Propositional Calculus-Discrete Mathematics
PPTX
CSE-203 Lec_1.pptx
PDF
Propositional Logic.pdf
PPT
lectures in prolog in order to advance in artificial intelligence
PPT
Chapter 1: The Foundations: Logic and Proofs
PPTX
Chapter1p1
PDF
Unit I discrete mathematics lecture notes
PDF
Chapter 01 - p1.pdf
PPTX
LOGIC.pptx. To uphold certainty in validity of mathematical statements or to ...
PPTX
Unit 1-logic
PPTX
Drinkfromme.pptx
PDF
Chapter1p1.pdf
PDF
dm-logic.pdf
PDF
UGC NET Computer Science & Application book.pdf [Sample]
desmath(1).ppt
Discrete mathematics Chapter1 presentation.ppt
First order predicate logic - Artificial Intelligence
proposition Logic-1.pptx Discrete Mathematics
PROPOTIONAL CALCULUS for students to.ppt
Propositional Calculus-Discrete Mathematics
CSE-203 Lec_1.pptx
Propositional Logic.pdf
lectures in prolog in order to advance in artificial intelligence
Chapter 1: The Foundations: Logic and Proofs
Chapter1p1
Unit I discrete mathematics lecture notes
Chapter 01 - p1.pdf
LOGIC.pptx. To uphold certainty in validity of mathematical statements or to ...
Unit 1-logic
Drinkfromme.pptx
Chapter1p1.pdf
dm-logic.pdf
UGC NET Computer Science & Application book.pdf [Sample]

More from University of Potsdam (20)

PPTX
Computer fundamentals 01
PPTX
Workshop on android apps development
PDF
Transparency and concurrency
PDF
Database System Architecture
PDF
Functional dependency and normalization
PDF
indexing and hashing
PDF
data recovery-raid
PDF
Query processing
PDF
Machine Learning for Data Mining
PPTX
Tree, function and graph
PDF
Sets in discrete mathematics
PPT
Set in discrete mathematics
PPT
Series parallel ac rlc networks
PPT
Series parallel ac networks
PPT
PDF
PPT
Propositional logic
PDF
Prim algorithm
PPT
Predicate &amp; quantifier
Computer fundamentals 01
Workshop on android apps development
Transparency and concurrency
Database System Architecture
Functional dependency and normalization
indexing and hashing
data recovery-raid
Query processing
Machine Learning for Data Mining
Tree, function and graph
Sets in discrete mathematics
Set in discrete mathematics
Series parallel ac rlc networks
Series parallel ac networks
Propositional logic
Prim algorithm
Predicate &amp; quantifier

Recently uploaded (20)

PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
01-Introduction-to-Information-Management.pdf
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
Classroom Observation Tools for Teachers
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
Pharma ospi slides which help in ospi learning
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
Abdominal Access Techniques with Prof. Dr. R K Mishra
O7-L3 Supply Chain Operations - ICLT Program
Supply Chain Operations Speaking Notes -ICLT Program
01-Introduction-to-Information-Management.pdf
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Microbial disease of the cardiovascular and lymphatic systems
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
O5-L3 Freight Transport Ops (International) V1.pdf
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
102 student loan defaulters named and shamed – Is someone you know on the list?
Anesthesia in Laparoscopic Surgery in India
TR - Agricultural Crops Production NC III.pdf
Classroom Observation Tools for Teachers
Final Presentation General Medicine 03-08-2024.pptx
Pharma ospi slides which help in ospi learning
Chapter 2 Heredity, Prenatal Development, and Birth.pdf

Propositional logic

  • 1. Gazi Zahirul Islam, Assistant Professor, Department of CSE, Daffodil International University, Dhaka 1 Propositional Logic: A proposition is a declarative sentence that is either true or false, but not both. EXAMPLE 1: All the following declarative sentences are propositions. 1. Washington, D.C., is the capital of the United States of America. 2. Toronto is the capital of Canada. 3. 1 + 1 = 2. 4. 2 + 2 = 3. Propositions 1 and 3 are true, whereas 2 and 4 are false. Some sentences that are not propositions are given in Example 2. EXAMPLE 2: Consider the following sentences. 1. What time is it? 2. Read this carefully. 3. x + 1 = 2. 4. x + y = z. Sentences 1 and 2 are not propositions because they are not declarative sentences. Sentences 3 and 4 are not propositions because they are neither true nor false. Note that each of sentences 3 and 4 can be turned into a proposition if we assign values to the variables. DEFINITION 1: 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 “not p.” The truth value of the negation of p, ¬p, is the opposite of the truth value of p. EXAMPLE 3: Find the negation of the proposition “Michael’s PC runs Linux” and express this in simple English. Solution: The negation is “It is not the case that Michael’s PC runs Linux.” This negation can be more simply expressed as
  • 2. Gazi Zahirul Islam, Assistant Professor, Department of CSE, Daffodil International University, Dhaka 2 “Michael’s PC does not run Linux.” Truth Table: Table 1 displays the truth table for the negation of a proposition p. DEFINITION 2 Let p and q be propositions. The conjunction of p and q, denoted by p ∧ q, is the proposition “p and q.” The conjunction p ∧ q is true when both p and q are true and is false otherwise. Table 2 displays the truth table of p ∧ q. EXAMPLE 4: Find the conjunction of the propositions p and q where p is the proposition “Today is Friday ” and q is the proposition “It is raining today” Solution: The conjunction of these propositions, p ∧ q, is the proposition “Today is Friday and it is raining today” DEFINITION 3:
  • 3. Gazi Zahirul Islam, Assistant Professor, Department of CSE, Daffodil International University, Dhaka 3 Let p and q be propositions. The disjunction of p and q, denoted by p ∨ q, is the proposition “p or q.” The disjunction p ∨ q is false when both p and q are false and is true otherwise. Table 3 displays the truth table for p ∨ q. EXAMPLE 5: Find the disjunction of the propositions p and q where p is the proposition “Today is Friday ” and q is the proposition “It is raining today” Solution: The conjunction of these propositions, p ∨ q, is the proposition “Today is Friday or it is raining today” DEFINITION 4: Let p and q be propositions. The exclusive or of p and q, denoted by p ⊕ q, is the proposition that is true when exactly one of p and q is true and is false otherwise. The truth table for the exclusive or of two propositions is displayed in Table 4.
  • 4. Gazi Zahirul Islam, Assistant Professor, Department of CSE, Daffodil International University, Dhaka 4 DEFINITION 5: Let p and q be propositions. The conditional statement p → q is the proposition “if p, then q.” The conditional statement p → q is false when p is true and q is false, and true otherwise. In the conditional statement p → q, p is called the hypothesis (or antecedent or premise)and q is called the conclusion (or consequence). The conditional statement is also known as implication. EXAMPLE 6: Let, p be the statement “I am elected” and q “I will lower taxes” then implication p → q will be “ If I am elected, then I will lower taxes ” CONVERSE, CONTRAPOSITIVE, AND INVERSE: The proposition q → p is called the converse of p → q. The contrapositive of p → q is the proposition ¬q →¬p. The proposition ¬p →¬q is called the inverse of p → q. Out of these, only the contrapositive always has the same truth value as p → q. EXAMPLE 7: What are the contrapositive, the converse, and the inverse of the conditional statement “The home team wins whenever it is raining?” Solution: Because “q whenever p” is one of the ways to express the conditional statement p → q, the original statement can be rewritten as “If it is raining, then the home team wins.” Where, p denotes “It is raining” and q denotes “The home team wins”.
  • 5. Gazi Zahirul Islam, Assistant Professor, Department of CSE, Daffodil International University, Dhaka 5 The contrapositive (¬q →¬p) of this conditional statement is “If the home team does not win, then it is not raining.” The converse (q → p) is “If the home team wins, then it is raining.” The inverse (¬p →¬q) is “If it is not raining, then the home team does not win.” Only the contrapositive is equivalent to the original statement. DEFINITION 6: Let p and q be propositions. The biconditional statement p ↔ q is the proposition “p if and only if q.” The biconditional statement p ↔ q is true when p and q have the same truth values, and is false otherwise. Biconditional statements are also called ‘bi-implications’, ‘exclusive nor’ and ‘equivalance’. The truth table for p ↔ q is shown in Table 6
  • 6. Gazi Zahirul Islam, Assistant Professor, Department of CSE, Daffodil International University, Dhaka 6 Propositional Equivalences DEFINITION 1: A compound proposition that is always true is called a tautology. A compound proposition that is always false is called a contradiction. A compound proposition that is neither a tautology nor a contradiction is called a contingency. Example 1 illustrates these types of compound propositions. EXAMPLE 1: Consider the truth tables of p ∨¬p and p ∧¬p, shown in Table 1. Because p ∨¬p is always true, it is a tautology. Because p ∧¬p is always false, it is a contradiction. DEFINITION 2: Compound propositions that have the same truth values in all possible cases are called logically equivalent. The notation p ≡ q denotes that p and q are logically equivalent. EXAMPLE 2: Show that ¬(p ∨ q) and ¬p ∧¬q are logically equivalent. Solution: EXAMPLE 3: Show that p → q and ¬p ∨ q are logically equivalent.
  • 7. Gazi Zahirul Islam, Assistant Professor, Department of CSE, Daffodil International University, Dhaka 7 Solution: EXAMPLE 4: Show that p ∨ (q ∧ r) and (p ∨ q) ∧ (p ∨ r) are logically equivalent. Solution: Table 6 contains some important logical equivalances and laws.
  • 8. Gazi Zahirul Islam, Assistant Professor, Department of CSE, Daffodil International University, Dhaka 8 EXAMPLE 5: Show that ¬(p ∨ (¬p ∧ q)) and ¬p ∧¬q are logically equivalent by developing a series of logical equivalences. Solution: ¬(p ∨ (¬p ∧ q)) ≡ ¬p ∧¬(¬p ∧ q) by the second De Morgan law ≡ ¬p ∧ [¬(¬p)∨¬q] by the first De Morgan law ≡ ¬p ∧ (p ∨¬q) by the double negation law ≡ (¬p ∧ p) ∨ (¬p ∧¬q) by the second distributive law
  • 9. Gazi Zahirul Islam, Assistant Professor, Department of CSE, Daffodil International University, Dhaka 9 ≡ F ∨ (¬p ∧¬q) because ¬p ∧ p ≡ F ≡ (¬p ∧¬q) ∨ F by the commutative law for disjunction ≡ ¬p ∧¬q by the identity law for F Consequently ¬(p ∨ (¬p ∧ q)) and ¬p ∧¬q are logically equivalent. EXAMPLE 6: Show that (p ∧ q) → (p ∨ q) is a tautology. Solution: (p ∧ q) → (p ∨ q) ≡ ¬(p ∧ q) ∨ (p ∨ q) ≡ (¬p ∨¬q) ∨ (p ∨ q) by the first De Morgan law ≡ (¬p ∨ p) ∨ (¬q ∨ q) by the associative and commutative laws for disjunction ≡ T ∨ T by the commutative law for disjunction ≡ T by the domination law
  • 10. Gazi Zahirul Islam, Assistant Professor, Department of CSE, Daffodil International University, Dhaka 10 Predicates and Quantifiers Statements involving variables, such as “x > 3,” “x = y + 3,” “x + y = z” are often found in mathematical assertions, in computer programs, and in system specifications. These statements are neither true nor false when the values of the variables are not specified. We can denote the statement “x is greater than 3” by P(x), where P denotes the predicate “is greater than 3” and x is the variable. The statement P(x) is also said propositional function. EXAMPLE 1: Let P(x) denote the statement “x > 3.” What are the truth values of P(4) and P(2)? Solution: We obtain the statement P(4) by setting x = 4 in the statement “x > 3.” Hence, P(4), which is the statement “4 > 3,” is true. However, P(2), which is the statement “2 > 3,” is false. EXAMPLE 2: Let Q(x, y) denote the statement “x = y + 3.” What are the truth values of the propositions Q(1, 2) and Q(3, 0)? Solution: To obtain Q(1, 2), set x = 1 and y = 2 in the statement Q(x, y). Hence, Q(1, 2) is the statement “1 = 2 + 3,” which is false. The statement Q(3, 0) is the proposition “3 = 0 + 3,” which is true. EXAMPLE 3: Let R(x, y, z) denote the statement “x + y = z”. What are the truth values of the propositions R(1, 2, 3) and R(0, 0, 1)? Solution: The proposition R(1, 2, 3) is obtained by setting x = 1, y = 2, and z = 3 in the statement R(x, y, z). We see that R(1, 2, 3) is the statement “1 + 2 = 3,” which is true. Also note that R(0, 0, 1), which is the statement “0 + 0 = 1,” is false. DEFINITION 1: The universal quantification of P(x) is the statement “P(x) is true for all values of x in the domain.” The notation ∀xP(x) denotes the universal quantification of P(x). Here ∀ is called the universal quantifier.
  • 11. Gazi Zahirul Islam, Assistant Professor, Department of CSE, Daffodil International University, Dhaka 11 EXAMPLE 4: Let P(x) be the statement “x + 1 > x.” What is the truth value of the quantification ∀xP(x), where the universe of discourse (domain)consists of all real numbers? Solution: Because P(x) is true for all real numbers x, the quantification ∀xP(x) is true. EXAMPLE 5: Let Q(x) be the statement “x < 2.” What is the truth value of the quantification ∀xQ(x), where the domain consists of all real numbers? Solution: Q(x) is not true for every real number x, because, for instance, Q(3) is false. Thus ∀xQ(x) is false. EXAMPLE 6: What is the truth value of ∀xP(x), where P(x) is the statement “x2 < 10” and the universe of discourse consists of the positive integers not exceeding 4? Solution: Since P(4), which is the statement “42 < 10,” is false, it follows that ∀xP(x) is false. EXAMPLE 7: What is the truth value of ∀x(x2 ≥ x) if the domain consists of all real numbers? What is the truth value of this statement if the domain consists of all integers? Solution: The universal quantification ∀x(x2 ≥ x) is false, where the domain consists of all real numbers. For example, Consequently, x2 ≥ x if and only if x ≤ 0 or x ≥ 1. Therefore, if the domain consists of the integers, ∀x(x2 ≥ x) is true, because there are no integers x with 0 < x < 1. DEFINITION 2: The existential quantification of P(x) is the proposition “There exists an element x in the universe of discourse such that P(x) is true.”
  • 12. Gazi Zahirul Islam, Assistant Professor, Department of CSE, Daffodil International University, Dhaka 12 We use the notation ∃xP(x) for the existential quantification of P(x). Here ∃ is called the existential quantifier. EXAMPLE 8: Let P(x) denote the statement “x > 3.” What is the truth value of the quantification ∃xP(x), where the domain consists of all real numbers? Solution: When x = 4 for instance, the statement “x > 3” is true. Therefore, the existential quantification ∃xP(x) is true. EXAMPLE 9: Let Q(x) denote the statement “x = x + 1.”What is the truth value of the quantification ∃xQ(x), where the domain consists of all real numbers? Solution: Since Q(x) is false for every real number x, the existential quantification of Q(x), which is ∃xQ(x), is false. Negating Quantified Expressions: Case 1: ¬∀xP(x) ≡ ∃x ¬P(x) Case 2: ¬∃xQ(x) ≡ ∀x ¬Q(x) Case 1: Consider the statement, “Every student in the class has taken a course in calculus.” This statement is a universal quantification, namely, ∀xP(x), where P(x) is the statement “x has taken a course in calculus” and the domain consists of the students in the class. The negation of this statement is “There is a student in the class who has not taken a course in calculus.” And this is simply the existential quantification, namely, ∃x ¬P(x). This example illustrates the following logical equivalence: ¬∀xP(x) ≡ ∃x ¬P(x).
  • 13. Gazi Zahirul Islam, Assistant Professor, Department of CSE, Daffodil International University, Dhaka 13 Case 2: Consider the proposition, “There is a student in this class who has taken a course in calculus.” This is the existential quantification ∃xQ(x), where Q(x) is the statement “x has taken a course in calculus.” The negation of this statement is the proposition “Every student in this class has not taken calculus,” And this is simply the universal quantification, namely, ∀x ¬Q(x). This example illustrates the equivalence ¬∃xQ(x) ≡ ∀x ¬Q(x).