Logical Inference & Proofs: Debdeep Mukhopadhyay Dept of CSE, IIT Madras
Logical Inference & Proofs: Debdeep Mukhopadhyay Dept of CSE, IIT Madras
&
PROOFs
Debdeep Mukhopadhyay
Dept of CSE, IIT Madras
Defn
A theorem is a mathematical assertion
which can be shown to be true. A proof is
an argument which establishes the truth of
a theorem.
Overview
Methods of mathematical argument (i.e.,
proof methods) can be formalized in terms
of rules of logical inference.
Mathematical proofs can themselves be
represented formally as discrete
structures.
We will review both correct & fallacious
inference rules, & several proof methods.
Applications of Proofs
An exercise in clear communication of logical
arguments in any area of study.
The fundamental activity of mathematics is
the discovery and elucidation, through
proofs, of interesting new theorems.
Theorem-proving has applications in
program verification, computer security,
automated reasoning systems, etc.
Proving a theorem allows us to rely upon on
its correctness even in the most critical
scenarios.
Proof Terminology
Theorem
A statement that has been proven to be
true.
Rules of inference
Patterns of logically valid deductions from
hypotheses to conclusions.
Graphical Visualization
A Particular Theory
A proof
The Axioms
of the Theory
Various Theorems
antecedent 1
antecedent 2
consequent
therefore
means
p
pq
pq
p
p
q
pq
Rule of Addition
Rule of Simplification
Rule of Conjunction
p
pq
q
q
pq
p
pq
qr
pr
pq
p
q
Rule of hypothetical
syllogism
Rule of disjunctive
syllogism
Aristotle
(ca. 384-322 B.C.)
Formal Proofs
A formal proof of a conclusion C, given
premises p1, p2,,pn consists of a
sequence of steps, each of which applies
some inference rule to premises or
previously-proven statements
(antecedents) to yield a new true
statement (the consequent).
A proof demonstrates that if the premises
are true, then the conclusion is true.
Proved by
Premise #1.
Simplification of 1.
Premise #2.
Modus tollens on 2,3.
Premise #3.
Modus ponens on 4,5.
Premise #4.
Modus ponens on 6,7.
Common Fallacies
A fallacy is an inference rule or other
proof method that is not logically valid.
A fallacy may yield a false conclusion!
Fallacy
Fallacy of denying the hypothesis:
pq is true, and p is false, so q must be
false. (No, again because FT is true.)
If his hands are full of blood, he has
murdered. But he is sitting on his sofa, well
dressed (without any sign of blood), so he did
not murder.
He may have washed his hands !!!
Fallacious Proof:
x [P(x) Q(x)] x [P(x) Q(x)]
Remember we
x[P(x) Q(x)]
Proved in the last
[x P(x) x Q(x)]
class
[ x P(x) x Q(x)]
xP(x) xQ(x)
Fallacy of denying the antecedent
Circular Reasoning
The fallacy of (explicitly or implicitly)
assuming the very statement you are trying to
prove in the course of its proof. Example:
Prove that an integer n is even, if n2 is even.
Attempted proof: Assume n2 is even.
Then n2=2k for some integer k. Dividing both
sides by n gives n = (2k)/n = 2(k/n). So there
is an integer j (namely k/n) such that n=2j.
Therefore n is even.
How do
show in
that
j=k/n=n/2
is an integer,
Circular reasoningyou
is used
this
proof. Where?
without first assuming that n is even?
A Correct Proof
We know that n must be either odd or even.
If n were odd, then n2 would be odd, since
an odd number times an odd number is
always an odd number. Since n2 is even, it
is not odd, since no even number is also an
odd number. Thus, by modus tollens, n is
not odd either. Thus, by disjunctive
syllogism, n must be even.
This proof is correct, but not quite complete,
since we used several lemmas without proving
them. Can you identify what they are?
Proof by Contradiction
A method for proving p.
Assume p, and prove both q and q for
some proposition q. (Can be anything!)
Thus p (q q)
(q q) is a trivial contradiction, equal to
F
Thus pF, which is only true if p=F
Thus p is true.
2 is irrational.
Proving Existentials
A proof of a statement of the form x P(x)
is called an existence proof.
If the proof demonstrates how to actually
find or construct a specific element a such
that P(a) is true, then it is a constructive
proof.
Otherwise, it is nonconstructive.
Another Constructive
Existence Proof
Theorem: For any integer n>0, there
exists a sequence of n consecutive
composite integers.
Same statement in predicate logic:
n>0 x i (1in)(x+i is composite)
Proof follows on next slide
The proof...
Nonconstructive Existence
Proof
Principle of extremum
Theorem:
There are infinitely many prime numbers.
Any finite set of numbers must contain a
maximal element, so we can prove the
theorem if we can just show that there is no
largest prime number.
i.e., show that for any prime number, there is
a larger number that is also prime.
More generally: For any number, a larger
prime.
Formally: Show n p>n : p is prime.
Proof by contradiction
Assume a largest prime number exists; call it p.
Form the product of the finite number of prime
numbers,
r=2.3.5.7p
Now inspect r+1: It cannot be divisible by any of
the above prime numbers
So, either r+1 is a prime or divisible by a prime
greater than p (There is a fallacy in Stanats proof).
Thus, in either case there is a prime greater than
p, and hence we have a contradiction
Thus, there is no maximum prime number and
the set is infinite.
Adaptive proofs
Adapt the previous proof to prove that
there are infinite prime numbers of the
form 4k+3, where k is a non-negative
integer.
Alan Turing
1912-1954
The Proof
Absurd makes a
liar out of HALT, by
doing the opposite
of whatever HALT
predicts.
Limits on Proofs
Some very simple statements of number
theory havent been proved or disproved!
E.g. Goldbachs conjecture: Every integer n2
is exactly the average of some two primes.
n2 primes p,q: n=(p+q)/2.