You are on page 1of 252

Discrete Structures

The Foundations: Logic and Proofs

Dr. Peter Amoako-Yirenkyi


College of Science/ Mathematics Department

December 11, 2018


Introduction
What is Logic?
Introduction
What is Logic?
Logic is the basis of all mathematical reasoning, and of all
automated reasoning.
Introduction
What is Logic?
Logic is the basis of all mathematical reasoning, and of all
automated reasoning.

• The rules of logic specify the meaning of mathematical


statements.
Introduction
What is Logic?
Logic is the basis of all mathematical reasoning, and of all
automated reasoning.

• The rules of logic specify the meaning of mathematical


statements.
• These rules help us understand and reason with statements
such as:
Introduction
What is Logic?
Logic is the basis of all mathematical reasoning, and of all
automated reasoning.

• The rules of logic specify the meaning of mathematical


statements.
• These rules help us understand and reason with statements
such as:
”There exists an integer that is not the sum of two squares”.
Introduction
What is Logic?
Logic is the basis of all mathematical reasoning, and of all
automated reasoning.

• The rules of logic specify the meaning of mathematical


statements.
• These rules help us understand and reason with statements
such as:
”There exists an integer that is not the sum of two squares”.
”For every positive integer n, the sum of the positive integers not
exceeding n is n(n + 1)/2”
Introduction
What is Logic?
Logic is the basis of all mathematical reasoning, and of all
automated reasoning.

• The rules of logic specify the meaning of mathematical


statements.
• These rules help us understand and reason with statements
such as:
”There exists an integer that is not the sum of two squares”.
”For every positive integer n, the sum of the positive integers not
exceeding n is n(n + 1)/2”
Some Practical Applications of Logic
• Crucial for mathematical reasoning
Some Practical Applications of Logic
• Crucial for mathematical reasoning
• Designing of computing machines.
Some Practical Applications of Logic
• Crucial for mathematical reasoning
• Designing of computing machines.
• Designing electrical circuitry.
Some Practical Applications of Logic
• Crucial for mathematical reasoning
• Designing of computing machines.
• Designing electrical circuitry.
• Specification of systems.
Some Practical Applications of Logic
• Crucial for mathematical reasoning
• Designing of computing machines.
• Designing electrical circuitry.
• Specification of systems.
• Artificial intelligence
Some Practical Applications of Logic
• Crucial for mathematical reasoning
• Designing of computing machines.
• Designing electrical circuitry.
• Specification of systems.
• Artificial intelligence
• Computer programming
Some Practical Applications of Logic
• Crucial for mathematical reasoning
• Designing of computing machines.
• Designing electrical circuitry.
• Specification of systems.
• Artificial intelligence
• Computer programming
• Programming languages.
Propositional Logic

What can we say a Proposition is?


Propositional Logic

What can we say a Proposition is?

A proposition is a declarative sentence (that is, a sentence that


declares a fact) that is either true or false, but not both.
Propositional Logic

What can we say a Proposition is?

A proposition is a declarative sentence (that is, a sentence that


declares a fact) that is either true or false, but not both.

The area of logic that deals with propositions is called the


propositional calculus or propositional logic
Propositional Logic

What can we say a Proposition is?

A proposition is a declarative sentence (that is, a sentence that


declares a fact) that is either true or false, but not both.

The area of logic that deals with propositions is called the


propositional calculus or propositional logic

We say the truth value of a proposition is either true(T) or false(F)


(not both)
The Statement/Proposition Game

Elephants are bigger than mice.”

Is this a statement?
The Statement/Proposition Game

Elephants are bigger than mice.”

Is this a statement? yes


Is this a proposition?
The Statement/Proposition Game

Elephants are bigger than mice.”

Is this a statement? yes


Is this a proposition? yes
What is the truth value of the proposition? true
The Statement/Proposition Game

Kumasi is the capital of Eastern Region.”

Is this a statement?
The Statement/Proposition Game

Kumasi is the capital of Eastern Region.”

Is this a statement? yes


Is this a proposition?
The Statement/Proposition Game

Kumasi is the capital of Eastern Region.”

Is this a statement? yes


Is this a proposition? yes
What is the truth value of the proposition? true
The Statement/Proposition Game

”520 < 111”

Is this a statement?
The Statement/Proposition Game

”520 < 111”

Is this a statement? yes


Is this a proposition?
The Statement/Proposition Game

”520 < 111”

Is this a statement? yes


Is this a proposition? yes
What is the truth value of the proposition? false
The Statement/Proposition Game

”y > 5”

Is this a statement?
The Statement/Proposition Game

”y > 5”

Is this a statement? yes


Is this a proposition?
The Statement/Proposition Game

”y > 5”

Is this a statement? yes


Is this a proposition? no

What is the truth value of the proposition?


Its truth value depends on the value of y.
We call this type of statement a propositional
function or open sentence
The Statement/Proposition Game

”Please do not fall asleep”

Is this a statement?
The Statement/Proposition Game

”Please do not fall asleep”

Is this a statement? no
It’s a request
Is this a proposition?
The Statement/Proposition Game

”Please do not fall asleep”

Is this a statement? no
It’s a request
Is this a proposition? no
Only statements can be propositions
The Statement/Proposition Game

” What time is it?”

Is this a statement?
The Statement/Proposition Game

” What time is it?”

Is this a statement? no
It’s a question
Is this a proposition?
The Statement/Proposition Game

” What time is it?”

Is this a statement? no
It’s a question
Is this a proposition? no
Only statements can be propositions.
The Statement/Proposition Game

”Today is January 27 and 99 < 5”

Is this a statement?
The Statement/Proposition Game

”Today is January 27 and 99 < 5”

Is this a statement? yes


Is this a proposition?
The Statement/Proposition Game

”Today is January 27 and 99 < 5”

Is this a statement? yes


Is this a proposition? yes
What is the truth value of the proposition? no
The Statement/Proposition Game

”If the moon is made of cheese, then i will be rich”

Is this a statement?
The Statement/Proposition Game

”If the moon is made of cheese, then i will be rich”

Is this a statement? yes


Is this a proposition?
The Statement/Proposition Game

”If the moon is made of cheese, then i will be rich”

Is this a statement? yes


Is this a proposition? yes
What is the truth value of the proposition?
probably true
The Statement/Proposition Game

”x < y if and only if y > x””

Is this a statement?
The Statement/Proposition Game

”x < y if and only if y > x””

Is this a statement? yes


Is this a proposition?
The Statement/Proposition Game

”x < y if and only if y > x””

Is this a statement? yes


Is this a proposition? yes
What is the truth value of the proposition? true
Propositional Variables
• Sometimes called statement variables are
variables that represent propositions.
Propositional Variables
• Sometimes called statement variables are
variables that represent propositions.
Propositional Variables
• Sometimes called statement variables are
variables that represent propositions.

• x and y as seen from previous examples are


propositional variables.
Propositional Variables
• Sometimes called statement variables are
variables that represent propositions.

• x and y as seen from previous examples are


propositional variables.
Propositional Variables
• Sometimes called statement variables are
variables that represent propositions.

• x and y as seen from previous examples are


propositional variables.

• The conventional letters used for propositional


variables are p, q, r , s, · · ·
Propositional Logic

Definition
Let p be a proposition. The negation of p, denoted
by ¬p (also 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
Find the negation of the proposition ”Michael’s PC
runs on Linux” and express this in simple English.
Example
Find the negation of the proposition ”Michael’s PC
runs on Linux” and express this in simple English.

Solution
The negation is

”It is not the case that Michael’s PC runs on Linux”.


Example
Find the negation of the proposition ”Michael’s PC
runs on Linux” and express this in simple English.

Solution
The negation is

”It is not the case that Michael’s PC runs on Linux”.

This negation can be more simply expressed as

”Michael’s PC does not run on Linux”.


Propositional Logic
Example
Find the negation of the proposition ”Vandana’s smartphone has at
least 32GB memory” and express this in simple English.
Propositional Logic
Example
Find the negation of the proposition ”Vandana’s smartphone has at
least 32GB memory” and express this in simple English.

Solution
The negation is

”It is not the case that Vandana’s smartphone has at least 32GB of
memory”.
Propositional Logic
Example
Find the negation of the proposition ”Vandana’s smartphone has at
least 32GB memory” and express this in simple English.

Solution
The negation is

”It is not the case that Vandana’s smartphone has at least 32GB of
memory”.

This negation can be more simply expressed as

”Vandana’s smartphone does not have at least 32GB of memory”.


Logical Operators(Connectives)
• Negation (NOT, ¬)
Logical Operators(Connectives)
• Negation (NOT, ¬)
• Conjunction (AND, ∧)
Logical Operators(Connectives)
• Negation (NOT, ¬)
• Conjunction (AND, ∧)
• Disjunction (OR, ∨)
Logical Operators(Connectives)
• Negation (NOT, ¬)
• Conjunction (AND, ∧)
• Disjunction (OR, ∨)
• Exclusive-or (XOR, ⊕)
Logical Operators(Connectives)
• Negation (NOT, ¬)
• Conjunction (AND, ∧)
• Disjunction (OR, ∨)
• Exclusive-or (XOR, ⊕)
• Implication (If- then, →)
Logical Operators(Connectives)
• Negation (NOT, ¬)
• Conjunction (AND, ∧)
• Disjunction (OR, ∨)
• Exclusive-or (XOR, ⊕)
• Implication (If- then, →)
• Biconditional (If and only if- then, ↔)
Logical Operators(Connectives)
• Negation (NOT, ¬)
• Conjunction (AND, ∧)
• Disjunction (OR, ∨)
• Exclusive-or (XOR, ⊕)
• Implication (If- then, →)
• Biconditional (If and only if- then, ↔)
Logical Operators(Connectives)
• Negation (NOT, ¬)
• Conjunction (AND, ∧)
• Disjunction (OR, ∨)
• Exclusive-or (XOR, ⊕)
• Implication (If- then, →)
• Biconditional (If and only if- then, ↔)
Truth tables can be used to show how these
operators can combine propositions to compound
propositions.
Negation (NOT)

Unary Operator, Symbol: ¬

P ¬P
true (T) false (F)

false (F) true (T)


Table 1: Truth Table for the Negation Operator
Conjunction (AND)

Binary Operator, Symbol: ∧

P Q P∧Q
T T T
T F F
F T F
F F F
Table 2: Truth Table for the Conjunction Operator
Disjunction (OR)

Binary Operator, Symbol: ∨

P Q P∨Q
T T T
T F T
F T T
F F F
Table 3: Truth Table for the Disjunction Operator
Exclusive-OR (XOR)

Binary Operator, Symbol: ⊕

P Q P⊕Q
T T F
T F T
F T T
F F F
Table 4: Truth Table for the Exclusive-OR Operator
Implication (If- then)

Binary Operator, Symbol: →

P Q P→Q
T T T
T F F
F T T
F F T
Table 5: Truth Table for the Implication Operator
Biconditional (If and only if)

Binary Operator, Symbol: ↔

P Q P↔Q
T T T
T F F
F T F
F F T
Table 6: Truth Table for the Biconditional Operator
Statement and Operators

Statements and operators can be combined in any


way to form new statements

P Q ¬P ¬Q (¬P) ∨ (¬Q)
T T F F F
T F F T T
F T T F T
F F T T T
Table 7: Truth Table for Statements and Operators
Statement and Operations

Statements and operations can be combined in


any way to form new statements

P Q P∧Q ¬(P ∧ Q) (¬P) ∨ (¬Q)


T T T F F
T F F T T
F T F T T
F F F T T
Table 8: Truth Table for Statements and Operations
Precedence of Logical Operators

Operator Precedence
¬ 1
∧ 2
∨ 3
→ 4
↔ 5

Table 9: Precedence of Logical Operators


Equivalent Statement
P Q ¬(P ∧ Q) (¬P) ∨ (¬Q) ¬(P ∧ Q) ↔ (¬P) ∨ (¬Q)
T T F F T
T F T T T
F T T T T
F F T T T
Table 10: Truth Table for Statements and Operations
Equivalent Statement
P Q ¬(P ∧ Q) (¬P) ∨ (¬Q) ¬(P ∧ Q) ↔ (¬P) ∨ (¬Q)
T T F F T
T F T T T
F T T T T
F F T T T
Table 10: Truth Table for Statements and Operations

The statements ¬(P ∧ Q) and (¬P) ∨ (¬Q) are logically


equivalent since they have the same truth truth table, or
put it another way, ¬(P ∧ Q) ↔ (¬P) ∨ (¬Q) is always true.
Tautologies and Contradictions
A tautology is a statement that is always true.
Example
R ∨ (¬R)
¬(P ∧ Q) ↔ (¬P) ∨ (¬Q)
Tautologies and Contradictions
A tautology is a statement that is always true.
Example
R ∨ (¬R)
¬(P ∧ Q) ↔ (¬P) ∨ (¬Q)
A contradiction is a statement that is always false
Tautologies and Contradictions
A tautology is a statement that is always true.
Example
R ∨ (¬R)
¬(P ∧ Q) ↔ (¬P) ∨ (¬Q)
A contradiction is a statement that is always false
Example
R ∧ (¬R)
The negation of any tautology is a contradiction, and the
negation of any contradiction is a tautology.
Equivalence
Definition
Two propositional statements S1 and S2 are said to be (logi-
cally) equivalent, denoted S1 ≡ S2 if.
• They have the same truth table, or
Equivalence
Definition
Two propositional statements S1 and S2 are said to be (logi-
cally) equivalent, denoted S1 ≡ S2 if.
• They have the same truth table, or
• S1 ↔ S2 is a tautology
Equivalence
Definition
Two propositional statements S1 and S2 are said to be (logi-
cally) equivalent, denoted S1 ≡ S2 if.
• They have the same truth table, or
• S1 ↔ S2 is a tautology
Equivalence
Definition
Two propositional statements S1 and S2 are said to be (logi-
cally) equivalent, denoted S1 ≡ S2 if.
• They have the same truth table, or
• S1 ↔ S2 is a tautology
Equivalence can be established by
• Constructing truth tables
Equivalence
Definition
Two propositional statements S1 and S2 are said to be (logi-
cally) equivalent, denoted S1 ≡ S2 if.
• They have the same truth table, or
• S1 ↔ S2 is a tautology
Equivalence can be established by
• Constructing truth tables
• Using equivalence laws.
Logical Equivalences
Equivalences Name
p∧T≡p Identity laws
p∨F≡p
p∨T≡T Domination laws
p∧F≡F
p∨p≡p Idempotent laws
p∧p≡p
¬(¬p) ≡ p Double negation laws
p∨q≡q∨p Commutative laws
p∧q≡q∧p
Equivalences Name
(p ∨ q) ∨ r ≡ p ∨ (q ∨ r ) Associative laws
(p ∧ q) ∧ r ≡ p ∧ (q ∧ r )
p ∨ (q ∧ r ) ≡ (p ∨ q) ∧ (p ∨ r ) Distributive laws
p ∧ (q ∨ r ) ≡ (p ∧ q) ∨ (p ∧ r )
¬(p ∧ q) ≡ ¬p ∨ ¬q De Morgan’s laws
¬(p ∨ q) ≡ ¬p ∧ ¬q
p ∨ (p ∧ q) ≡ p Absorption laws
p ∧ (p ∨ q) ≡ p
p ∨ ¬p ≡ T Negation laws
p ∧ ¬p ≡ F

Table 11: Logical Equivalences


Propositional Functions and Predicates
• Propositional function are statement involving one or
more variables.
Propositional Functions and Predicates
• Propositional function are statement involving one or
more variables.
• eg : x −3>5
Propositional Functions and Predicates
• Propositional function are statement involving one or
more variables.
• eg : x −3>5
• Let us call this propositional function P(x ),
Propositional Functions and Predicates
• Propositional function are statement involving one or
more variables.
• eg : x −3>5
• Let us call this propositional function P(x ),
• Where P is the predicate and x, the variable.
Propositional Functions and Predicates
• Propositional function are statement involving one or
more variables.
• eg : x −3>5
• Let us call this propositional function P(x ),
• Where P is the predicate and x, the variable.
• What is the truth value of P(2)?
Propositional Functions and Predicates
• Propositional function are statement involving one or
more variables.
• eg : x −3>5
• Let us call this propositional function P(x ),
• Where P is the predicate and x, the variable.
• What is the truth value of P(2)?
Propositional Functions and Predicates
• Propositional function are statement involving one or
more variables.
• eg : x −3>5
• Let us call this propositional function P(x ),
• Where P is the predicate and x, the variable.
• What is the truth value of P(2)? false
• What is the truth value of P(9)?
Propositional Functions and Predicates
• Propositional function are statement involving one or
more variables.
• eg : x −3>5
• Let us call this propositional function P(x ),
• Where P is the predicate and x, the variable.
• What is the truth value of P(2)? false
• What is the truth value of P(9)?
Propositional Functions and Predicates
• Propositional function are statement involving one or
more variables.
• eg : x −3>5
• Let us call this propositional function P(x ),
• Where P is the predicate and x, the variable.
• What is the truth value of P(2)? false
• What is the truth value of P(9)? true
• When a variable is a given value, it is said to be
instantiated.
Propositional Functions and Predicates
• Propositional function are statement involving one or
more variables.
• eg : x −3>5
• Let us call this propositional function P(x ),
• Where P is the predicate and x, the variable.
• What is the truth value of P(2)? false
• What is the truth value of P(9)? true
• When a variable is a given value, it is said to be
instantiated.
• Truth value depends on value of variable.
Propositional Functions
Consider the propositional function Q(x , y , z) defined as:

x+y =z

• here, Q is the predicate and x , y , and z are the variables.


Propositional Functions
Consider the propositional function Q(x , y , z) defined as:

x+y =z

• here, Q is the predicate and x , y , and z are the variables.


• What are the truth value of Q(2, 3, 5?)
Propositional Functions
Consider the propositional function Q(x , y , z) defined as:

x+y =z

• here, Q is the predicate and x , y , and z are the variables.


• What are the truth value of Q(2, 3, 5?)
Propositional Functions
Consider the propositional function Q(x , y , z) defined as:

x+y =z

• here, Q is the predicate and x , y , and z are the variables.


• What are the truth value of Q(2, 3, 5?) true
• What are the truth value of Q(0, 1, 2)?
Propositional Functions
Consider the propositional function Q(x , y , z) defined as:

x+y =z

• here, Q is the predicate and x , y , and z are the variables.


• What are the truth value of Q(2, 3, 5?) true
• What are the truth value of Q(0, 1, 2)?
Propositional Functions
Consider the propositional function Q(x , y , z) defined as:

x+y =z

• here, Q is the predicate and x , y , and z are the variables.


• What are the truth value of Q(2, 3, 5?) true
• What are the truth value of Q(0, 1, 2)? false
• What are the truth value of Q(9, −9, 0)?
Propositional Functions
Consider the propositional function Q(x , y , z) defined as:

x+y =z

• here, Q is the predicate and x , y , and z are the variables.


• What are the truth value of Q(2, 3, 5?) true
• What are the truth value of Q(0, 1, 2)? false
• What are the truth value of Q(9, −9, 0)?
Propositional Functions
Consider the propositional function Q(x , y , z) defined as:

x+y =z

• here, Q is the predicate and x , y , and z are the variables.


• What are the truth value of Q(2, 3, 5?) true
• What are the truth value of Q(0, 1, 2)? false
• What are the truth value of Q(9, −9, 0)? true
• A propositional function (predicate) becomes a
proposition when all its variables are instantiated.
Propositional Functions
Other examples of propositional functions.
Person(x), which is true if x is a person
• Person(Socrates) = T
Propositional Functions
Other examples of propositional functions.
Person(x), which is true if x is a person
• Person(Socrates) = T
• Person(dolly-the-sheep) = F
Propositional Functions
Other examples of propositional functions.
Person(x), which is true if x is a person
• Person(Socrates) = T
• Person(dolly-the-sheep) = F
Propositional Functions
Other examples of propositional functions.
Person(x), which is true if x is a person
• Person(Socrates) = T
• Person(dolly-the-sheep) = F
CSCourse(x), which is true if x is a computer science
course
• CSCourse(CMSC201) = T
Propositional Functions
Other examples of propositional functions.
Person(x), which is true if x is a person
• Person(Socrates) = T
• Person(dolly-the-sheep) = F
CSCourse(x), which is true if x is a computer science
course
• CSCourse(CMSC201) = T
• CSCourse(MATH155) = F
Universal Quantification
Let P(x ) be a predicate (propositional function)
Universally quantified sentence:
• For all x in the universe of discourse P(x ) is true
Universal Quantification
Let P(x ) be a predicate (propositional function)
Universally quantified sentence:
• For all x in the universe of discourse P(x ) is true
• Using the universal quantifier ∀:
Universal Quantification
Let P(x ) be a predicate (propositional function)
Universally quantified sentence:
• For all x in the universe of discourse P(x ) is true
• Using the universal quantifier ∀:
• ∀ x P (x ) ”for all x P(x)” or ”for every x P(x)”
Universal Quantification
Let P(x ) be a predicate (propositional function)
Universally quantified sentence:
• For all x in the universe of discourse P(x ) is true
• Using the universal quantifier ∀:
• ∀ x P (x ) ”for all x P(x)” or ”for every x P(x)”
Universal Quantification
Let P(x ) be a predicate (propositional function)
Universally quantified sentence:
• For all x in the universe of discourse P(x ) is true
• Using the universal quantifier ∀:
• ∀ x P (x ) ”for all x P(x)” or ”for every x P(x)”

Note: ∀ x P(x) is either true or false, so it is proposition, not


a propositional function.
Universal Quantification
Example
Let the universe of discourse be all people.
• S(x ): x is a KNUST student.
Universal Quantification
Example
Let the universe of discourse be all people.
• S(x ): x is a KNUST student.
• G(x ): x is a genius.
Universal Quantification
Example
Let the universe of discourse be all people.
• S(x ): x is a KNUST student.
• G(x ): x is a genius.
Universal Quantification
Example
Let the universe of discourse be all people.
• S(x ): x is a KNUST student.
• G(x ): x is a genius.
What does ∀ x (S(x ) → G(x )) mean?
Solution
”If x is a KNUST student, then x is genius,” or ”All KNUST student are
geniuses.”
If the universe of discourse is all KNUST students, then the same
statement can be written as ”∀ x G(x )”
Existential Quantification
Existentially quantified sentence:
There exist an x in the universe of discourse for which P(x ) is
true.
Existential Quantification
Existentially quantified sentence:
There exist an x in the universe of discourse for which P(x ) is
true.Using the existential quantifier ∃:
• ∃ xP(x ) ”There is an x such that P(x ).” or
Existential Quantification
Existentially quantified sentence:
There exist an x in the universe of discourse for which P(x ) is
true.Using the existential quantifier ∃:
• ∃ xP(x ) ”There is an x such that P(x ).” or
• ”There is at least one x such that P(x ).”
Existential Quantification
Existentially quantified sentence:
There exist an x in the universe of discourse for which P(x ) is
true.Using the existential quantifier ∃:
• ∃ xP(x ) ”There is an x such that P(x ).” or
• ”There is at least one x such that P(x ).”
Existential Quantification
Existentially quantified sentence:
There exist an x in the universe of discourse for which P(x ) is
true.Using the existential quantifier ∃:
• ∃ xP(x ) ”There is an x such that P(x ).” or
• ”There is at least one x such that P(x ).”
Note: ∃ xP(x) is either true or false, so it is proposition, not
a propositional function.
Existential Quantification
Example
• P(x ): x is a KNUST professor.
Existential Quantification
Example
• P(x ): x is a KNUST professor.
• G(x ): x is a genius.
Existential Quantification
Example
• P(x ): x is a KNUST professor.
• G(x ): x is a genius.
Existential Quantification
Example
• P(x ): x is a KNUST professor.
• G(x ): x is a genius.

What does ∃ x (P(x ) ∧ G(x )) mean?


Solution
”There is an x such that x is a KNUST professor and x is a genius.” or
At least one KNUST professor is a genius.
Quantification
Another example
Example
Let the universe of discourse be the real KNUST’ers.
What does ∀ x ∃ y (x + y = 320) mean ?
Quantification
Another example
Example
Let the universe of discourse be the real KNUST’ers.
What does ∀ x ∃ y (x + y = 320) mean ?

Solution
”For every ”x” there exists a ”y” so that ”x + y = 320”
Is it true?
Quantification
Another example
Example
Let the universe of discourse be the real KNUST’ers.
What does ∀ x ∃ y (x + y = 320) mean ?

Solution
”For every ”x” there exists a ”y” so that ”x + y = 320”
Is it true? yes
Is it true for the natural KNUST’ers?
Quantification
Another example
Example
Let the universe of discourse be the real KNUST’ers.
What does ∀ x ∃ y (x + y = 320) mean ?

Solution
”For every ”x” there exists a ”y” so that ”x + y = 320”
Is it true? yes
Is it true for the natural KNUST’ers? no
Disproof by Counterexample
A counterexample to ∀ x P(x ) is an object c so that P(c) is
false.

Statements such that ∀ x (P(x ) → Q(x )) can be disproved by


simply providing a counterexample.

• Statement: ”All birds can fly”


Disproof by Counterexample
A counterexample to ∀ x P(x ) is an object c so that P(c) is
false.

Statements such that ∀ x (P(x ) → Q(x )) can be disproved by


simply providing a counterexample.

• Statement: ”All birds can fly”


• Disproved by counterexample: ”Penguin”
Negation

• ¬(∀ x P(x )) is logically equivalent to ∃ x (¬P(x )).


Negation

• ¬(∀ x P(x )) is logically equivalent to ∃ x (¬P(x )).


• ¬(∃ x P(x )) is logically equivalent to ∀ x (¬P(x )).
Negation

• ¬(∀ x P(x )) is logically equivalent to ∃ x (¬P(x )).


• ¬(∃ x P(x )) is logically equivalent to ∀ x (¬P(x )).
Negation

• ¬(∀ x P(x )) is logically equivalent to ∃ x (¬P(x )).


• ¬(∃ x P(x )) is logically equivalent to ∀ x (¬P(x )).

This is de Morgan’s law for quantifiers


Negation
Example
Not all roses are red

Solution
¬∀ x (Rose(x ) → Red(x ))
Negation
Example
Not all roses are red

Solution
¬∀ x (Rose(x ) → Red(x ))
∃ x (Rose(x ) ∧ ¬Red(x ))
Nobody is perfect
Solution
¬∃ x (Person(x ) ∧ Perfect (x ))
Negation
Example
Not all roses are red

Solution
¬∀ x (Rose(x ) → Red(x ))
∃ x (Rose(x ) ∧ ¬Red(x ))
Nobody is perfect
Solution
¬∃ x (Person(x ) ∧ Perfect (x ))
∀ x (Person(x ) → ¬Perfect (x ))
Nested Quantifier
A predicate can have more than one variable.
• S(x , y , z) : z is the sum of x and y.
Nested Quantifier
A predicate can have more than one variable.
• S(x , y , z) : z is the sum of x and y.
• F (x , y ) : x and y are friends.
Nested Quantifier
A predicate can have more than one variable.
• S(x , y , z) : z is the sum of x and y.
• F (x , y ) : x and y are friends.
Nested Quantifier
A predicate can have more than one variable.
• S(x , y , z) : z is the sum of x and y.
• F (x , y ) : x and y are friends.

We can quantify individual variables in different ways.


• ∀ x , y , z (S(x , y , z) → (x ≤ z ∧ y ≤ z)).
Nested Quantifier
A predicate can have more than one variable.
• S(x , y , z) : z is the sum of x and y.
• F (x , y ) : x and y are friends.

We can quantify individual variables in different ways.


• ∀ x , y , z (S(x , y , z) → (x ≤ z ∧ y ≤ z)).
• ∃ x ∀ y ∀ z F (x , y ) ∧ F (x , z) ∧ (y ! = z) → ¬F (y , z)
Mathematical Reasoning
We need mathematical reasoning to
• determine whether or not a mathematical argument is
correct
Mathematical Reasoning
We need mathematical reasoning to
• determine whether or not a mathematical argument is
correct
• construct mathematical arguments.
Mathematical Reasoning
We need mathematical reasoning to
• determine whether or not a mathematical argument is
correct
• construct mathematical arguments.
Mathematical Reasoning
We need mathematical reasoning to
• determine whether or not a mathematical argument is
correct
• construct mathematical arguments.
Mathematical reasoning is not only important for
conducting proofs and program verification, but also for
artificial intelligence systems(drawing logical inferences
from knowledge and facts.
We focus on deductive proofs.
Terminology
An axiom is a basic assumption about mathematical
structure that needs no proof.
• Things known to be true (facts or proven theorems)
Terminology
An axiom is a basic assumption about mathematical
structure that needs no proof.
• Things known to be true (facts or proven theorems)
• Things believed to be true but cannot be proved
Terminology
An axiom is a basic assumption about mathematical
structure that needs no proof.
• Things known to be true (facts or proven theorems)
• Things believed to be true but cannot be proved
Terminology
An axiom is a basic assumption about mathematical
structure that needs no proof.
• Things known to be true (facts or proven theorems)
• Things believed to be true but cannot be proved
We can use a proof to demonstrate that a particular
statement is true. A proof consists of a sequence of
statements that form an argument.
Terminology
An axiom is a basic assumption about mathematical
structure that needs no proof.
• Things known to be true (facts or proven theorems)
• Things believed to be true but cannot be proved
We can use a proof to demonstrate that a particular
statement is true. A proof consists of a sequence of
statements that form an argument.
The steps that connect the statement in such a sequence
are the rules of inferences.
Terminology
An axiom is a basic assumption about mathematical
structure that needs no proof.
• Things known to be true (facts or proven theorems)
• Things believed to be true but cannot be proved
We can use a proof to demonstrate that a particular
statement is true. A proof consists of a sequence of
statements that form an argument.
The steps that connect the statement in such a sequence
are the rules of inferences.
Cases of incorrect reasoning are called fallacies
Terminology
• A theorem is a statement that can be shown to be true.
Terminology
• A theorem is a statement that can be shown to be true.

• A lemma is a simple theorem used as an intermediate


result in the proof of another theorem
Terminology
• A theorem is a statement that can be shown to be true.

• A lemma is a simple theorem used as an intermediate


result in the proof of another theorem

• A corollary is a proposition that follows directly from a


theorem that has been proved
Terminology
• A theorem is a statement that can be shown to be true.

• A lemma is a simple theorem used as an intermediate


result in the proof of another theorem

• A corollary is a proposition that follows directly from a


theorem that has been proved

• A conjecture is a statement whose truth value is


unknown. Once is proven, it becomes a theorem
Proofs
A theorem often has two parts
• Conditions (premises, hypothesis).
Proofs
A theorem often has two parts
• Conditions (premises, hypothesis).
• Conclusion
Proofs
A theorem often has two parts
• Conditions (premises, hypothesis).
• Conclusion
Proofs
A theorem often has two parts
• Conditions (premises, hypothesis).
• Conclusion
A correct (deductive) proof is to establish that
• If the conditions are true then the conclusion is true
Proofs
A theorem often has two parts
• Conditions (premises, hypothesis).
• Conclusion
A correct (deductive) proof is to establish that
• If the conditions are true then the conclusion is true
• i.e Conditions → conclusion is a tautology
Proofs
A theorem often has two parts
• Conditions (premises, hypothesis).
• Conclusion
A correct (deductive) proof is to establish that
• If the conditions are true then the conclusion is true
• i.e Conditions → conclusion is a tautology
Proofs
A theorem often has two parts
• Conditions (premises, hypothesis).
• Conclusion
A correct (deductive) proof is to establish that
• If the conditions are true then the conclusion is true
• i.e Conditions → conclusion is a tautology
Proofs
A theorem often has two parts
• Conditions (premises, hypothesis).
• Conclusion
A correct (deductive) proof is to establish that
• If the conditions are true then the conclusion is true
• i.e Conditions → conclusion is a tautology
Often there are missing pieces between conditions and
conclusion. Fill it by an argument
• Using conditions and axioms
Proofs
A theorem often has two parts
• Conditions (premises, hypothesis).
• Conclusion
A correct (deductive) proof is to establish that
• If the conditions are true then the conclusion is true
• i.e Conditions → conclusion is a tautology
Often there are missing pieces between conditions and
conclusion. Fill it by an argument
• Using conditions and axioms
• Statements in the argument connected by proper rules of
inference.
Rules of Inference
• Rules of Inference provide the justification of the steps
used in a proof
Rules of Inference
• Rules of Inference provide the justification of the steps
used in a proof
• One important rule is called modus ponens or the law of
detachment. It is based on the tautaulogy:
Rules of Inference
• Rules of Inference provide the justification of the steps
used in a proof
• One important rule is called modus ponens or the law of
detachment. It is based on the tautaulogy:
• (p ∧ (p → q)) → q. We write it in the following way
Rules of Inference
• Rules of Inference provide the justification of the steps
used in a proof
• One important rule is called modus ponens or the law of
detachment. It is based on the tautaulogy:
• (p ∧ (p → q)) → q. We write it in the following way
p
• p→q
∴q
Rules of Inference
• Rules of Inference provide the justification of the steps
used in a proof
• One important rule is called modus ponens or the law of
detachment. It is based on the tautaulogy:
• (p ∧ (p → q)) → q. We write it in the following way
p
• p→q
∴q
• The two hypothesis p, p → q are written in a column, and
the conclusion below a bar, where ∴ means ”therefore”.
Rules of Inference
p1 The rule states that if p1 and p2 and · · · and pn
p2 are all true, then q is true as well
p3 Each rule is an established tautology of
..
. p1 ∧ p2 ∧ p3 · · · ∧ pn → q
pn These rules of inference can be used in any
∴q mathematics argument and do not require proof
Rules of Inference
¬q
p
Addition p→q Modus tollens
∴p∨q
∴ ¬p
p→q
p∧q
Simplification q→r Hypothetical syllogism
∴q
∴p→r
p p∨q
q Conjunction ¬p Disjunctive syllogism
∴p∧q ∴q
Arguments
Just like a rule of inference, an argument consists of one or
more hypothesis or premises) and a conclusion.
Arguments
Just like a rule of inference, an argument consists of one or
more hypothesis or premises) and a conclusion.

We say that an argument is valid, if whenever all its


hypotheses are true, its conclusion is also true.
Arguments
Just like a rule of inference, an argument consists of one or
more hypothesis or premises) and a conclusion.

We say that an argument is valid, if whenever all its


hypotheses are true, its conclusion is also true.

However, if any hypothesis is false, even a valid argument


can lead to an incorrect conclusion.
Arguments
Just like a rule of inference, an argument consists of one or
more hypothesis or premises) and a conclusion.

We say that an argument is valid, if whenever all its


hypotheses are true, its conclusion is also true.

However, if any hypothesis is false, even a valid argument


can lead to an incorrect conclusion.

Proof: show that hypothesis → conclusion is true using rules


of inference.
Arguments
Example
”if 101 is divisible by 3, then 1012 is divisible by 9. 101 is divisible by 3.
Consequently 1012 is divisible by 9
Arguments
Example
”if 101 is divisible by 3, then 1012 is divisible by 9. 101 is divisible by 3.
Consequently 1012 is divisible by 9

Although the argument valid, its conclusion is incorrect. because


one of the hypothesis is false (”101 is divisible by 3”)
Arguments
Example
”if 101 is divisible by 3, then 1012 is divisible by 9. 101 is divisible by 3.
Consequently 1012 is divisible by 9

Although the argument valid, its conclusion is incorrect. because


one of the hypothesis is false (”101 is divisible by 3”)

If in the above argument we replace 101 with 102, we could


correctly conclude that 1022 is divisible by 9
Arguments
Which rule of inference was used in the last argument?

• p : "101 is divisible by 3.”


Arguments
Which rule of inference was used in the last argument?

• p : "101 is divisible by 3.”


• q : "1012 is divisible by 9.”
Arguments
Which rule of inference was used in the last argument?

• p : "101 is divisible by 3.”


• q : "1012 is divisible by 9.”
p
• p→q Modus
∴q Ponens
Arguments
Which rule of inference was used in the last argument?

• p : "101 is divisible by 3.”


• q : "1012 is divisible by 9.”
p
• p→q Modus
∴q Ponens
Arguments
Which rule of inference was used in the last argument?

• p : "101 is divisible by 3.”


• q : "1012 is divisible by 9.”
p
• p→q Modus
∴q Ponens

Unfortunately, one of the hypothesis (p) is false.


Therefore, the conclusion q is incorrect.
Arguments
Example
”If it rains today, then we will not have kenkey today. If we do not
have kenkey today, then we will have kenkey tomorrow.
Arguments
Example
”If it rains today, then we will not have kenkey today. If we do not
have kenkey today, then we will have kenkey tomorrow.

Therefore, if it rains today, then we will have kenkey tomorrow”


Arguments
Example
”If it rains today, then we will not have kenkey today. If we do not
have kenkey today, then we will have kenkey tomorrow.

Therefore, if it rains today, then we will have kenkey tomorrow”

This is a valid argument: If its hypothesis are true, then its


conclusion is also true.
Arguments
Let us formalize the previous argument:
• p: ”It is raining today”
Arguments
Let us formalize the previous argument:
• p: ”It is raining today”
• q: ”We will not have kenkey today”
Arguments
Let us formalize the previous argument:
• p: ”It is raining today”
• q: ”We will not have kenkey today”
• r: ”We will have kenkey tomorrow”
Arguments
Let us formalize the previous argument:
• p: ”It is raining today”
• q: ”We will not have kenkey today”
• r: ”We will have kenkey tomorrow”
Arguments
Let us formalize the previous argument:
• p: ”It is raining today”
• q: ”We will not have kenkey today”
• r: ”We will have kenkey tomorrow”
So the argument is of the following form:

p→q
q→r Hypothetical syllogism
∴p→r
Arguments
Example
• Kofi is either intelligent or a good actor.
Arguments
Example
• Kofi is either intelligent or a good actor.
• If Kofi is intelligent, then he can count from 1 to 10.
Arguments
Example
• Kofi is either intelligent or a good actor.
• If Kofi is intelligent, then he can count from 1 to 10.
• Kofi can count from 1 to 3.
Arguments
Example
• Kofi is either intelligent or a good actor.
• If Kofi is intelligent, then he can count from 1 to 10.
• Kofi can count from 1 to 3.
• Therefore, Kofi is a good actor.
Arguments
Example
• Kofi is either intelligent or a good actor.
• If Kofi is intelligent, then he can count from 1 to 10.
• Kofi can count from 1 to 3.
• Therefore, Kofi is a good actor.
Arguments
Example
• Kofi is either intelligent or a good actor.
• If Kofi is intelligent, then he can count from 1 to 10.
• Kofi can count from 1 to 3.
• Therefore, Kofi is a good actor.

Formalize this argument with the appropriate rules of


inference.
Solution
a: ”Kofi is intelligent.”
b: ”Kofi is a good actor.”
c: ”Kofi can only count from 1 to 10.
• Step 1: ¬c Hypothesis
Solution
a: ”Kofi is intelligent.”
b: ”Kofi is a good actor.”
c: ”Kofi can only count from 1 to 10.
• Step 1: ¬c Hypothesis
• Step 2: a → c Hypothesis.
Solution
a: ”Kofi is intelligent.”
b: ”Kofi is a good actor.”
c: ”Kofi can only count from 1 to 10.
• Step 1: ¬c Hypothesis
• Step 2: a → c Hypothesis.
• Step 3: ¬a Modus tollens of steps 1 & 2
Solution
a: ”Kofi is intelligent.”
b: ”Kofi is a good actor.”
c: ”Kofi can only count from 1 to 10.
• Step 1: ¬c Hypothesis
• Step 2: a → c Hypothesis.
• Step 3: ¬a Modus tollens of steps 1 & 2
• Step 4: b ∨ a Hypothesis
Solution
a: ”Kofi is intelligent.”
b: ”Kofi is a good actor.”
c: ”Kofi can only count from 1 to 10.
• Step 1: ¬c Hypothesis
• Step 2: a → c Hypothesis.
• Step 3: ¬a Modus tollens of steps 1 & 2
• Step 4: b ∨ a Hypothesis
• Step 5: b Disjunctive Syllogism of Steps 3 & 4
Solution
a: ”Kofi is intelligent.”
b: ”Kofi is a good actor.”
c: ”Kofi can only count from 1 to 10.
• Step 1: ¬c Hypothesis
• Step 2: a → c Hypothesis.
• Step 3: ¬a Modus tollens of steps 1 & 2
• Step 4: b ∨ a Hypothesis
• Step 5: b Disjunctive Syllogism of Steps 3 & 4
Solution
a: ”Kofi is intelligent.”
b: ”Kofi is a good actor.”
c: ”Kofi can only count from 1 to 10.
• Step 1: ¬c Hypothesis
• Step 2: a → c Hypothesis.
• Step 3: ¬a Modus tollens of steps 1 & 2
• Step 4: b ∨ a Hypothesis
• Step 5: b Disjunctive Syllogism of Steps 3 & 4

Conclusion: b (”Kofi is a good actor”)


Arguments
Example
• If you listen to me, you will pass COE251.
Arguments
Example
• If you listen to me, you will pass COE251.
• You passed COE251.
Arguments
Example
• If you listen to me, you will pass COE251.
• You passed COE251.
• Therefore, you have lisetened to me.
Arguments
Example
• If you listen to me, you will pass COE251.
• You passed COE251.
• Therefore, you have lisetened to me.
Arguments
Example
• If you listen to me, you will pass COE251.
• You passed COE251.
• Therefore, you have lisetened to me.

Is this argument valid?


Solution
No, it assumes ((p → q) ∧ q) → p)
This statement is not a tautology, it is false if p is false and q is true.
Rules of Inference for Quantified Statements

∀x P(x )
Universal instantiation
∴ P(c) if c ∈ U

P(c) for an arbitrary c ∈ U


Universal generalization
∴ ∀ x P(x )

∃ xP(x )
Existential instantiation
∴ P(c) for some element c ∈ U

P(c) for some element c ∈ U


Existential generalization
∴ ∃ x P(x )
Rules of Inference for Quantified
Statements
Example
Every KNUST student is a genius.
Rules of Inference for Quantified
Statements
Example
Every KNUST student is a genius.
Kwesi is a KNUST student.
Rules of Inference for Quantified
Statements
Example
Every KNUST student is a genius.
Kwesi is a KNUST student.
Therefore, Kwesi is a genius.
Rules of Inference for Quantified
Statements
Example
Every KNUST student is a genius.
Kwesi is a KNUST student.
Therefore, Kwesi is a genius.

U(x ) : "x is a KNUST student”.


Rules of Inference for Quantified
Statements
Example
Every KNUST student is a genius.
Kwesi is a KNUST student.
Therefore, Kwesi is a genius.

U(x ) : "x is a KNUST student”.


G(x ) : "x is a genius”.
Rules of Inference for Quantified
Statements
Example
Every KNUST student is a genius.
Kwesi is a KNUST student.
Therefore, Kwesi is a genius.

U(x ) : "x is a KNUST student”.


G(x ) : "x is a genius”.
Rules of Inference for Quantified
Statements
The following steps are used in the argument:
• Step 1: ∀ x (U(x ) → G(x )) Hypothesis
Rules of Inference for Quantified
Statements
The following steps are used in the argument:
• Step 1: ∀ x (U(x ) → G(x )) Hypothesis
• Step 2: U(Kwesi) → G(Kwesi) Univ. instantiation using step
1
Rules of Inference for Quantified
Statements
The following steps are used in the argument:
• Step 1: ∀ x (U(x ) → G(x )) Hypothesis
• Step 2: U(Kwesi) → G(Kwesi) Univ. instantiation using step
1
• Step 3: U(Kwesi) Hypothesis
Rules of Inference for Quantified
Statements
The following steps are used in the argument:
• Step 1: ∀ x (U(x ) → G(x )) Hypothesis
• Step 2: U(Kwesi) → G(Kwesi) Univ. instantiation using step
1
• Step 3: U(Kwesi) Hypothesis
• Step 4: G(Kwesi) Modus ponens using steps 2 & 3
Rules of Inference for Quantified
Statements
The following steps are used in the argument:
• Step 1: ∀ x (U(x ) → G(x )) Hypothesis
• Step 2: U(Kwesi) → G(Kwesi) Univ. instantiation using step
1
• Step 3: U(Kwesi) Hypothesis
• Step 4: G(Kwesi) Modus ponens using steps 2 & 3
Rules of Inference for Quantified
Statements
The following steps are used in the argument:
• Step 1: ∀ x (U(x ) → G(x )) Hypothesis
• Step 2: U(Kwesi) → G(Kwesi) Univ. instantiation using step
1
• Step 3: U(Kwesi) Hypothesis
• Step 4: G(Kwesi) Modus ponens using steps 2 & 3

∀ x P(x )
Universal instantiation
∴ P(c) if c ∈ U
Proving Theorems
Direct Proof:
An implication p → q can be proved by showing that if p is
true, then q is also true.
Proving Theorems
Direct Proof:
An implication p → q can be proved by showing that if p is
true, then q is also true.

Example
Give a direct proof of the theorem ”if n is odd, then n2 is odd”
Idea: Assume that the hypothetical of this implication is
true (n is odd). Then use rules of inference and known
theorems of math to show that q must also be true (n2 is
odd)
Proving Theorems
n is odd
Then n = 2k + 1, where k is an integer
Proving Theorems
n is odd
Then n = 2k + 1, where k is an integer
Consequently:

n2 = (2k + 1)2
= 4k2 + 4k + 1
= 2(2k2 + 2k) + 1

Since n2 can be written in this form, it is odd


Proving Theorems

• Indirect Proof:
Proving Theorems

• Indirect Proof:
• An implication p → q is equivalent to its contrapositive
¬q → ¬p. Therefore we can prove p → q by showing that
whenever q is false, then p is also false.
Proving Theorems

• Indirect Proof:
• An implication p → q is equivalent to its contrapositive
¬q → ¬p. Therefore we can prove p → q by showing that
whenever q is false, then p is also false.
Proving Theorems

• Indirect Proof:
• An implication p → q is equivalent to its contrapositive
¬q → ¬p. Therefore we can prove p → q by showing that
whenever q is false, then p is also false.

Example
Give an indirect proof of the theorem ”if 3n + 2 is odd, then n is
odd
Idea: Assume that the conclusion of this implication is false
(n is even). Then use rules of inference and known theorems
to show that p must be also false (3n + 2 is even)
Proving Theorems
n is even.
Proving Theorems
n is even.
Then n = 2k, where k is an integer.
Proving Theorems
n is even.
Then n = 2k, where k is an integer.
It follows that:
3n + 2 = 3(2k) + 2
= 6k + 2
= 2(3k + 1)
Therefore, 3n + 2 is even
We have shown the contrapositive of the implication is true,
so the implication itself true also.
(If 3n + 2 is odd, then n is odd)
Proving Theorems
Indirect Proof is a special case of proof by contradiction
Suppose n is even (negation of the conclusion)
Then n = 2k, where k is an integer:
It follows that:
3n + 2 = 3(2k) + 2
= 6k + 2
= 2(3k + 1)
Therefore, 3n + 2 is even
However, this is a contradiction since 3n + 2 is given to be
odd, so the conclusion (n is odd) holds.
Proving Theorems
Example
Anyone performs well is either intelligent or a good actor.
Proving Theorems
Example
Anyone performs well is either intelligent or a good actor.

If someone is intelligent, the he/she can count from 1 to 10.


Proving Theorems
Example
Anyone performs well is either intelligent or a good actor.

If someone is intelligent, the he/she can count from 1 to 10.

• Kwame performs well.


Proving Theorems
Example
Anyone performs well is either intelligent or a good actor.

If someone is intelligent, the he/she can count from 1 to 10.

• Kwame performs well.


• Kwame can only count from 1 to 3.
Proving Theorems
Example
Anyone performs well is either intelligent or a good actor.

If someone is intelligent, the he/she can count from 1 to 10.

• Kwame performs well.


• Kwame can only count from 1 to 3.
• Therefore, not everyone is both intelligent and a good actor.
Proving Theorems
Example
Anyone performs well is either intelligent or a good actor.

If someone is intelligent, the he/she can count from 1 to 10.

• Kwame performs well.


• Kwame can only count from 1 to 3.
• Therefore, not everyone is both intelligent and a good actor.
Proving Theorems
Example
Anyone performs well is either intelligent or a good actor.

If someone is intelligent, the he/she can count from 1 to 10.

• Kwame performs well.


• Kwame can only count from 1 to 3.
• Therefore, not everyone is both intelligent and a good actor.
Show this using the appropriate rule of inference.
Solution
Hypothesis:
P(x ) : x performs well.
Q(x ) : x is intelligent
R(x ) : x is a good actor. S(x ) : x can count from 1 to 10
1. Anyone performs well is either intelligent or a good actor
∀ x (P(x → Q(x ) ∨ R(x ))
Solution
Hypothesis:
P(x ) : x performs well.
Q(x ) : x is intelligent
R(x ) : x is a good actor. S(x ) : x can count from 1 to 10
1. Anyone performs well is either intelligent or a good actor
∀ x (P(x → Q(x ) ∨ R(x ))
2. If someone is intelligent, then he/she can count from 1 to
10 ∀(Q(x ) → S(x ))
Solution
Hypothesis:
P(x ) : x performs well.
Q(x ) : x is intelligent
R(x ) : x is a good actor. S(x ) : x can count from 1 to 10
1. Anyone performs well is either intelligent or a good actor
∀ x (P(x → Q(x ) ∨ R(x ))
2. If someone is intelligent, then he/she can count from 1 to
10 ∀(Q(x ) → S(x ))
3. Kwame performs well P(G)
Solution
Hypothesis:
P(x ) : x performs well.
Q(x ) : x is intelligent
R(x ) : x is a good actor. S(x ) : x can count from 1 to 10
1. Anyone performs well is either intelligent or a good actor
∀ x (P(x → Q(x ) ∨ R(x ))
2. If someone is intelligent, then he/she can count from 1 to
10 ∀(Q(x ) → S(x ))
3. Kwame performs well P(G)
4. Kwame can only count from 1 to 3 ¬S(G)
Solution
Hypothesis:
P(x ) : x performs well.
Q(x ) : x is intelligent
R(x ) : x is a good actor. S(x ) : x can count from 1 to 10
1. Anyone performs well is either intelligent or a good actor
∀ x (P(x → Q(x ) ∨ R(x ))
2. If someone is intelligent, then he/she can count from 1 to
10 ∀(Q(x ) → S(x ))
3. Kwame performs well P(G)
4. Kwame can only count from 1 to 3 ¬S(G)
Solution
Hypothesis:
P(x ) : x performs well.
Q(x ) : x is intelligent
R(x ) : x is a good actor. S(x ) : x can count from 1 to 10
1. Anyone performs well is either intelligent or a good actor
∀ x (P(x → Q(x ) ∨ R(x ))
2. If someone is intelligent, then he/she can count from 1 to
10 ∀(Q(x ) → S(x ))
3. Kwame performs well P(G)
4. Kwame can only count from 1 to 3 ¬S(G)
Conclusion: not everyone is both intelligent and a good
actor

You might also like