Sei sulla pagina 1di 60

Chapter 1 Chapter 2 Chapter 3

Mathematical Logic

Lecture Notes
by
Dr. D. Ezhilmaran
Assistant Professor (Sr)
School of Advanced Sciences
VIT, Vellore

Jan 02, 2014

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 1 / 60


Chapter 1 Chapter 2 Chapter 3

Contents

Chapter 1: Propositions

Chapter 2: Rules of inference

Chapter 3: Predicate calculus

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 2 / 60


Chapter 1 Chapter 2 Chapter 3

Chapter 1
Propositions

Definition 1. (Proposition)
A (statement) or (proposition) is a declarative sentence that is either
true or false (but not both).

For instance, the following are propositions:


1. 3 > 1 (true).
2. 2 < 4 (true).
3. 4 = 7 (false)

However the following are a not propositions:


1. what is your name?.
2. 𝑥 is an even number.

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 3 / 60


Chapter 1 Chapter 2 Chapter 3

Definition 2. (Atomic statements)


Declarative sentences which cannot be further split into simple
sentences are called atomic statements (also called primary
statements or primitive statements).

Example: 𝑝 is a prime number

Definition 3. (Compound statements)


New statements can be formed from atomic statements through the
use of connectives such as and but or etc. The resulting statement are
called molecular or compound (composite) statements.

Example: If 𝑝 is a prime number then, the divisors are 𝑝 and 1 itself

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 4 / 60


Chapter 1 Chapter 2 Chapter 3

Definition 4. (truth value)


The truth or falsehood of a proposition is called its truth value.

Definition 5. (Truth Table)


A table, giving the truth values of a compound statement interms of its
component parts, is called a Truth Table.

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 5 / 60


Chapter 1 Chapter 2 Chapter 3

Definition 6. (Connectives)

Connectives are used for making compound propositions. The main


ones are the following (𝑝 and 𝑞 represent given two propositions):

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 6 / 60


Chapter 1 Chapter 2 Chapter 3

Table 1. Logic Connectives

Name Represented Meaning


Negation ¬𝑝 not in p
Conjunction 𝑝∧𝑞 p and q
Disjunction 𝑝∨𝑞 p or q (or both)
Implication 𝑝 → 𝑞 if p then q
Biconditional 𝑝 ↔ 𝑞 p if and only if q

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 7 / 60


Chapter 1 Chapter 2 Chapter 3

The truth value of a compound proposition depends only on the value


of its components. Writing 𝐹 for false and 𝑇 for true, we can
summarize the meaning of the connectives in the following way:

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

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 8 / 60


Chapter 1 Chapter 2 Chapter 3

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.

Example: The proposition 𝑝 ∨ ¬𝑝 is a tautology.

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.

Example: The proposition 𝑝 ∧ ¬𝑝 is a contradiction.

Definition 9.(Contingency)
A proposition that is neither a tautology nor a contradiction is called a
contingency.

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 9 / 60


Chapter 1 Chapter 2 Chapter 3

p ¬𝑝 𝑝 ∧ ¬𝑝 𝑝 ∨ ¬𝑝
T F F T
T F F T
F T F T
F T F T

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 10 / 60


Chapter 1 Chapter 2 Chapter 3

I. Construct the truth table for the following statements:

(i) (𝑝 → 𝑞) ←→ (¬𝑝 ∨ 𝑞)

(ii) 𝑝 ∧ (𝑝 ∨ 𝑞)

(iii) (𝑝 → 𝑞) → 𝑝

(iv) ¬ (𝑝 ∧ 𝑞) ←→ (¬ 𝑝 ∨ ¬ 𝑞)

(v) (𝑝 ∨ ¬𝑞) → 𝑞

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 11 / 60


Chapter 1 Chapter 2 Chapter 3

Solution:

(i) Let 𝑆 = (𝑝 → 𝑞) ←→ (¬𝑝 ∨ 𝑞)

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

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 12 / 60


Chapter 1 Chapter 2 Chapter 3

(ii) Let 𝑆 = 𝑝 ∧ (𝑝 ∨ 𝑞)

p q 𝑝∨𝑞 S
T T T T
T F T T
F T T F
F F F F

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 13 / 60


Chapter 1 Chapter 2 Chapter 3

(iii) Let 𝑆 = (𝑝 → 𝑞) → 𝑝

p q 𝑝 → 𝑞 S
T T T T
T F F T
F T T F
F F T F

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 14 / 60


Chapter 1 Chapter 2 Chapter 3

(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

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 15 / 60


Chapter 1 Chapter 2 Chapter 3

(v) Let 𝑆 = (𝑝 ∨ ¬𝑞) → 𝑞

p q ¬𝑞 𝑝 ∨ ¬𝑞 S
T T F T T
T F T T F
F T F F T
F F T T F

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 16 / 60


Chapter 1 Chapter 2 Chapter 3

Logical Equivalence

The compound propositions 𝑝 → 𝑞 and ¬𝑝 ∨ 𝑞 have the same truth


values:
p q ¬𝑝 𝑝 → 𝑞 ¬𝑝 ∨ 𝑞
T T F T T
T F F F F
F T T T T
F F T T T

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 17 / 60


Chapter 1 Chapter 2 Chapter 3

When two compound propositions have the same truth values no


matter what truth value their constituent propositions have, they are
called logically equivalent.

For instance 𝑝 → 𝑞 and ¬𝑝 ∨ 𝑞 are logically equivalent, and we write it:

𝑝 → 𝑞 ⇔ ¬𝑝 ∨ 𝑞

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 18 / 60


Chapter 1 Chapter 2 Chapter 3

Definition 10. (Logically Equivalent)


Two propositions 𝐴 and 𝐵 are logically equivalent precisely when
𝐴 ⇔ 𝐵 is a tautology.

Example: The following propositions are logically equivalent:


𝑝 ↔ 𝑞 ⇔ (𝑝 → 𝑞) ∧ (𝑞 → 𝑝)

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

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 19 / 60


Chapter 1 Chapter 2 Chapter 3

Table 2. Logic equivalences

Equivalences Name
𝑝∧𝑇 ⇔ 𝑝 Identity law
𝑝∨𝐹 ⇔ 𝑝
𝑝∨𝑇 ⇔ 𝑇 Dominent law
𝑝∧𝐹 ⇔ 𝐹
𝑝∨𝑇 ⇔ 𝑇 Idempotent law
𝑝∧𝐹 ⇔ 𝐹
𝑝∨𝑞 ⇔ 𝑞 ∨𝑝 Commutative law
𝑝∧𝑞 ⇔ 𝑞 ∧𝑝
(𝑝 ∨ 𝑞) ∨ 𝑟 ⇔ 𝑝 ∨ (𝑞 ∨ 𝑟) Associative law
(𝑝 ∧ 𝑞) ∧ 𝑟 ⇔ 𝑝 ∧ (𝑞 ∧ 𝑟)

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 20 / 60


Chapter 1 Chapter 2 Chapter 3

Table 2. Logic equivalences (Continued...)

Equivalences Name
(𝑝 ∨ 𝑞) ∧ 𝑟 ⇔ (𝑝 ∧ 𝑟) ∨ (𝑞 ∧ 𝑟) Distributive law
(𝑝 ∧ 𝑞) ∨ 𝑟 ⇔ (𝑝 ∨ 𝑟) ∧ (𝑞 ∨ 𝑟)
(𝑝 ∨ 𝑞) ∧ 𝑝 ⇔ 𝑝 Absorbtion law
(𝑝 ∧ 𝑞) ∨ 𝑝 ⇔ 𝑝
¬ (𝑝 ∧ 𝑞) ⇔ ¬ 𝑝 ∨ ¬ 𝑞 De morgan’s law
¬ (𝑝 ∨ 𝑞) ⇔ ¬ 𝑝 ∧ ¬ 𝑞
¬𝑝 ∧ 𝑝 ⇔ 𝐹 Negation law
¬𝑝 ∨ 𝑝 ⇔ 𝑇
¬ (¬ 𝑝 ) ⇔ 𝑝

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 21 / 60


Chapter 1 Chapter 2 Chapter 3

Table 3. Logic equivalences involving implications

Implications
𝑝 → 𝑞 ⇔ ¬𝑝 ∨ 𝑞
𝑝 → 𝑞 ⇔ ¬𝑞 → ¬𝑝
¬(𝑝 → 𝑞) ⇔ 𝑝 ∧ ¬𝑞
𝑝 ∨ 𝑞 ⇔ ¬𝑝 → 𝑞
𝑝 ∧ 𝑞 ⇔ ¬(𝑝 → ¬𝑞)
(𝑝 → 𝑞) ∧ (𝑝 → 𝑟) ⇔ 𝑝 → (𝑞 ∧ 𝑟)
(𝑝 → 𝑞) ∨ (𝑝 → 𝑟) ⇔ 𝑝 → (𝑞 ∨ 𝑟)
(𝑝 → 𝑟) ∧ (𝑞 → 𝑟) ⇔ (𝑝 ∨ 𝑞) → 𝑟)
(𝑝 → 𝑞) ∨ (𝑝 → 𝑟) ⇔ (𝑝 ∧ 𝑞) → 𝑟)

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 22 / 60


Chapter 1 Chapter 2 Chapter 3

Table 4. Logic equivalences involving Biconditions

Biconditions
𝑝 ↔ 𝑞 ⇔ (𝑝 → 𝑞) ∧ (𝑞 → 𝑝)
𝑝 ↔ 𝑞 ⇔ ¬𝑝 ↔ ¬𝑞
𝑝 ↔ 𝑞 ⇔ (𝑝 ∧ 𝑞) ∨ (¬𝑝 ∧ ¬𝑞)
¬(𝑝 ↔ 𝑞) ⇔ 𝑝 ↔ ¬𝑞

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 23 / 60


Chapter 1 Chapter 2 Chapter 3

Definition 11. (Converse)


The converse of a conditional proposition 𝑝 → 𝑞 is the proposition
𝑞→𝑝

Definition 12. (Inverse)


The inverse of a conditional proposition 𝑝 → 𝑞 is the proposition
¬𝑝→¬𝑞

Definition 13. (Contrapositive)


The contrapositive of a conditional proposition 𝑝 → 𝑞 is the proposition
¬ 𝑞 → ¬ 𝑝.

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 24 / 60


Chapter 1 Chapter 2 Chapter 3

II. Without using truth table:

(i) Show that (𝑝 ∨ 𝑞) ∧ ¬𝑝 ⇔ (¬𝑝 ∧ 𝑞)

(ii) Show that (𝑝 ∨ 𝑞) ∧ ¬(¬𝑝 ∧ 𝑞) ⇔ 𝑝

(iii) Show that ¬(𝑝 ∨ (¬𝑝 ∧ 𝑞)) ⇔ ¬𝑝 ∧ ¬𝑞

(iv) Show that ¬(¬((𝑝 ∨ 𝑞) ∧ 𝑟) ∨ ¬𝑞) ⇔ 𝑞 ∧ 𝑟

(v) Show that (𝑝 ∧ 𝑞) → (𝑝 ∨ 𝑞) is a tautology.

(vi) Show that 𝑝 → (𝑞 → 𝑟) ⇔ (𝑝 ∧ 𝑞) → 𝑟.

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 25 / 60


Chapter 1 Chapter 2 Chapter 3

Solution:

(i)

𝑆 ⇔ (𝑝 ∨ 𝑞) ∧¬𝑝 Reasons
⇔ (𝑝 ∨ 𝑞) ∧¬𝑝 Given
⇔ (𝑝∧¬𝑝)∨(𝑞∧¬𝑝) Distributive law
⇔ 𝐹 ∨(¬𝑝∧𝑞) Negation law,Commutative law
⇔ ¬𝑝∧𝑞 Identity law

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 26 / 60


Chapter 1 Chapter 2 Chapter 3

(ii)

𝑆 ⇔ (𝑝 ∨ 𝑞)∧¬(¬𝑝 ∧ 𝑞) Reasons
⇔ (𝑝 ∨ 𝑞)∧¬(¬𝑝 ∧ 𝑞) Given
⇔ (𝑝 ∨ 𝑞)∧(¬¬𝑝 ∨ ¬𝑞) De Morgan’s law
⇔ (𝑝 ∨ 𝑞)∧(𝑝 ∨ ¬𝑞) Negation law
⇔ 𝑝∨(𝑞∧¬𝑞) Distributive law
⇔ 𝑝∨𝐹 Negation law
⇔ 𝑝 Identity law

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 27 / 60


Chapter 1 Chapter 2 Chapter 3

(iii)

𝑆 ⇔ ¬(𝑝 ∨ (¬𝑝 ∧ 𝑞)) Reasons


⇔ ¬(𝑝 ∨ (¬𝑝 ∧ 𝑞)) Given
⇔ ¬𝑝 ∧ ¬(¬𝑝 ∧ 𝑞)) De Morgan’s law
⇔ ¬𝑝 ∧ (𝑝 ∨ ¬𝑞)) De Morgan’s law
⇔ (¬𝑝 ∧ 𝑝)∨(¬𝑝∧¬𝑞) Distributive law
⇔ 𝐹 ∨(¬𝑝∧¬𝑞) Negation law
⇔ ¬𝑝∧¬𝑞 Identity law

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 28 / 60


Chapter 1 Chapter 2 Chapter 3

(iv)

𝑆 ⇔ ¬(¬((𝑝 ∨ 𝑞) ∧ 𝑟)∨¬𝑞) ⇔ 𝑞 ∧ 𝑟 Reasons


⇔ ¬(¬((𝑝 ∨ 𝑞)∧𝑟)∨¬𝑞) Given
⇔ ((𝑝 ∨ 𝑞)∧𝑟)∧𝑞 De Morgan’s law
⇔ (𝑝 ∨ 𝑞)∧(𝑟∧𝑞) Associative law
⇔ (𝑝 ∧(𝑟∧𝑞))∨ (𝑞 ∧(𝑟∧𝑞)) Distributive law
⇔ (𝑝 ∧(𝑟∧𝑞))∨ (𝑟∧𝑞) Idempotent law
⇔ 𝑟∧𝑞 Absorption law

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 29 / 60


Chapter 1 Chapter 2 Chapter 3

Definition 14. (Duality)


The dual of a compound proposition that contains only the logical
operators ∨, ∧ and ¬ is the proposition obtained by replacing each ∨
by ∧, each ∧ by ∨, each 𝑇 by 𝐹 and each 𝐹 by 𝑇 . The dual of
proposition 𝐴 is denoted by 𝐴∗ .

Example. The dual of (𝑇 ∧𝑝)∨𝑞 is (𝐹 ∨𝑝)∧𝑞

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 30 / 60


Chapter 1 Chapter 2 Chapter 3

Definition 15. (Functionally complete set of connectives)


Any set of connectives in which every formula can be expressed as
another equivalent formula containing connectives from this set is
called functionally complete set of connectives.

Example. The set of connectives


{∨, ¬} and {∧, ¬} are functionally complete.
{¬},{∨} or {∨, ∧} are not functionally complete.

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 31 / 60


Chapter 1 Chapter 2 Chapter 3

Problem. Prove that the set {∨, ¬} is functionally complete.

Solution:

To prove {∨, ¬} is functionally complete.


We have to show that for all formulas with other connectives their
exists a equivalent formula which contains ¬ and ∨ only.

𝑝 ↔ 𝑞 ⇔ (¬𝑝 ∨ 𝑞) ∧ (¬𝑞 ∨ 𝑝)

𝑝 → 𝑞 ⇔ (¬𝑝 ∨ 𝑞)

𝑝 ∧ 𝑞 ⇔ ¬(¬𝑝 ∨ ¬𝑞)

The resultant is free from biconditional, conditional and conjunction.


Hence {∨, ¬} is functionally complete.
Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 32 / 60
Chapter 1 Chapter 2 Chapter 3

Chapter 2
Inference Theory

An argument is a sequence of propositions 𝐻1 , 𝐻2 , . . . , 𝐻𝑛 called


premises (or hypotheses) followed by a proposition 𝐶 called
conclusion. An argument is usually written:
𝐻1
𝐻2
..
.
𝐻𝑛
implies 𝐶
or
𝐻1 ∧𝐻2 ∧ . . . ∧𝐻𝑛 ⇒ 𝐶

The argument is valid if 𝐶 is true whenever 𝐻1 , 𝐻2 , ..., 𝐻𝑛 are true;


otherwise it is invalid.
Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 33 / 60
Chapter 1 Chapter 2 Chapter 3

Example: 𝐻1 : 𝑝 and 𝐻2 : 𝑝 → 𝑞 then 𝐶 : 𝑞 (Modus Ponens)

p q 𝑝→𝑞 𝑝 ∧ (𝑝 → 𝑞) (𝑝 ∧ (𝑝 → 𝑞)) → 𝑞
T T T T T
T F F F T
F T T F T
F F T F T

Notice that (𝑝 ∧ (𝑝 → 𝑞)) → 𝑞 is a tautology. Therefore it is valid.


Thus 𝑝, 𝑝 → 𝑞 ⇒ 𝑞.

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 34 / 60


Chapter 1 Chapter 2 Chapter 3

Example: 𝐻1 : 𝑞 and 𝐻2 : 𝑝 → 𝑞 then 𝐶 : 𝑝

p q 𝑝→𝑞 𝑞 ∧ (𝑝 → 𝑞) (𝑞 ∧ (𝑝 → 𝑞)) → 𝑝
T T T T T
T F F F T
F T T T F
F F T F T

Notice that 𝑞 ∧ (𝑝 → 𝑞) → 𝑝 is a condigency. Therefore it is invalid.

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 35 / 60


Chapter 1 Chapter 2 Chapter 3

Implication Table:

S.No Formula Name


1 𝑝∧𝑞 ⇒𝑝 simplification
𝑝∧𝑞 ⇒𝑞
2 𝑝⇒𝑝∨𝑞 addition
𝑞 ⇒𝑝∨𝑞
3 𝑝, 𝑞 ⇒ 𝑝 ∧ 𝑞
4 𝑝, 𝑝 → 𝑞 ⇒ 𝑞 modus ponens
5 ¬𝑝, 𝑝 ∨ 𝑞 ⇒ 𝑞 disjunctive syllogism
6 ¬𝑞, 𝑝 → 𝑞 ⇒ ¬𝑝 modus tollens
7 𝑝 → 𝑞,𝑞 → 𝑟 ⇒ 𝑝 → 𝑟

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 36 / 60


Chapter 1 Chapter 2 Chapter 3

Rules of inference:

Rule P: A premises can be introduced at any step of derivation.

Rule T: A formula can be introduced provided it is Tautologically


implied by previously introduced formulas in the derivation.

Rule CP: If the conclusion is of the form 𝑟 → 𝑠 then we include 𝑟 as an


additional premises and derive 𝑠.

Indirect method: We use negation of the conclusion as an additional


premise and try to arrive at a contradiction.

Inconsistent: A set of premises are inconsistent provided their


conjunction implies a contradiction.

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 37 / 60


Chapter 1 Chapter 2 Chapter 3

Example: Show that ¬𝑞 and 𝑝 → 𝑞 implies ¬𝑝.

Solution: (A formal proof is as follows):

Step 1. 𝑝 → 𝑞 Rule P

Step 2. ¬𝑞 → ¬𝑝 Rule T

Step 3. ¬𝑞 Rule P

Step 4. ¬𝑝 Combined {2, 3} and apply Modus Ponens

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 38 / 60


Chapter 1 Chapter 2 Chapter 3

Example: Show that 𝑟 is a valid inference from the premises


𝑝 → 𝑞, 𝑞 → 𝑟 and 𝑝.
Solution:
Step Derivation Rule
1 𝑝 P
2 𝑝→𝑞 P
3 𝑞 {1, 2}, ℐ4
4 𝑞→𝑟 P
5 𝑟 {3, 4}, ℐ4

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 39 / 60


Chapter 1 Chapter 2 Chapter 3

Example: Show that 𝑠 ∨ 𝑟 is tautologically implied by 𝑝 ∨ 𝑞, 𝑝 → 𝑟 and


𝑞 → 𝑠.
Solution:
Step Derivation Rule
1 𝑝∨𝑞 P
2 ¬𝑝 → 𝑞 T
3 𝑞→𝑠 P
4 ¬𝑝 → 𝑠 {2, 3}, ℐ7
5 ¬𝑠 → 𝑝 T
6 𝑝→𝑟 P
7 ¬𝑠 → 𝑟 {5, 6}, ℐ7
8 𝑠∨𝑟 T

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 40 / 60


Chapter 1 Chapter 2 Chapter 3

Example: Prove by indirect method that 𝑝 → 𝑞, 𝑝 ∨ 𝑟, ¬𝑞 implies 𝑟.


Solution: The desired result is 𝑟. Include ¬𝑟 as a new premise.

Step Derivation Rule


1 𝑝∨𝑟 P
2 ¬𝑟 → 𝑝 T
3 ¬𝑟 P(additional premise)
4 𝑝 {2, 3}, ℐ4
5 𝑝→𝑞 P
6 𝑞 {4, 5}, ℐ4
7 ¬𝑞 P
8 𝑞 ∧ ¬𝑞 {6, 7}, ℐ3

The new premise together with the given premises, leads to a


contradiction. Thus 𝑝 → 𝑞, 𝑝 ∨ 𝑟, ¬𝑞 implies 𝑟.

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 41 / 60


Chapter 1 Chapter 2 Chapter 3

Example: Prove that 𝑝 → 𝑞, 𝑝 → 𝑟, 𝑞 → ¬𝑟 and 𝑝 are inconsistent.


Solution: The desired result is false.
Step Derivation Rule
1 𝑝 P
2 𝑝→𝑞 P
3 𝑞 {1, 2}, ℐ4
4 𝑞 → ¬𝑟 P
5 ¬𝑟 {3, 4}, ℐ4
6 𝑝→𝑟 P
7 ¬𝑝 {5, 6}, ℐ6
8 𝐹 {1, 7},ℐ3

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 42 / 60


Chapter 1 Chapter 2 Chapter 3

III. Problems:

(i) Show that 𝑟 ∨ 𝑠 is tautologically implied by


𝑐 ∨ 𝑑, (𝑐 ∨ 𝑑) → ¬ℎ, ¬ℎ → (𝑎 ∧ ¬𝑏) and (𝑎 ∧ ¬𝑏) → (𝑟 ∨ 𝑠).

(ii) Show that 𝑟 ∧ (𝑝 ∨ 𝑞) is tautologically implied by 𝑝 ∨ 𝑞, 𝑞 → 𝑟, 𝑝 → 𝑚


and ¬𝑚.

(iii) Show that 𝑟 → 𝑠 is tautologically implied by ¬𝑟 ∨ 𝑝, 𝑝 → (𝑞 → 𝑠)


and 𝑞.

(iv) Show that 𝑝 → 𝑠 is tautologically implied by ¬𝑝 ∨ 𝑞, ¬𝑞 ∨ 𝑟 and


𝑟 → 𝑠.

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 43 / 60


Chapter 1 Chapter 2 Chapter 3

(v) Show that 𝑝 → (𝑞 → 𝑠) is tautologically implied by 𝑝 → (𝑞 → 𝑟) and


𝑞 → (𝑟 → 𝑠) using CP rule.

(vi) Show that the following premises are inconsistent.


𝑣 → 𝑙, 𝑙 → 𝑏, 𝑚 → ¬𝑏 and 𝑣 ∧ 𝑚.

(vii) Show that 𝑝 → ¬𝑠 logically follows from the premises


𝑝 → (𝑞 ∨ 𝑟), 𝑞 → ¬𝑝, 𝑠 → ¬𝑟 and 𝑝 by indirect method.

(viii) Show that 𝑟 logically follows from the premises 𝑝 → 𝑞, ¬𝑞 and


𝑝 ∨ 𝑟 by indirect method.

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 44 / 60


Chapter 1 Chapter 2 Chapter 3

Predicate Calculus

Consider the statement

𝑝 : 𝑥 is a prime number (the statement is not a proposition)

The truth value of 𝑝 depends on the value of 𝑥.


𝑝 is true when 𝑥 = 3, and false when 𝑥 = 10.

In this section we extend the system of logic to include such an above


statements.

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 45 / 60


Chapter 1 Chapter 2 Chapter 3

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.

That is, let 𝑃 (𝑥) be a statement involving variable 𝑥 and a set 𝐷. We


call 𝑃 a propositional function if for each 𝑥 in 𝐷, 𝑃 (𝑥) is a proposition.

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 46 / 60


Chapter 1 Chapter 2 Chapter 3

Definition 2. (universe of discourse)


The set 𝐷 is called the domain of discourse (oruniverse of discourse)
of 𝑃. It is the set of all possible values which can be assigned to
variables in statements involving predicates.

Example: Let 𝑝(𝑥) denote the statement 𝑥 ≥ 4. What are the truth
values of 𝑝(5) (𝑇 ) and 𝑝(2) (𝐹 ).

Example: Let 𝑔(𝑥, 𝑦) denote the statement 𝑔.𝑐.𝑑(𝑥, 𝑦) = 1. What are


the truth values of 𝑔(3, 5) (𝑇 ) and 𝑔(2, 8) (𝐹 )

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 47 / 60


Chapter 1 Chapter 2 Chapter 3

Definition 3. (universal quantifier)


Consider the proposition
All odd prime numbers are greater than 2. The word all in this
proposition is a logical quantifier. The proposition can be translated as
follows:
For every 𝑥, if 𝑥 is an odd prime then 𝑥 is greater than 2

Similarly, the proposition:

Every rational number is a real number may be translated as.


For every 𝑥, if 𝑥 is a rational number, then 𝑥 is a real number.

The phrase for every 𝑥 is called a universal quantifier.

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 48 / 60


Chapter 1 Chapter 2 Chapter 3

In symbols it is denoted by ∀𝑥.

The phrases for every 𝑥, for all 𝑥 and for each 𝑥 have the same
meaning and we can symbolize each by ∀𝑥.

If 𝑃 (𝑥) denotes a predicate (propositional function), then the universal


quantification for 𝑃 (𝑥), is the statement.

∀ 𝑥 𝑃 (𝑥) is true.

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 49 / 60


Chapter 1 Chapter 2 Chapter 3

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 ∈
/ 𝐴.

(b) The proposition (∀𝑁 ) (𝑛 + 4 > 3) is true.


Since {𝑛∣𝑛 + 4 > 3} = {1, 2, 3, . . . } = 𝑁.

(c) The proposition (∀𝑁 ) (𝑛 + 2 > 8) is false.


Since {𝑛∣𝑛 + 2 > 8} = {7, 8, 9, . . . } ∕= 𝑁.

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 50 / 60


Chapter 1 Chapter 2 Chapter 3

Definition 4. (existential quantifier).


In some situations we only require that there be at least one value for
each the predicate is true. This can be done by prefixing 𝑃 (𝑥) with the
phrase there exists an. The phrase there exists an is called an
existential quantifier.

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 51 / 60


Chapter 1 Chapter 2 Chapter 3

The existential quantification for a predicate is the statement There


exists a value of 𝑥 for which 𝑃 (𝑥).

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.

The existential quantifier for 𝑃 (𝑥) is denoted by ∃ 𝑥 𝑃 (𝑥)

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 52 / 60


Chapter 1 Chapter 2 Chapter 3

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)

(b) The proposition (∃𝑁 ) (𝑛 + 4 < 7) is true.


Since {𝑛∣𝑛 + 4 < 7} = {1, 2} ∕= 𝜙.

(c) The proposition (∃𝑁 ) (𝑛 + 6 < 4) is false.


Since {𝑛∣𝑛 + 6 < 4} = 𝜙.

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 53 / 60


Chapter 1 Chapter 2 Chapter 3

IV. Problems:

(i) Show that (𝑥)(𝐻(𝑥) −→ 𝑀 (𝑥)) ∧ 𝐻(𝑎) =⇒ 𝑀 (𝑎).


Solution:

Step 1. (𝑥)(𝐻(𝑥) −→ 𝑀 (𝑥)) Rule P

Step 2. 𝐻(𝑎) −→ 𝑀 (𝑎) Rule US

Step 3. 𝐻(𝑎) Rule P

Step 4. 𝑀 (𝑎) {2, 3} and apply Modus Ponens

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 54 / 60


Chapter 1 Chapter 2 Chapter 3

(ii) Show that


(𝑥)(𝑃 (𝑥) −→ 𝑄(𝑥)) ∧ (𝑥)(𝑄(𝑥) −→ 𝑅(𝑥)) =⇒ (𝑥)(𝑃 (𝑥) −→ 𝑅(𝑥)).
Solution:

Step 1 (𝑥)(𝑃 (𝑥) −→ 𝑄(𝑥)) Rule P


Step 2 𝑃 (𝑎) −→ 𝑄(𝑎) Rule US
Step 3 (𝑥)(𝑄(𝑥) −→ 𝑅(𝑥)) Rule P
Step 4 𝑄(𝑎) −→ 𝑅(𝑎) Rule US
Step 5 𝑃 (𝑎) −→ 𝑅(𝑎) {2,4},ℐ7
Step 6 (𝑥)𝑃 (𝑥) −→ 𝑅(𝑥) Rule UG

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 55 / 60


Chapter 1 Chapter 2 Chapter 3

(iii) Show that (∃𝑥)(𝑃 (𝑥) ∧ 𝑄(𝑥)) =⇒ (∃𝑥)𝑃 (𝑥) ∧ (∃𝑥)𝑄(𝑥).


Solution:

Step 1 (∃𝑥)(𝑃 (𝑥) ∧ 𝑄(𝑥)) Rule P


Step 2 𝑃 (𝑎) ∧ 𝑄(𝑎) Rule ES
Step 3 𝑃 (𝑎) ℐ1
Step 4 𝑄(𝑎) ℐ1
Step 5 (∃𝑥)𝑃 (𝑥) {3},EG
Step 6 (∃𝑥)𝑄(𝑥) {4},EG
Step 7 (∃𝑥)𝑃 (𝑥) ∧ (∃𝑥)𝑄(𝑥) {5,6}, ℐ3

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 56 / 60


Chapter 1 Chapter 2 Chapter 3

(iv) Show that (𝑥)(𝑃 (𝑥) ∨ 𝑄(𝑥)) =⇒ (𝑥)𝑃 (𝑥) ∨ (∃𝑥)𝑄(𝑥).


Solution: Proof by indirect method

Step 1 ¬((𝑥)(𝑃 (𝑥) ∨ 𝑄(𝑥))) Rule P


Step 2 ¬(𝑥)𝑃 (𝑥) ∧ ¬(∃𝑥)𝑄(𝑥) Rule T
Step 3 ¬(𝑥)𝑃 (𝑥) ℐ1
Step 4 ¬(∃𝑥)𝑄(𝑥) ℐ1
Step 5 (∃𝑥)¬𝑃 (𝑥) 3,Rule T
Step 6 (𝑥)¬𝑄(𝑥) 4,Rule T
Step 7 ¬𝑃 (𝑎) 5,ES
Step 8 ¬𝑄(𝑎) 6,US

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 57 / 60


Chapter 1 Chapter 2 Chapter 3

Step 9 ¬𝑃 (𝑎) ∧ ¬𝑄(𝑎) {7,8},ℐ3


Step 10 ¬(𝑃 (𝑎) ∨ 𝑄(𝑎)) Rule T
Step 11 (𝑥)(𝑃 (𝑥) ∨ 𝑄(𝑥)) Rule P
Step 12 𝑃 (𝑎) ∨ 𝑄(𝑎) US
Step 13 ¬(𝑃 (𝑎) ∨ 𝑄(𝑎)) ∧ (𝑃 (𝑎) ∨ 𝑄(𝑎)) {10,12}, ℐ3
Step 14 𝐹 Rule T

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 58 / 60


Chapter 1 Chapter 2 Chapter 3

(v) Show that from


(a) (∃𝑥)(𝐹 (𝑥) ∧ 𝑆(𝑥)) −→ (𝑦)(𝑀 (𝑦) −→ 𝑊 (𝑦))
(b) (∃𝑦)(𝑀 (𝑦) ∧ ¬𝑊 (𝑦))
the conclusion (𝑥)(𝐹 (𝑥) −→ ¬𝑆(𝑥)).
Solution:

Step 1 (∃𝑦)(𝑀 (𝑦) ∧ ¬𝑊 (𝑦)) Rule P


Step 2 (𝑀 (𝑎) ∧ ¬𝑊 (𝑎)) ES
Step 3 ¬(𝑀 (𝑎) −→ 𝑊 (𝑎)) Rule T
Step 4 (∃𝑦)¬(𝑀 (𝑦) −→ 𝑊 (𝑦)) EG
Step 5 ¬(𝑦)(𝑀 (𝑦) −→ 𝑊 (𝑦)) Rule T

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 59 / 60


Chapter 1 Chapter 2 Chapter 3

Step 6 (∃𝑥)(𝐹 (𝑥) ∧ 𝑆(𝑥)) −→ (𝑦)(𝑀 (𝑦) −→ 𝑊 (𝑦)) Rule P


Step 7 ¬(∃𝑥)(𝐹 (𝑥) ∧ 𝑆(𝑥)) {5,6}, ℐ6
Step 8 (𝑥)¬(𝐹 (𝑥) ∧ 𝑆(𝑥)) Rule T
Step 9 ¬(𝐹 (𝑎) ∧ 𝑆(𝑎)) US
Step 10 𝐹 (𝑎) −→ ¬𝑆(𝑎) Rule T
Step 11 (𝑥)(𝐹 (𝑥) −→ ¬𝑆(𝑥)) UG

Dr. D. Ezhilmaran (VIT) DMS Jan 02, 2014 60 / 60

Potrebbero piacerti anche