Lecture 3: Quantifiers and Proof
Techniques
Discrete Mathematical Structures:
Theory and Applications
Discrete Mathematical Structures: Theory and Applications 2
Quantifiers and First Order Logic
 Predicate or Propositional Function
Let x be a variable and D be a set; P(x) is a sentence
Then P(x) is called a predicate or propositional
function with respect to the set D if for each value of x in
D, P(x) is a statement; i.e., P(x) is true or false
Moreover, D is called the domain of the discourse and x
is called the free variable
pembicaraan
Discrete Mathematical Structures: Theory and Applications 3
Quantifiers and First Order Logic
 Predicate or Propositional Function
Example:
 Q(x,y) : x > y, where the Domain is the set of
integers
 Q is a 2-place predicate
 Q is T for Q(4,3) and Q is F for Q (3,4)
Discrete Mathematical Structures: Theory and Applications 4
Quantifiers and First Order Logic
 Universal Quantifier
Let P(x) be a predicate and let D be the domain of the
discourse. The universal quantification of P(x) is the
statement:
For all x, P(x) or
For every x, P(x)
The symbol is read as “for all and every”

 Two-place predicate:

)
(x
P
x

)
,
( y
x
P
y
x

Discrete Mathematical Structures: Theory and Applications 5
Quantifiers and First Order Logic
 Existential Quantifier
Let P(x) be a predicate and let D be the domain of the
discourse. The existential quantification of P(x) is the
statement:
There exists x, P(x)
The symbol is read as “there exists”

 Bound Variable
The variable appearing in: or

)
(x
P
x

)
(x
P
x

)
(x
P
x

Discrete Mathematical Structures: Theory and Applications 6
Quantifiers and First Order Logic
 Negation of Predicates (DeMorgan’s Laws)

Example:
 If P(x) is the statement “x has won a race” where
the domain of discourse is all runners, then the
universal quantification of P(x) is , i.e.,
every runner has won a race. The negation of this
statement is “it is not the case that every runner has
won a race. Therefore there exists at least one
runner who has not won a race. Therefore:
and so,
)
(
~
)
(
~ x
P
x
x
P
x 


)
(x
P
x

)
(
~ x
P
x

)
(
~
)
(
~ x
P
x
x
P
x 


Discrete Mathematical Structures: Theory and Applications 7
Quantifiers and First Order Logic
Negation of Predicates (DeMorgan’s Laws)
 )
(
~
)
(
~ x
P
x
x
P
x 


Discrete Mathematical Structures: Theory and Applications 8
Quantifiers and First Order Logic
 Formulas in Predicate Logic
All statement formulas are considered formulas
Each n, n =1,2,...,n-place predicate P( )
containing the variables is a formula.
If A and B are formulas, then the expressions ~A, (A∧B),
(A∨B) , A →B and A↔B are statement formulas, where
~, ∧, ∨, → and ↔ are logical connectives
If A is a formula and x is a variable, then ∀x A(x) and
∃x A(x) are formulas
All formulas constructed using only above rules are
considered formulas in predicate logic
x
x
x n
,
...
,
, 2
1
x
x
x n
,
...
,
, 2
1
Discrete Mathematical Structures: Theory and Applications 9
Quantifiers and First Order Logic
 Additional Rules of Inference
If the statement ∀x P(x) is assumed to be true, then P(a)
is also true,where a is an arbitrary member of the domain
of the discourse. This rule is called the universal
specification (US)
If P(a) is true, where a is an arbitrary member of the
domain of the discourse, then ∀x P(x) is true. This rule is
called the universal generalization (UG)
If the statement ∃x P (x) is true, then P(a) is true, for
some member of the domain of the discourse. This rule is
called the existential specification (ES)
If P(a) is true for some member a of the domain of the
discourse, then ∃x P(x) is also true. This rule is called the
existential generalization (EG)
Discrete Mathematical Structures: Theory and Applications 10
Quantifiers and First Order Logic
 Counterexample
An argument has the form ∀x (P(x ) → Q(x )), where the
domain of discourse is D
To show that this implication is not true in the domain D, it
must be shown that there exists some x in D such that
(P(x ) → Q(x )) is not true
This means that there exists some x in D such that P(x) is
true but Q(x) is not true. Such an x is called a
counterexample of the above implication
To show that ∀x (P(x) → Q(x)) is false by finding an x in D
such that P(x) → Q(x) is false is called the disproof of the
given statement by counterexample
Discrete Mathematical Structures: Theory and Applications 11
Proof Techniques
 Theorem
Statement that can be shown to be true (under certain
conditions)
Typically Stated in one of three ways
As Facts
As Implications
As Biimplications
Discrete Mathematical Structures: Theory and Applications 12
Proof Techniques
 Direct Proof or Proof by Direct Method
Proof of those theorems that can be expressed in the
form ∀x (P(x) → Q(x)), D is the domain of discourse
Select a particular, but arbitrarily chosen, member a of
the domain D
Show that the statement P(a) → Q(a) is true. (Assume
that P(a) is true
Show that Q(a) is true
By the rule of Universal Generalization (UG),
∀x (P(x) → Q(x)) is true
Discrete Mathematical Structures: Theory and Applications 13
Proof Techniques
 Indirect Proof
The implication p → q is equivalent to the implication
(∼q → ∼p)
Therefore, in order to show that p → q is true, one can
also show that the implication (∼q → ∼p) is true
To show that (∼q → ∼p) is true, assume that the
negation of q is true and prove that the negation of p is
true
Discrete Mathematical Structures: Theory and Applications 14
Proof Techniques
 Proof by Contradiction
Assume that the conclusion is not true and then arrive at a
contradiction
Example: Prove that there are infinitely many prime
numbers
Proof:
Assume there are not infinitely many prime numbers,
therefore they are listable, i.e. p1,p2,…,pn
Consider the number q = p1p2…pn+1. q is not divisible by
any of the listed primes
Therefore, q is a prime. However, it was not listed.
Contradiction! Therefore, there are infinitely many primes
Discrete Mathematical Structures: Theory and Applications 15
Proof Techniques
Discrete Mathematical Structures: Theory and Applications 16
Proof Techniques
 Proof of Biimplications
To prove a theorem of the form ∀x (P(x) ↔ Q(x )),
where D is the domain of the discourse, consider an
arbitrary but fixed element a from D. For this a, prove
that the biimplication P(a) ↔ Q(a) is true
The biimplication p ↔ q is equivalent to
(p → q) ∧ (q → p)
Prove that the implications p → q and q → p are true
Assume that p is true and show that q is true
Assume that q is true and show that p is true
Discrete Mathematical Structures: Theory and Applications 17
Proof Techniques
 Proof of Equivalent Statements
Consider the theorem that says that statements p,q and r
are equivalent
Show that p → q, q → r and r → p
Assume p and prove q. Then assume q and prove r
Finally, assume r and prove p
Or, prove that p if and only if q, and then q if and only if r
Other methods are possible
Discrete Mathematical Structures: Theory and Applications 18
Mathematical Deduction
Discrete Mathematical Structures: Theory and Applications 19
Mathematical Deduction
 Proof of a mathematical statement by the principle of
mathematical induction consists of three steps:
Discrete Mathematical Structures: Theory and Applications 20
Mathematical Deduction
 Assume that when a domino is knocked over, the next
domino is knocked over by it
 Show that if the first domino is knocked over, then all the
dominoes will be knocked over
Discrete Mathematical Structures: Theory and Applications 21
Mathematical Deduction
 Let P(n) denote the statement that then nth domino is
knocked over
 Show that P(1) is true
 Assume some P(k) is true, i.e. the kth domino is knocked
over for some
 Prove that P(k+1) is true, i.e.
1

k
)
1
(
)
( 
 k
P
k
P
Discrete Mathematical Structures: Theory and Applications 22
Mathematical Deduction
 Assume that when a staircase is climbed, the next
staircase is also climbed
 Show that if the first staircase is climbed then all
staircases can be climbed
 Let P(n) denote the statement that then nth staircase is
climbed
 It is given that the first staircase is climbed, so P(1) is
true
Discrete Mathematical Structures: Theory and Applications 23
Mathematical Deduction
 Suppose some P(k) is true, i.e. the kth staircase is
climbed for some
 By the assumption, because the kth staircase was
climbed, the k+1st staircase was climbed
 Therefore, P(k) is true, so
1

k
)
1
(
)
( 
 k
P
k
P
Discrete Mathematical Structures: Theory and Applications 24
Mathematical Deduction
Discrete Mathematical Structures: Theory and Applications 25
Mathematical Deduction
Preconditions and Postconditions
User of algorithm need not be concerned with how
the algorithm is implemented
He or she must know how to use the algorithm
and what the algorithm does
Precondition
Assertion (set of statements) that remains true before
algorithm executes
Postcondition
Assertion that is true after algorithm executes
Discrete Mathematical Structures: Theory and Applications 26
Mathematical Deduction
 Loop Invariant
Set of statements that remains true each time the loop
body is executed
Example: the syntax of a while loop is:
while booleanExpression do
loopBody
The booleanExpression is evaluated. If the
booleanExpression evaluates to true ,the loopBody
executes. After executing the loopBody ,the
booleanExpression is evaluated again. Then the
loopBody continues to execute as long as the
booleanExpression evaluates to False .
Discrete Mathematical Structures: Theory and Applications 27
Mathematical Deduction
Loop Invariant Example (continued)
The booleanExpression is either true or
false. It is a statement.
Let q denote the booleanExpression
Discrete Mathematical Structures: Theory and Applications 28
Mathematical Deduction
We can associate a predicate, P(n). The predicate
P(n) is such that:
N
Example: Sum of Odd Integers
 Proposition: 1 + 3 + … + (2n-1) = n2
for all integers n≥1.
 Proof (by induction):
1) Basis step:
The statement is true for n=1: 1=12 .
2) Inductive step:
Assume the statement is true for some k≥1
(inductive hypothesis) ,
show that it is true for k+1 .
Discrete Mathematical Structures: Theory and Applications 29
Example: Sum of Odd Integers
 Proof (cont.):
The statement is true for k:
1+3+…+(2k-1) = k2 (1)
We need to show it for k+1:
1+3+…+(2(k+1)-1) = (k+1)2 (2)
Showing (2):
1+3+…+(2(k+1)-1) = 1+3+…+(2k+1) =
1+3+…+(2k-1)+(2k+1) =
k2+(2k+1) = (k+1)2 .
We proved the basis and inductive steps,
so we conclude that the given statement true. ■
Discrete Mathematical Structures: Theory and Applications 30
by (1)
31
Important theorems proved by
mathematical induction
 Theorem 1 (Sum of the first n integers):
For all integers n≥1,
 Theorem 2 (Sum of a geometric sequence):
For any real number r except 1, and any integer
n≥0,
2
)
1
(
...
2
1





n
n
n
1
1
1
0 




 r
r
r
n
n
i
i
Tugas 1TKA dan 1 TKB
04 Oktober 2016
Apa yang dimaksud dengan induksi matematika,
jelaskan disertai dengan contoh.
Apa yang dimaksud dengan deduksi, jelaskan
disertai dengan contoh.
Apa saja yang anda ketahui tentang teknik
pembuktian, jelaskan.
Discrete Mathematical Structures: Theory and Applications 32

Proof techniques and quantifiers : lecture 3

  • 1.
    Lecture 3: Quantifiersand Proof Techniques Discrete Mathematical Structures: Theory and Applications
  • 2.
    Discrete Mathematical Structures:Theory and Applications 2 Quantifiers and First Order Logic  Predicate or Propositional Function Let x be a variable and D be a set; P(x) is a sentence Then P(x) is called a predicate or propositional function with respect to the set D if for each value of x in D, P(x) is a statement; i.e., P(x) is true or false Moreover, D is called the domain of the discourse and x is called the free variable pembicaraan
  • 3.
    Discrete Mathematical Structures:Theory and Applications 3 Quantifiers and First Order Logic  Predicate or Propositional Function Example:  Q(x,y) : x > y, where the Domain is the set of integers  Q is a 2-place predicate  Q is T for Q(4,3) and Q is F for Q (3,4)
  • 4.
    Discrete Mathematical Structures:Theory and Applications 4 Quantifiers and First Order Logic  Universal Quantifier Let P(x) be a predicate and let D be the domain of the discourse. The universal quantification of P(x) is the statement: For all x, P(x) or For every x, P(x) The symbol is read as “for all and every”   Two-place predicate:  ) (x P x  ) , ( y x P y x 
  • 5.
    Discrete Mathematical Structures:Theory and Applications 5 Quantifiers and First Order Logic  Existential Quantifier Let P(x) be a predicate and let D be the domain of the discourse. The existential quantification of P(x) is the statement: There exists x, P(x) The symbol is read as “there exists”   Bound Variable The variable appearing in: or  ) (x P x  ) (x P x  ) (x P x 
  • 6.
    Discrete Mathematical Structures:Theory and Applications 6 Quantifiers and First Order Logic  Negation of Predicates (DeMorgan’s Laws)  Example:  If P(x) is the statement “x has won a race” where the domain of discourse is all runners, then the universal quantification of P(x) is , i.e., every runner has won a race. The negation of this statement is “it is not the case that every runner has won a race. Therefore there exists at least one runner who has not won a race. Therefore: and so, ) ( ~ ) ( ~ x P x x P x    ) (x P x  ) ( ~ x P x  ) ( ~ ) ( ~ x P x x P x   
  • 7.
    Discrete Mathematical Structures:Theory and Applications 7 Quantifiers and First Order Logic Negation of Predicates (DeMorgan’s Laws)  ) ( ~ ) ( ~ x P x x P x   
  • 8.
    Discrete Mathematical Structures:Theory and Applications 8 Quantifiers and First Order Logic  Formulas in Predicate Logic All statement formulas are considered formulas Each n, n =1,2,...,n-place predicate P( ) containing the variables is a formula. If A and B are formulas, then the expressions ~A, (A∧B), (A∨B) , A →B and A↔B are statement formulas, where ~, ∧, ∨, → and ↔ are logical connectives If A is a formula and x is a variable, then ∀x A(x) and ∃x A(x) are formulas All formulas constructed using only above rules are considered formulas in predicate logic x x x n , ... , , 2 1 x x x n , ... , , 2 1
  • 9.
    Discrete Mathematical Structures:Theory and Applications 9 Quantifiers and First Order Logic  Additional Rules of Inference If the statement ∀x P(x) is assumed to be true, then P(a) is also true,where a is an arbitrary member of the domain of the discourse. This rule is called the universal specification (US) If P(a) is true, where a is an arbitrary member of the domain of the discourse, then ∀x P(x) is true. This rule is called the universal generalization (UG) If the statement ∃x P (x) is true, then P(a) is true, for some member of the domain of the discourse. This rule is called the existential specification (ES) If P(a) is true for some member a of the domain of the discourse, then ∃x P(x) is also true. This rule is called the existential generalization (EG)
  • 10.
    Discrete Mathematical Structures:Theory and Applications 10 Quantifiers and First Order Logic  Counterexample An argument has the form ∀x (P(x ) → Q(x )), where the domain of discourse is D To show that this implication is not true in the domain D, it must be shown that there exists some x in D such that (P(x ) → Q(x )) is not true This means that there exists some x in D such that P(x) is true but Q(x) is not true. Such an x is called a counterexample of the above implication To show that ∀x (P(x) → Q(x)) is false by finding an x in D such that P(x) → Q(x) is false is called the disproof of the given statement by counterexample
  • 11.
    Discrete Mathematical Structures:Theory and Applications 11 Proof Techniques  Theorem Statement that can be shown to be true (under certain conditions) Typically Stated in one of three ways As Facts As Implications As Biimplications
  • 12.
    Discrete Mathematical Structures:Theory and Applications 12 Proof Techniques  Direct Proof or Proof by Direct Method Proof of those theorems that can be expressed in the form ∀x (P(x) → Q(x)), D is the domain of discourse Select a particular, but arbitrarily chosen, member a of the domain D Show that the statement P(a) → Q(a) is true. (Assume that P(a) is true Show that Q(a) is true By the rule of Universal Generalization (UG), ∀x (P(x) → Q(x)) is true
  • 13.
    Discrete Mathematical Structures:Theory and Applications 13 Proof Techniques  Indirect Proof The implication p → q is equivalent to the implication (∼q → ∼p) Therefore, in order to show that p → q is true, one can also show that the implication (∼q → ∼p) is true To show that (∼q → ∼p) is true, assume that the negation of q is true and prove that the negation of p is true
  • 14.
    Discrete Mathematical Structures:Theory and Applications 14 Proof Techniques  Proof by Contradiction Assume that the conclusion is not true and then arrive at a contradiction Example: Prove that there are infinitely many prime numbers Proof: Assume there are not infinitely many prime numbers, therefore they are listable, i.e. p1,p2,…,pn Consider the number q = p1p2…pn+1. q is not divisible by any of the listed primes Therefore, q is a prime. However, it was not listed. Contradiction! Therefore, there are infinitely many primes
  • 15.
    Discrete Mathematical Structures:Theory and Applications 15 Proof Techniques
  • 16.
    Discrete Mathematical Structures:Theory and Applications 16 Proof Techniques  Proof of Biimplications To prove a theorem of the form ∀x (P(x) ↔ Q(x )), where D is the domain of the discourse, consider an arbitrary but fixed element a from D. For this a, prove that the biimplication P(a) ↔ Q(a) is true The biimplication p ↔ q is equivalent to (p → q) ∧ (q → p) Prove that the implications p → q and q → p are true Assume that p is true and show that q is true Assume that q is true and show that p is true
  • 17.
    Discrete Mathematical Structures:Theory and Applications 17 Proof Techniques  Proof of Equivalent Statements Consider the theorem that says that statements p,q and r are equivalent Show that p → q, q → r and r → p Assume p and prove q. Then assume q and prove r Finally, assume r and prove p Or, prove that p if and only if q, and then q if and only if r Other methods are possible
  • 18.
    Discrete Mathematical Structures:Theory and Applications 18 Mathematical Deduction
  • 19.
    Discrete Mathematical Structures:Theory and Applications 19 Mathematical Deduction  Proof of a mathematical statement by the principle of mathematical induction consists of three steps:
  • 20.
    Discrete Mathematical Structures:Theory and Applications 20 Mathematical Deduction  Assume that when a domino is knocked over, the next domino is knocked over by it  Show that if the first domino is knocked over, then all the dominoes will be knocked over
  • 21.
    Discrete Mathematical Structures:Theory and Applications 21 Mathematical Deduction  Let P(n) denote the statement that then nth domino is knocked over  Show that P(1) is true  Assume some P(k) is true, i.e. the kth domino is knocked over for some  Prove that P(k+1) is true, i.e. 1  k ) 1 ( ) (   k P k P
  • 22.
    Discrete Mathematical Structures:Theory and Applications 22 Mathematical Deduction  Assume that when a staircase is climbed, the next staircase is also climbed  Show that if the first staircase is climbed then all staircases can be climbed  Let P(n) denote the statement that then nth staircase is climbed  It is given that the first staircase is climbed, so P(1) is true
  • 23.
    Discrete Mathematical Structures:Theory and Applications 23 Mathematical Deduction  Suppose some P(k) is true, i.e. the kth staircase is climbed for some  By the assumption, because the kth staircase was climbed, the k+1st staircase was climbed  Therefore, P(k) is true, so 1  k ) 1 ( ) (   k P k P
  • 24.
    Discrete Mathematical Structures:Theory and Applications 24 Mathematical Deduction
  • 25.
    Discrete Mathematical Structures:Theory and Applications 25 Mathematical Deduction Preconditions and Postconditions User of algorithm need not be concerned with how the algorithm is implemented He or she must know how to use the algorithm and what the algorithm does Precondition Assertion (set of statements) that remains true before algorithm executes Postcondition Assertion that is true after algorithm executes
  • 26.
    Discrete Mathematical Structures:Theory and Applications 26 Mathematical Deduction  Loop Invariant Set of statements that remains true each time the loop body is executed Example: the syntax of a while loop is: while booleanExpression do loopBody The booleanExpression is evaluated. If the booleanExpression evaluates to true ,the loopBody executes. After executing the loopBody ,the booleanExpression is evaluated again. Then the loopBody continues to execute as long as the booleanExpression evaluates to False .
  • 27.
    Discrete Mathematical Structures:Theory and Applications 27 Mathematical Deduction Loop Invariant Example (continued) The booleanExpression is either true or false. It is a statement. Let q denote the booleanExpression
  • 28.
    Discrete Mathematical Structures:Theory and Applications 28 Mathematical Deduction We can associate a predicate, P(n). The predicate P(n) is such that: N
  • 29.
    Example: Sum ofOdd Integers  Proposition: 1 + 3 + … + (2n-1) = n2 for all integers n≥1.  Proof (by induction): 1) Basis step: The statement is true for n=1: 1=12 . 2) Inductive step: Assume the statement is true for some k≥1 (inductive hypothesis) , show that it is true for k+1 . Discrete Mathematical Structures: Theory and Applications 29
  • 30.
    Example: Sum ofOdd Integers  Proof (cont.): The statement is true for k: 1+3+…+(2k-1) = k2 (1) We need to show it for k+1: 1+3+…+(2(k+1)-1) = (k+1)2 (2) Showing (2): 1+3+…+(2(k+1)-1) = 1+3+…+(2k+1) = 1+3+…+(2k-1)+(2k+1) = k2+(2k+1) = (k+1)2 . We proved the basis and inductive steps, so we conclude that the given statement true. ■ Discrete Mathematical Structures: Theory and Applications 30 by (1)
  • 31.
    31 Important theorems provedby mathematical induction  Theorem 1 (Sum of the first n integers): For all integers n≥1,  Theorem 2 (Sum of a geometric sequence): For any real number r except 1, and any integer n≥0, 2 ) 1 ( ... 2 1      n n n 1 1 1 0       r r r n n i i
  • 32.
    Tugas 1TKA dan1 TKB 04 Oktober 2016 Apa yang dimaksud dengan induksi matematika, jelaskan disertai dengan contoh. Apa yang dimaksud dengan deduksi, jelaskan disertai dengan contoh. Apa saja yang anda ketahui tentang teknik pembuktian, jelaskan. Discrete Mathematical Structures: Theory and Applications 32