1.1-Propositions and Logical Connectives

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 20

Module I

Mathematical Logic and Induction


Propositions and Logical connectives

Dr. Govardhana Reddy H G


Contents
• Syllabus

• Introduction to Logic

• Propositions: Definition and Examples

• Logical Connectives and Truth Tables

• Tautology, Contradiction and Contingency

• Logic Applications for Computers


Syllabus

Basic Connectives and Truth Tables, Logic Equivalence – The Laws of Logic, Logical
Implication – Rules of Inference. The Use of Quantifiers, Quantifiers, Definitions
and the Proofs of Theorems. Mathematical Induction, The Well Ordering Principle –
Mathematical Induction, Recursive Definitions
Introduction to Logic
1.1 Propositions
Definition:
A proposition is a statement or declaration which, in a given context, can be said to be either
true or false, but not both. The propositions are denoted by small letters such as p, q, r, s, …….
Examples:
p: Alliance University is in Bangalore
q: 2 is a prime number
r: 5 is an even number
s: Every rectangle is a square
Examples for not a proposition
1. Take a triangle ABC
2. a+b=c+d
Truth value of a proposition
The truth or falsity of a proposition is called its truth value. Indicate a true proposition by 1 and
false proposition by 0.
Example: Truth value of p is 1 and truth value of r is 0
1.2 Logical Connectives and Truth Tables

Basic Definitions:
Logical Connectives:
The new propositions are obtained by starting with given propositions with the aid
of words or phrases like ′𝑛𝑜𝑡′, ′𝑎𝑛𝑑′, ′𝑖𝑓 … 𝑡ℎ𝑒𝑛′ and ′𝑖𝑓 𝑎𝑛𝑑 𝑜𝑛𝑙𝑦 𝑖𝑓′. Such words
or phrases are called logical connectives.

Compound Proposition: The new propositions obtained by the use of connectives.

Simple Propositions: Propositions which do not contain any logical connective.

Components or Primitives: The original propositions from which a compound


proposition is obtained are called components or primitives.
Logical Connectives and Truth Tables

Negation
A proposition obtained by inserting the word ′𝑛𝑜𝑡′ at an appropriate place in a
given proposition is called the negation of the given proposition.
The negation of a proposition 𝑝 is denoted by ¬ 𝑝 read as not p, the symbol ¬
denoting the word 𝑛𝑜𝑡.

Truth Table: 𝑝 ¬𝑝
0 1
1 0

Example:
𝑝 : 2 is an even number
¬ 𝑝 : 2 is not an even number
Logical Connectives and Truth Tables
Conjunction
A compound proposition obtained by combining two given propositions by
inserting the word ′𝑎𝑛𝑑′ in between them is called the conjunction of the given
propositions.
The conjunction of two propositions p and q is denoted by 𝑝 ∧ 𝑞 read as ‘𝑝 and 𝑞′ ,
the symbol ∧ denoting the word 𝑎𝑛𝑑.
Rule: The conjunction 𝑝 ∧ 𝑞 is true only when 𝑝 is true and 𝑞 is true, in all other
cases it is false.
𝑝 𝑞 𝑝∧𝑞
Truth Table:
0 0 0
0 1 0
1 0 0
1 1 1

Example: 𝑝 : 2 is an even number


𝑞 : 3 is a prime number
𝑝 ∧ 𝑞 : 2 is an even number and 3 is a prime number
Logical Connectives and Truth Tables
Disjunction
A compound proposition obtained by combining two given propositions by
inserting the word ′𝑜𝑟′ in between them is called the disjunction of the given
propositions.
The disjunction of two propositions p and q is denoted by 𝑝 ∨ 𝑞 read as ‘𝑝 or 𝑞′ ,
the symbol ∨ denoting the word 𝑜𝑟.
Rule: The disjunction 𝑝 ∨ 𝑞 is false only when 𝑝 is false and 𝑞 is false, in all other
cases it is true.
𝑝 𝑞 𝑝∨𝑞
Truth Table: 0 0 0
0 1 1
1 0 1
1 1 1

Example: 𝑝 : 2 is an even number


𝑞 : 3 is a prime number
𝑝 ∨ 𝑞: 2 is an even number or 3 is a prime number
Logical Connectives and Truth Tables

Exclusive Disjunction
ഥ 𝑞 (read as either p or q but not both) is called the
The compound proposition 𝑝 ∨
exclusive disjunction.
𝑝 𝑞 ഥ𝑞
𝑝∨

Truth Table: 0 0 0
0 1 1
1 0 1
1 1 0

Example: 𝑝 : 2 is an even number


𝑞 : 3 is a prime number
𝑝∨ഥ 𝑞: Either 2 is an even number or 3 is a prime number
Logical Connectives and Truth Tables

Conditional
A compound proposition obtained by combining two given propositions by
inserting the words 𝐼𝑓 and 𝑡ℎ𝑒𝑛 at appropriate places is called a conditional.
The conditional 𝐼𝑓 𝑝, 𝑡ℎ𝑒𝑛 𝑞 is denoted by 𝑝 → 𝑞
Rule: The conditional 𝑝 → 𝑞 is false only when 𝑝 is true and 𝑞 is false, in all other
cases it is true. 𝑝 𝑞 𝑝→𝑞
0 0 1
Truth Table: 0 1 1
1 0 0
1 1 1

Example: 𝑝 : 2 is an even number


𝑞 : 3 is a prime number
𝑝 → 𝑞: If 2 is an even number, then 3 is a prime number
Logical Connectives and Truth Tables

Biconditional
Let 𝑝 and 𝑞 be two propositions. Then the conjunction of the conditionals 𝑝 → 𝑞
and 𝑞 → 𝑝 is called the biconditional of 𝑝 and 𝑞. It is denoted by 𝑝 ↔ 𝑞, That is
𝑝 ↔ 𝑞 = (𝑝 → 𝑞) ∧ (𝑞 → 𝑝)
𝑝 𝑞 𝑝→𝑞 𝑞→𝑝 𝑝↔𝑞

Truth Table: 0 0 1 1 1
0 1 1 0 0
1 0 0 1 0
1 1 1 1 1

Example: 𝑝 : 2 is an even number


𝑞 : 3 is a prime number
𝑝 ↔ 𝑞 is true
Problems
Q1. Let 𝑝: A circle is conic 𝑞: 5 is a real number
𝑟: Exponential series is convergent.
Express the following compound propositions in words.

i) 𝑝 ∧ (¬ 𝑞)

ii) (¬ 𝑝) ∨ 𝑞

ഥ (¬ 𝑞)
iii) 𝑝 ∨

iv) 𝑞 → (¬ 𝑝)

ഥ 𝑟)
v) 𝑝 → (𝑞 ∨

vi) ¬ 𝑝 ↔ 𝑞
Problems

Q2. Construct the truth tables for the following compound propositions

i) 𝑝∧ ¬𝑞
ii) ¬𝑝 ∨𝑞
iii) 𝑝 → ¬𝑞
iv) ഥ (¬𝑞)
(¬ 𝑝) ∨
Problems

Q3. Construct the truth tables for the following compound propositions

i) 𝑝 ∧ 𝑞 → ¬ 𝑟
ii) 𝑞 ∧ ( ¬ 𝑟 → 𝑝)
Problems
Home Work: Q4 and Q5

Q4. Construct the truth tables for the following


i) 𝑝∨ ¬𝑞
ii) 𝑝∧ 𝑞∨𝑝
iii) 𝑝 → (𝑞 → 𝑟)
iv) 𝑞 ↔ (¬ 𝑝 ∨ ¬ 𝑞)

Q5. Indicate the truth value of each of the following propositions


i) If 3+4=7, then 5+3=8
ii) If 3+4=5, then 4+6=10
1.1.2 Tautology, Contradiction and Contingency

Tautology: A compound proposition which is true for all possible truth values of its
components is called a tautology.

Contradiction: A compound proposition which is false for all possible truth values of
its components is called a contradiction.

Contingency: A compound proposition which is neither a tautology nor a


contradiction.
Problems

Q1. Prove that for any proposition p, the compound proposition p ∨ ¬ p is a


tautology and the compound proposition p ∧ ¬ p is a contradiction.

Q2. Prove that, for any two propositions 𝑝 and 𝑞, ഥ 𝑞) ∧ (𝑝 → 𝑞) is a


(𝑝 ∨
contingency.

Q3. Prove that, for any propositions 𝑝, 𝑞, 𝑟 the following compound proposition is a
tautology
[(𝑝 → 𝑞) ∧ (𝑞 → 𝑟)] → (𝑝 → 𝑟)
Logic Applications for Computers

▪ Artificial Intelligence (AI)

▪ Another major area of research for logical theory was software engineering
research projects such as the Knowledge Based Software Assistant and
programmer’s Apprentice programs applied logical theory to validate the
correctness of software specifications.

▪ Another important application of logic to computer technology has been in the


area of frame languages and automatic classifiers.
Thank You..

You might also like