Sei sulla pagina 1di 34

Mathematical Logic

Dr. Tarkeshwar Singh


Department of Mathematics
September 8, 2020
Quantifiers
Methods of Proof

Outline

Quantifiers
Arguments
Method of Proofs.

Dr. Tarkeshwar Singh Mathematical Logic


Quantifiers
Methods of Proof

Quantifiers

Consider the following sentences:


All people are mortal.
Every computer is a 16-bit machine.
No birds are black.
Some people have blue eyes.
There exists an even prime number.
Each proposition contains a word indicating quantity such as all,
every, none, some, and one. Such words, called quantifiers, give
us an idea about how many objects have a certain property.

Dr. Tarkeshwar Singh Mathematical Logic


Quantifiers
Methods of Proof

Quantifiers

There are two types of quantifiers:


1 Universal quantifier: for all, for each, or for every and is
denoted by ∀.
2 Existential quantifier: for some, there exists a, or for at least
one and is denoted by ∃.

Example
Rewrite the following propositions symbolically:
For all integers x and y , x.y = y .x.
There are integers x and y such that x + y = 5.
Square of any real number is non-negative.

Dr. Tarkeshwar Singh Mathematical Logic


Quantifiers
Methods of Proof

Quantifiers

In above example, P(x) and Q(x, y ) is called a predicate,


states the property the object x and y have.
Since P(x) involves just one variable, it is a unary predicate.
Q(x, y ) is called binary predicate.
The set of all values x and y can have is called the universe of
discourse (UD).
Note that P(x) is not a proposition, but just an expression.
The truth value of P(x) or Q(x, y ) is predicated on the values
assigned to x, y from the UD.
The variable x, y can be treated as free variable or bounded
variable.

Dr. Tarkeshwar Singh Mathematical Logic


Quantifiers
Methods of Proof

Quantifiers

The order of the variables x and y in (∀x)(∀y ) and (∃x)(∃y )


can be changed without affecting the truth values of the
propositions.
But the order is important in (∀x)(∃y ) and (∃y )(∀x).
For example, let P(x, y ) : x < y where x and y are integers.
Then (∀x)(∃y )P(x, y ) means For every integer x, there is a
suitable integer y such that x < y ; y = x + 1 is such an
integer. Therefore, (∀x)(∃y )P(x, y ) is true.
But (∃y )(∀x)P(x, y ) means There exists an integer y , say, b,
such that (∀x)P(x, b); that is, every integer x is less than b.
Clearly, it is false.
The proposition (Ql x)(Q2 y )P(x, y ) is evaluated as
(Q1 x)[(Q2 y )P(x, y )], where Q1 and Q2 are quantifiers.

Dr. Tarkeshwar Singh Mathematical Logic


Quantifiers
Methods of Proof

Quantifiers
Example
Determine the truth value of each proposition, where
P(x, y ) : y < x 2 , where x and y are real numbers:
1. (∀x)(∀y )P(x, y ) 2. (∀y )(∃x)P(x, y ).
3.(∃x)(∃y )P(x, y ) 4. (∃x)(∀y )P(x, y ).
5.(∀x)(∃y )P(x, y ) 6. (∃y )(∀x)P(x, y ).

Dr. Tarkeshwar Singh Mathematical Logic


Quantifiers
Methods of Proof

De Morgan’s Law

∼ [(∀x)P(x)] ≡ (∃x)[∼ P(x)].


∼ [(∃x)P(x)] ≡ (∀x)[∼ P(x)].

Definition
Another useful quantifier is the uniqueness quantifier and is
denoted by ∃!. The proposition (∃!x)P(x) means that there exists
a unique (meaning exactly one) x such that P(x).

Problem: Determine the truth value of each proposition, where


UD - set of integers.
1. (∃!x)(x 2 = 1).
2. (∀x)(∃!y )(x + y = 4).

Dr. Tarkeshwar Singh Mathematical Logic


Quantifiers
Methods of Proof

Quantifiers
Example
Negate each quantified proposition:
(1) Every computer is a 16-bit machine.
(2) Some girls are blondes.
(3) All chalkboards are black.
(4) No person has green eyes.

Dr. Tarkeshwar Singh Mathematical Logic


Quantifiers
Methods of Proof

Arguments

Suppose, we are given a finite set of propositions (called


hypotheses) H1 , H2 , . . . , Hn , all assumed true. Also assume that
from these premises, we can arrive at a conclusion C through
reasoning (or argument). Such a discussion can be written in
inferential form as follows:
H1
H2
..
.
Hn
C

Dr. Tarkeshwar Singh Mathematical Logic


Quantifiers
Methods of Proof

Validity of Arguments

Definition
An argument is valid if the conjunction of the hypotheses
H1 , H2 , . . . , Hn logically implies the conclusion C : that is, the
implication H1 ∧ H2 ∧ · · · ∧ Hn → C is a tautology. Otherwise, the
argument is invalid, a fallacy.

Thus, an argument is valid if and only if the conclusion is a logical


consequence of the hypotheses. In other words, if the hypotheses
are assumed true, then the conclusion must follow logically from
them. True hypotheses always lead to a true conclusion by a valid
argument.

Dr. Tarkeshwar Singh Mathematical Logic


Quantifiers
Methods of Proof

Arguments

Example
There are two kinds of inhabitants, knights and knaves, on an
island. Knights always tell the truth, whereas knaves always lie.
Every inhabitant is either a knight or a knave. One day three
inhabitants A, B, and C were standing together in a garden. A
nomad came by and asked A, “Are you a knight or a knave?” Since
A answered rather indistinctly, the stranger could make nothing
out of his reply. So he asked B, “What did A say?” B replied, ”A
said, he is a knave.” At this point C jumped into the conversation
and said, “Don’t believe B; he is lying.” What are B and C?

Dr. Tarkeshwar Singh Mathematical Logic


Quantifiers
Methods of Proof

Solution

A knight would never say, ”I’m a knave,” since he never lies. A


knave would not say that either since he never tells the truth.
Therefore, A did not say he was a knave. So B lied to the nomad
and hence is a knave. Consequently, C was telling the truth, so C
is a knight. Thus B is a knave and C is a knight.

Dr. Tarkeshwar Singh Mathematical Logic


Quantifiers
Methods of Proof

Arguments

The symbols and the laws of logic can often be applied to check
the validity of an argument, as the next two examples illustrate.
To this end, follow the steps below:
Rewrite the hypotheses symbolically.
Assume the hypotheses are true.
If the inference rules and/or the laws of logic can be used to
reach the given conclusion, then the given argument is valid;
otherwise, it is invalid; that is, the argument contains a flaw.

Dr. Tarkeshwar Singh Mathematical Logic


Quantifiers
Methods of Proof

Rules of Inference

Conjunction Rule: (p ∧ q) → (p ∧ q)
Simplification Rule: p ∧ q → p, p ∧ q → q
Addition Rule: p → p ∨ q, q → p ∨ q
Law of Detachment: [p ∧ (p → q)] → q (or Modus ponens)
Modus Tollens: [∼ q ∧ (p → q)] →∼ p
Law of Contrapositive: [(p → q) ∧ ∼ q] →∼ p
Disjunctive Syllogism: [(p ∨ q)∧ ∼ p] → q
Hypothetical Syllogism: [(p → q) ∧ (q → r )] → (p → r )
Resolution: [(p ∨ q) ∧ (∼ p ∨ r )] → (q ∨ r )
Dilemma: [(p ∨ q) ∧ (p → r ) ∧ (q → r )] → r .

Dr. Tarkeshwar Singh Mathematical Logic


Quantifiers
Methods of Proof

Illustrations
Example
Check the validity of the following argument: If the computer was
down Saturday afternoon, then Mary went to a matinee. Either
Mary went to a matinee or took a nap Saturday afternoon. Mary
did not take a nap that afternoon. Therefore, The computer was
down Saturday afternoon.

Dr. Tarkeshwar Singh Mathematical Logic


Quantifiers
Methods of Proof

Illustrations
Example
Check the validity of the following argument: Babies are illogical.
Nobody is despised who can manage a crocodile.
Illogical persons are despised.
Therefore, Babies cannot manage crocodiles.

Dr. Tarkeshwar Singh Mathematical Logic


Quantifiers
Methods of Proof

Famous Socrates Argument


Example
All men are mortal.
Socrates is a man.
Therefore, Socrates is a mortal.

Dr. Tarkeshwar Singh Mathematical Logic


Quantifiers
Methods of Proof

Validity of Argument
Example
One student in this DM class knows JAVA.Everyone who knows
JAVA can get high paying job. Therefore, someone in this class
can get a high paying job.

Dr. Tarkeshwar Singh Mathematical Logic


Quantifiers
Methods of Proof

Proof Methods

Proofs, no matter how simple or complicated they are, are the


heart and soul of mathematics.
They play a central role in the development of mathematics
and guarantee the correctness of mathematical results and
algorithms.
No mathematical results or computer algorithms are accepted
as correct unless they are proved using logical reasoning.
What is a theorem?

Dr. Tarkeshwar Singh Mathematical Logic


Quantifiers
Methods of Proof

Proof Methods

A theorem in mathematics is a true proposition.


Many theorems are implications (H1 ∧ H2 ∧ · · · ∧ Hn ) → C .
Proving such a theorem means verifying that the proposition
(H1 ∧ H2 ∧ · · · ∧ Hn ) → C is a tautology.
We shall discuss six standard methods for proving theorems:
vacuous proof, trivial proof, direct proof, indirect proof,
proof by cases, and existence proof.

Dr. Tarkeshwar Singh Mathematical Logic


Quantifiers
Methods of Proof

Vacuous Proof

Suppose the hypothesis H of the implication H → C is false.


Then the implication is true regardless of whether C is true or
false.
Thus if the hypothesis H can be shown to be false, the
theorem H → C is true by default.
Such a proof is a vacuous proof.
Vacuous proofs, although rare, are necessary to handle special
cases.

Dr. Tarkeshwar Singh Mathematical Logic


Quantifiers
Methods of Proof

Trivial Proof

Suppose the conclusion C of the implication H → C is true.


In this case the implication is true irrespective of the truth
value of H.
Consequently, if C can be shown to be true, such a proof is a
trivial proof.

Example
If x is a positive real number and n any non negative integer, then
(1 + x)n ≥ 1 + nx.

Dr. Tarkeshwar Singh Mathematical Logic


Quantifiers
Methods of Proof

Direct Proof

In the direct proof of the theorem (H1 ∧ H2 ∧ · · · ∧ Hn ) → C ,


assume the given hypotheses Hi are true.
Using the laws of logic or previously known facts, establish the
desired conclusion C as the final step of a chain of
implications: H → C1 , C1 → C2 , . . . , Cn → C .
Then, by the repeated application of the hypothetical
syllogism, it follows that H → C .

Example
Prove directly that the product of any two odd integers is an odd
integer.

Dr. Tarkeshwar Singh Mathematical Logic


Quantifiers
Methods of Proof

Solution

Dr. Tarkeshwar Singh Mathematical Logic


Quantifiers
Methods of Proof

Indirect Proof

There are two kinds of indirect proofs for the theorem


H → C1 , C1 → C2 , . . . , Cn → C .
Proof by contraposition and proof by contradiction.
First we shall discuss the method of proof by contraposition.
(H1 ∧ H2 ∧ · · · ∧ Hn ) → C ≡∼ C →∼ (H1 ∧ H2 ∧ · · · ∧ Hn ).
By De Morgan’s Law:

∼ (H1 ∧ H2 ∧ · · · ∧ Hn ) ≡∼ H1 ∨ ∼ H2 ∨ · · · ∨ ∼ Hn .

So, ∼ C → (∼ H1 ∨ ∼ H2 ∨ · · · ∨ ∼ Hn ).
In this method, assume the desired conclusion C is false; then
using the laws of logic, establish that some hypothesis Hi is
also false. Once you have done this, the theorem is proved.

Dr. Tarkeshwar Singh Mathematical Logic


Quantifiers
Methods of Proof

Illustration
Example
Prove indirectly: If the square of an integer is odd, then the integer
is odd.

Dr. Tarkeshwar Singh Mathematical Logic


Quantifiers
Methods of Proof

Proof by Contradiction

Proof by contradiction is the other variation of indirect proof,


which is based on the law of reductio ad absurdum.
(H1 ∧ H2 ∧ · · · ∧ Hn ) → C ≡ [H1 ∧ H2 ∧ · · · ∧ Hn ∧ ∼ C ] → F.
In this method, we assume the given hypotheses Hi are true,
but the conclusion C is false.
Then argue logically and reach a contradiction F.

Example
There is no largest prime number; that is, there are infinitely many
prime numbers.

Dr. Tarkeshwar Singh Mathematical Logic


Quantifiers
Methods of Proof

Solution

Dr. Tarkeshwar Singh Mathematical Logic


Quantifiers
Methods of Proof

Proof by cases

Suppose we would like to prove a theorem of the form


(H1 ∨ H2 ∨ · · · ∨ Hn ) → C .
Since (H1 ∨ H2 ∨ · · · ∨ Hn ) → C ≡ (H1 → C ) ∧ (H2 →
C ) ∧ · · · ∧ (Hn → C ).
(H1 ∨ H2 ∨ · · · ∨ Hn ) → C is true if and only if each
implication Hi → C is true.
Consequently, we need only prove that each implication is
true. Such a proof is a proof by cases.

Dr. Tarkeshwar Singh Mathematical Logic


Quantifiers
Methods of Proof

Existence Proof

Finally, theorems of the form (∃x)P(x) also occur in


mathematics.
To prove such a theorem, we must establish the existence of
an object a for which P(a) is true.
Accordingly, such a proof is an existence proof.
There are two kinds of existence proofs: the constructive
existence proof and the nonconstructive existence proof.
If we are able to find a mathematical object b such that P(b)
is true, such an existence proof is a constructive proof.

Dr. Tarkeshwar Singh Mathematical Logic


Quantifiers
Methods of Proof

Constructive Proof
Example
Prove that there is a positive integer that can be expressed in two
different ways as the sum of two cubes.

Dr. Tarkeshwar Singh Mathematical Logic


Quantifiers
Methods of Proof

Non-constructive Proof
A nonconstructive existence proof of the theorem (∃x)P(x) does
not provide us with an element a for which P(a) is true, but rather
establishes its existence by an indirect method, usually
contradiction.
Example
Prove that there is a prime number greater than 3.

Dr. Tarkeshwar Singh Mathematical Logic


Quantifiers
Methods of Proof

Counter Example

Suppose you would like to show that the statement (∀x)P(x)


is false.
Since ∼ (∀x)P(x) ≡ (∃x) ∼ P(x).
By De Morgan’s law, the statement (∀x)P(x) is false if there
exists an item x in the UD for which the predicate P(x) is
false.
Such an object x is a counterexample.
Thus, to disprove the proposition (∀x)P(x), all we need is to
produce a counterexample c for which P(c) is false.

Dr. Tarkeshwar Singh Mathematical Logic

Potrebbero piacerti anche