Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Mathematical Logic
Lecture Notes
by
Dr. D. Ezhilmaran
Assistant Professor (Sr)
School of Advanced Sciences
VIT, Vellore
Contents
Chapter 1: Propositions
Chapter 1
Propositions
Definition 1. (Proposition)
A (statement) or (proposition) is a declarative sentence that is either
true or false (but not both).
Definition 6. (Connectives)
p q ¬𝑝 𝑝∧𝑞 𝑝∨𝑞 𝑝 → 𝑞 𝑝 ↔ 𝑞
T T F T T T T
T F F F T F F
F T T F T T F
F F T F F T T
Definition 7. (Tautology)
A proposition is said to be a tautology if its truth value is 𝑇 for any
assignment of truth values to its components.
Definition 8. (Contradiction)
A proposition is said to be a contradiction if its truth value is 𝐹 for any
assignment of truth values to its components.
Definition 9.(Contingency)
A proposition that is neither a tautology nor a contradiction is called a
contingency.
p ¬𝑝 𝑝 ∧ ¬𝑝 𝑝 ∨ ¬𝑝
T F F T
T F F T
F T F T
F T F T
(i) (𝑝 → 𝑞) ←→ (¬𝑝 ∨ 𝑞)
(ii) 𝑝 ∧ (𝑝 ∨ 𝑞)
(iii) (𝑝 → 𝑞) → 𝑝
(iv) ¬ (𝑝 ∧ 𝑞) ←→ (¬ 𝑝 ∨ ¬ 𝑞)
(v) (𝑝 ∨ ¬𝑞) → 𝑞
Solution:
p q ¬𝑝 𝑝 → 𝑞 ¬𝑝 ∨ 𝑞 S
T T F T T T
T F F F F T
F T T T T T
F F T T T T
(ii) Let 𝑆 = 𝑝 ∧ (𝑝 ∨ 𝑞)
p q 𝑝∨𝑞 S
T T T T
T F T T
F T T F
F F F F
(iii) Let 𝑆 = (𝑝 → 𝑞) → 𝑝
p q 𝑝 → 𝑞 S
T T T T
T F F T
F T T F
F F T F
(iv) Let 𝑆 = ¬ (𝑝 ∧ 𝑞) ←→ ¬ 𝑝 ∨ ¬ 𝑞
p q 𝑝∧𝑞 ¬ (𝑝 ∧ 𝑞) ¬𝑝 ¬𝑞 ¬𝑝 ∨ ¬𝑞 S
T T T F F F F T
T F F T F T T T
F T F T T F T T
F F F T T T T T
p q ¬𝑞 𝑝 ∨ ¬𝑞 S
T T F T T
T F T T F
F T F F T
F F T T F
Logical Equivalence
𝑝 → 𝑞 ⇔ ¬𝑝 ∨ 𝑞
p q 𝑝 ↔ 𝑞 𝑝 → 𝑞 𝑞 → 𝑝 (𝑝 → 𝑞) ∧ (𝑞 → 𝑝) S
T T T T T T T
T F F F T F T
F T F T F F T
F F T T T T T
Equivalences Name
𝑝∧𝑇 ⇔ 𝑝 Identity law
𝑝∨𝐹 ⇔ 𝑝
𝑝∨𝑇 ⇔ 𝑇 Dominent law
𝑝∧𝐹 ⇔ 𝐹
𝑝∨𝑇 ⇔ 𝑇 Idempotent law
𝑝∧𝐹 ⇔ 𝐹
𝑝∨𝑞 ⇔ 𝑞 ∨𝑝 Commutative law
𝑝∧𝑞 ⇔ 𝑞 ∧𝑝
(𝑝 ∨ 𝑞) ∨ 𝑟 ⇔ 𝑝 ∨ (𝑞 ∨ 𝑟) Associative law
(𝑝 ∧ 𝑞) ∧ 𝑟 ⇔ 𝑝 ∧ (𝑞 ∧ 𝑟)
Equivalences Name
(𝑝 ∨ 𝑞) ∧ 𝑟 ⇔ (𝑝 ∧ 𝑟) ∨ (𝑞 ∧ 𝑟) Distributive law
(𝑝 ∧ 𝑞) ∨ 𝑟 ⇔ (𝑝 ∨ 𝑟) ∧ (𝑞 ∨ 𝑟)
(𝑝 ∨ 𝑞) ∧ 𝑝 ⇔ 𝑝 Absorbtion law
(𝑝 ∧ 𝑞) ∨ 𝑝 ⇔ 𝑝
¬ (𝑝 ∧ 𝑞) ⇔ ¬ 𝑝 ∨ ¬ 𝑞 De morgan’s law
¬ (𝑝 ∨ 𝑞) ⇔ ¬ 𝑝 ∧ ¬ 𝑞
¬𝑝 ∧ 𝑝 ⇔ 𝐹 Negation law
¬𝑝 ∨ 𝑝 ⇔ 𝑇
¬ (¬ 𝑝 ) ⇔ 𝑝
Implications
𝑝 → 𝑞 ⇔ ¬𝑝 ∨ 𝑞
𝑝 → 𝑞 ⇔ ¬𝑞 → ¬𝑝
¬(𝑝 → 𝑞) ⇔ 𝑝 ∧ ¬𝑞
𝑝 ∨ 𝑞 ⇔ ¬𝑝 → 𝑞
𝑝 ∧ 𝑞 ⇔ ¬(𝑝 → ¬𝑞)
(𝑝 → 𝑞) ∧ (𝑝 → 𝑟) ⇔ 𝑝 → (𝑞 ∧ 𝑟)
(𝑝 → 𝑞) ∨ (𝑝 → 𝑟) ⇔ 𝑝 → (𝑞 ∨ 𝑟)
(𝑝 → 𝑟) ∧ (𝑞 → 𝑟) ⇔ (𝑝 ∨ 𝑞) → 𝑟)
(𝑝 → 𝑞) ∨ (𝑝 → 𝑟) ⇔ (𝑝 ∧ 𝑞) → 𝑟)
Biconditions
𝑝 ↔ 𝑞 ⇔ (𝑝 → 𝑞) ∧ (𝑞 → 𝑝)
𝑝 ↔ 𝑞 ⇔ ¬𝑝 ↔ ¬𝑞
𝑝 ↔ 𝑞 ⇔ (𝑝 ∧ 𝑞) ∨ (¬𝑝 ∧ ¬𝑞)
¬(𝑝 ↔ 𝑞) ⇔ 𝑝 ↔ ¬𝑞
Solution:
(i)
𝑆 ⇔ (𝑝 ∨ 𝑞) ∧¬𝑝 Reasons
⇔ (𝑝 ∨ 𝑞) ∧¬𝑝 Given
⇔ (𝑝∧¬𝑝)∨(𝑞∧¬𝑝) Distributive law
⇔ 𝐹 ∨(¬𝑝∧𝑞) Negation law,Commutative law
⇔ ¬𝑝∧𝑞 Identity law
(ii)
𝑆 ⇔ (𝑝 ∨ 𝑞)∧¬(¬𝑝 ∧ 𝑞) Reasons
⇔ (𝑝 ∨ 𝑞)∧¬(¬𝑝 ∧ 𝑞) Given
⇔ (𝑝 ∨ 𝑞)∧(¬¬𝑝 ∨ ¬𝑞) De Morgan’s law
⇔ (𝑝 ∨ 𝑞)∧(𝑝 ∨ ¬𝑞) Negation law
⇔ 𝑝∨(𝑞∧¬𝑞) Distributive law
⇔ 𝑝∨𝐹 Negation law
⇔ 𝑝 Identity law
(iii)
(iv)
Solution:
𝑝 ↔ 𝑞 ⇔ (¬𝑝 ∨ 𝑞) ∧ (¬𝑞 ∨ 𝑝)
𝑝 → 𝑞 ⇔ (¬𝑝 ∨ 𝑞)
𝑝 ∧ 𝑞 ⇔ ¬(¬𝑝 ∨ ¬𝑞)
Chapter 2
Inference Theory
p q 𝑝→𝑞 𝑝 ∧ (𝑝 → 𝑞) (𝑝 ∧ (𝑝 → 𝑞)) → 𝑞
T T T T T
T F F F T
F T T F T
F F T F T
p q 𝑝→𝑞 𝑞 ∧ (𝑝 → 𝑞) (𝑞 ∧ (𝑝 → 𝑞)) → 𝑝
T T T T T
T F F F T
F T T T F
F F T F T
Implication Table:
Rules of inference:
Step 1. 𝑝 → 𝑞 Rule P
Step 2. ¬𝑞 → ¬𝑝 Rule T
Step 3. ¬𝑞 Rule P
III. Problems:
Predicate Calculus
Definition 1. (predicates).
A predicate refers to a property that the subject of the statement can
have. A predicate is a sentence that contains a finite number of
specific values are substituted for the variables.
Example: Let 𝑝(𝑥) denote the statement 𝑥 ≥ 4. What are the truth
values of 𝑝(5) (𝑇 ) and 𝑝(2) (𝐹 ).
The phrases for every 𝑥, for all 𝑥 and for each 𝑥 have the same
meaning and we can symbolize each by ∀𝑥.
∀ 𝑥 𝑃 (𝑥) is true.
Example :
(a) Let 𝐴 = {𝑥 : x is a natural number less than 9}
Here 𝑃 (𝑥) is the sentence 𝑥 is a natural number less than 9. The
common property is a natural number less than 9. 𝑃 (1) is true,
therefore, 1 ∈ 𝐴 and 𝑃 (12) is not true, therefore 12 ∈
/ 𝐴.
The symbol, ∃ is used to denote the logical quantifier there exists the
phrases There exists an 𝑥, There is a 𝑥, for some 𝑥 and for at least one
𝑥 have the same meaning.
Example :
(a) The proposition there is an integer between 1 and 3 may be written
as (∃ an integer) (the integer is between 1 and 3)
IV. Problems: