Predicate Logic - Definition: Predicate Logic Deals With Predicates, Which Are Propositions Containing Variables
Predicate Logic - Definition: Predicate Logic Deals With Predicates, Which Are Propositions Containing Variables
Predicate Logic - Definition: Predicate Logic Deals With Predicates, Which Are Propositions Containing Variables
Quantifiers
The variable of predicates is quantified by quantifiers. There are two types of
quantifier in predicate logic − Universal Quantifier and Existential Quantifier.
Universal Quantifier
Universal quantifier states that the statements within its scope are true for every
value of the specific variable. It is denoted by the symbol ∀∀.
∀xP(x)∀xP(x) is read as for every value of x, P(x) is true.
Example − "Man is mortal" can be transformed into the propositional
form ∀xP(x)∀xP(x) where P(x) is the predicate which denotes x is mortal and the
universe of discourse is all men.
Existential Quantifier
Existential quantifier states that the statements within its scope are true for some
values of the specific variable. It is denoted by the symbol ∃∃.
∃xP(x)∃xP(x) is read as for some values of x, P(x) is true.
Example − "Some people are dishonest" can be transformed into the propositional
form ∃xP(x)∃xP(x) where P(x) is the predicate which denotes x is dishonest and
the universe of discourse is some people.
Proof Techniques
1)Direct Proof
the direct proof, where we have premises and use inference rules and equivalences to prove a conclusion.
Example 1
Theorem: if m and n are perfect squares (i.e., m = s2 and n=t2, where s and t are integers) then mn is a perfect
square.
Proof. The premise is that m=s2 and n = 2t. Therefore mn = s2t2 = (st)2, and therefore mn is a perfect square.
2) Proof by Contraposition
Proof by Contraposition
The next category of proof technique is that of indirect proofs. The idea here is to 'sneak up' on what you want
to prove by casting the conjecture in a different way or showing that you cannot prove the opposite. The first
indirect technique is "proof by contraposition": to prove p → q we assume ¬q and show that ¬p holds. This is
based on the following equivalence: p → q ≡ ¬q → ¬p.
Self Check:
show this equivalence, p → q ≡ ¬q → ¬p, by truth table.
Example 2:
Show that "if n is an integer and n2+1 is odd, then n is even", using contraposition.
Proof using contraposition. We must show that if n is odd (n is not even), n2+1 is even. That is easy: if n is odd,
n2 is odd, and therefore n2+1 is even.
QED
Note: because we had two premises in the example connected with "and", we only have to show that the
negation of one of them is true -- it was not necessarily to negate "n is an integer".
A direct proof of example 2 would be more complicated because it is hard to derive a property of n from the
fact that n2+1 is odd (or is it?).
3) Proof by Contradiction
proof by contraposition can be used to prove an implication. Another proof technique: proof by contradiction
also uses a negation but can be used in cases other than implications.
Example 3: Suppose I have blue socks, white socks and red socks. Then at least two out of four of my socks
have the same color.
Proof by contradiction. Suppose that not at least two socks are the same color. That means that all four socks
are a different color. But I only have three different color socks, so I arrive at a contradiction. That must mean
that my assumption: not at least two socks are the same color was false, and hence the opposite is true: at least
two out of four of my socks are the same color.
QED
Proof by contradiction works as follows: to prove p, we assume ¬p and derive a contradiction, meaning we
deduce something to be true that we know from the premises is false (or vice versa with the true and false).
Here is a very famous proof that √2 is irrational, i.e. there are no integers p and q such that √2 = p/q.
Proof by contradiction.
Assume that there are integers p and q such that √2 = p/q. We can take all common factors out of p and q
arriving at √2 = a/b, where a and b have no common factors. Now we are going to show a contradiction,
namely that a and b have common factors. If √2 = a/b then 2b2 = a2. Therefore a2 is even, and therefore a is
even. ( If you do not believe that, you need to prove the lemma: if a2 is even, then a is even).
So a is even or a = 2c. But then 2b2 = a2 = 4c2 , and thus b2 = 2c2 . So b2 is even, so b is even. But if both a and b
are even then they have a common factor 2, which is the contradiction we were hunting for. Because we have
arrived at a contradiction, our assumption "there are integers p and q such that √2 = p/q" was false, hence there
are no integers p and q such that √2 = p/q.
QED
A proof by contraposition can be converted into a proof by contradiction by adding the assumption that the
premise is true and then showing that there is a contradiction.
Example 4:
Show that "if n is an integer and n2+1 is odd, then n is even" is true, using proof by contradiction.
Proof using contradiction. We assume that n is odd (the conclusion) and that n2+1 is odd. But if n is odd, then
n2 is odd, and therefore n2+1 is even. Thus, a contradiction with our assumption.
QED
Once you have decided on a proof technique, it can still be difficult to know how to proceed. One strategy is to
look for a proof of a similar statement and then adapt that proof. For example, you will see in the book several
proofs involving odd and even numbers where these numbers are re-written as 2k for even or 2n+1 for odd.
This is a well known approach for relating these numbers.