M112 Topic 2
M112 Topic 2
M112 Topic 2
1.1 Introduction
• Mathematical logic is the analytical theory of reasoning that aim to systemize and codify principles of
valid reasoning.
• Mathematical logic is used to evaluate correctness of statements.
• The principles of logic are valuable to problem analysis, programming and logic design.
1.2 Statements (Propositions)
• A statement/ proposition is a declarative sentence which is either true of false but not both.
• The truthfulness or falsity of a statement is called its truth value denoted by T and F 𝒐𝒓 ⊥
respectively.
• A simple statement is an atomic/ primary statement that need not use logical connectives.
• A compound statement is formed from combining atomic/ simple propositions through the use of logical
connectives.
Examples
I. Socrates is mortal
II. 𝑥 is a pig
III. 2 is greater than 5
IV. May God bless you!
V. You must complete the work today.
VI. 9 is a prime number
From the above examples, I,III, and VI are propositions/statements, the rest are not.
1.3 Laws of Formal Logic
1.3.1 Law of \Contradiction
• The same statement cannot be both affirmed and denied precisely of the same subject.
• i.e a statement say P cannot be both true and false.
AsambaSam@KSU Lecture Notes 1
Mathematical Logic
1.4 Logical Connectives
We use logical connectives to connect several simple statements into a single compound.
The following are the most basic and fundamental connectives that we shall discuss:
Negation
Conjunction
Disjunction
Conditional/ implication
Bi-conditional
Exclusive OR
NAND
NOR
1.4.1 Negation
• If 𝐴 is a statement, then the negation of 𝐴 (¬𝐴) is also a statement.
• ¬𝐴 is read as ‘not 𝐴’
• Rule: if 𝐴 is true, then ¬𝐴 is false and if 𝐴 is false, then ¬𝐴 is true.
• Truth table:
𝐴 ¬𝑨
T F
F T
𝑨 𝑩 𝑨∨𝑩
T T T
T F T
F T T
F F F
AsambaSam@KSU Lecture Notes 3
Mathematical Logic
1.4.4 Conditional/ Implication
• 𝐴 ⇒ 𝐵 𝑜𝑟 (𝐴 → 𝐵) is a conditional statement which can be put in any of the forms below:
i) If 𝐴, then 𝐵
ii) 𝐴 only if 𝐵
iii) 𝐴 implies 𝐵
iv) 𝐵 if 𝐴
• In the implication 𝐴 ⇒ 𝐵, 𝐴 is called the hypothesis/ antecedent and 𝐵 is the conclusion/consequent.
• Rule: 𝐴 ⇒ 𝐵 is false only when the hypothesis (𝐴) is true and the conclusion (𝐵) is false, otherwise true.
𝑨 𝑩 𝑨⇒𝑩
T T T
T F F
F T T
F F T
𝑨 𝑩 𝐴⇔𝐵
T T T
T F F
F T F
F F T
(c )
𝑃 ⇔ 𝑄 ≡ (𝑃 ⇒ 𝑄) ∧ (𝑄 ⇒ 𝑃)
So, ¬(𝑃 ⇔ 𝑄) ≡ ¬[ 𝑃 ⇒ 𝑄 ∧ 𝑄 ⇒ 𝑃 ]
≡ ¬(𝑃 ⇒ 𝑄) ∨ (𝑄 ⇒ 𝑃) (by De-Morgan’s law)
≡ 𝑃 ∧ ¬𝑄 ∨ 𝑄 ∧ ¬𝑃 (by negation of implications)
Hence negation of 𝑃 ⇔ 𝑄 is 𝑃 ∧ ¬𝑄 ∨ 𝑄 ∧ ¬𝑃 .
AsambaSam@KSU Lecture Notes 9
Mathematical Logic
1.7.2 example
By use of a truth table show that 𝑃 ⇒ (𝑄 ⇒ 𝑅) ≡ (𝑃 ∧ 𝑄) ⇒ 𝑅
Solution:
number of rows: 23 = 8
P Q R 𝑄⇒𝑅 𝑃 ⇒ (𝑄 ⇒ 𝑅) 𝑃∧𝑄 (𝑃 ∧ 𝑄) ⇒ 𝑅
T T T T T T T
T T F F F T F
T F T T T F T
T F F T T F T
F T T T T F T
F T F F T F T
F F T T T F T
F F F T T F T
P Q ¬𝑃 ¬𝑄 𝑃 ⇒ ¬𝑄 𝑄 ⇒ ¬𝑃
T T F F F F
T F F T T T
F T T F T T
F F T T T T
2. Rewrite each of the following sentence symbolically, where the UD consists of real numbers.
a) The product of any two real numbers x and y is positive.
b) There are real numbers x and y such that x = 2y.
c) For each real number x, there is some real number y such that x .y = x.
d) There is a real number x such that x + y = y for every real number y.
1.8.5 Uniqueness Quantifier
• A third useful quantifier is the uniqueness quantifier .
• It is denoted by ∃! read as ‘there exists a unique’ or ‘ there exists exactly one’
• Example
• The proposition ∃! ∶ 𝑃(𝑥) means There exists a unique (meaning exactly one) x such that
P(x).