Predicate calculus - PowerPoint PPT Presentation

1 / 14
About This Presentation
Title:

Predicate calculus

Description:

Q(xn) an existential statement is just a disjunction. x D Q(x) Q(x1) Q(x2) ... Q(xn) ... an existential statement is an 'infinite disjunction' ... – PowerPoint PPT presentation

Number of Views:35
Avg rating:3.0/5.0
Slides: 15
Provided by: cary72
Category:

less

Transcript and Presenter's Notes

Title: Predicate calculus


1
Predicate Calculus
  • A predicate is a sentence with a finite number of
    variables and becomes a statement when specific
    values are substituted for the variables.
  • Examples
  • P(x) x2 3x 2 0
  • Q(n) n is the sum of two integer squares
  • R(x) sin2(x) ? cos2(x)
  • Domain of a predicate
  • is the set of values that can be substituted to
    the variable(s) in the predicate.
  • dom P(x) the set of real numbers
  • dom Q(n) the set of integers
  • dom R(x) the set of real numbers

2
Notations for some common sets
  • R is the set of real numbers
  • Z is the set of integers
  • Q is the set of rational numbers
  • N is the set of natural numbers
  • C is the set of complex numbers

Another notation P(x) ? Q(x) means that for any
c in the common domain of P and Q, if P(c) is
true then so is Q(c).
Note A predicate can be interpreted as a
function whose (output) value(s) is a proposition.
3
Quantifiers
  • There are two ways to convert a predicate to a
    statement
  • assigning values to its variables
  • quantifying its variables
  • Examples
  • For all real number x, sin2(x) cos2(x) 1
  • There is at least one positive integer n such
    that
  • nn n n

Universal quantifier ? ?x?D, P(x) means for
every x in the domain D, P(x)
Existential quantifier ? ?n?D, Q(n) means
there is at least one n in the
domain D such that Q(n)
4
Bound and Free variables
In the following predicate ?
x?y P(x, y, z) x and y are called bound
variables z is called a free variable. Free
variables can be substituted by numbers but bound
variables cannot.
5
Truth and Falsity of Quantified statements
A universal statement
?x?D P(x) is true if for each x in
D, P(x) is true Example The statement ?n ?N
(n is the sum of 4 integer squares) is true
if 0 is the sum of 4 integer squares, 1 is the
sum of 4 integer squares, 2 is the sum of 4
integer squares,
Note the above example explains why predicate
calculus is much more difficult than
propositional calculus the truth value of a
quantified statement cannot be determined by a
calculator or even computer.
6
  • A universal statement
  • ?x?D P(x)
  • is false if there is at least one element w in D
    such that P(w) is false.
  • Note In some unusual cases, the domain D turns
    out to be empty, and therefore it is impossible
    to find any w in D such that P(w) is false.
  • ?x?D P(x) cannot be false,
  • ?x?D P(x) must be true.
  • We say that ?x?D P(x) is true by default
  • Example
  • ?x?x sin(x)gt1 ( x3 7x 5 0 ) is true.

7
An existential statement ?x?D Q(x) is true
if there is a w in D such that Q(w) is true
Example The statement ? n?N (n is the sum of
its proper factors) is true because 6 1
2 3 is the sum of all its proper
factors. (note proper here means less than n
itself.) There are of course more numbers of
this type (i.e. perfect numbers) but it is
irrelevant to the truth of this statement. The
next three perfect numbers are 28, 496, 8128.
8
Note the truth of an existential statement
cannot always be determined by a computer either,
as the search may last for ever. Example
? n?N (n is odd ? n is perfect) is
still an unanswered question. If such an odd
perfect number does exist, it must be greater
than 10200.
9
Negations of Quantified Statements
??x?D P(x) is equiv. to ?x?D ?P(x)
??x?D P(x) is equiv. to ?x?D ?P(x)
  • Examples
  • Everyone in this class has a computer at home.
  • negation
  • There is at least one person in this class that
    does not
  • have a computer at home.
  • There was at least one day last year that I did
    not
  • turn on my TV.
  • negation
  • Everyday last year I turned on my TV.

10
Section 2.2 Multiple Quantifiers
  • A statement with multiple quantifiers is more
    complex but is more expressive as well.
  • Examples
  • there is no largest number can be rephrased as
  • ? ?y?R ?x?R (x ? y ? y gt x)
  • Every real number has an additive inverse is
    expressed as
  • ?x?R ?y?R ( x y 0 )
  • limit of f (x) L at x c is defined as
  • ?? gt 0 ? ? gt 0 s.t. ?x (0lt ? x c ? lt
    ? ? ? f (x) L ? lt ?)
  • If n is an integer greater than 1, there is a
    prime number
  • between n and 2n
  • ?n ?N ngt1 ? ?p ?N (p is prime ? n lt
    p lt 2n)

11
Negations
? ? x? D ? y? D P(x, y) ? ? x? D ? y? D ?P(x,
y) ? ? x? D ? y? D P(x, y) ? ? x? D ? y? D
?P(x, y) Remark if there is no change to the
domain, we can skip the domain when it is clear
in the context.
? ?x?y ? z Q(x, y, z) ? ?x ?y ? z ? Q(x, y,
z) ? ?x?y ? z Q(x, y, z) ? ?x ?y ? z ? Q(x,
y, z)
12
Relations among ?, ? and ?, ?
  • If the domain D of quantification is finite, say
  • D x1, x2, , xn
  • then
  • a universal statement is just a conjunction
  • ?x ?D Q(x) ? Q(x1) ? Q(x2) ? ?
    Q(xn)
  • an existential statement is just a disjunction
  • ?x ?D Q(x) ? Q(x1) ? Q(x2) ? ?
    Q(xn)
  • If the domain D is infinite, then
  • a universal statement is an infinite
    conjunction
  • an existential statement is an infinite
    disjunction
  • The above informal thought suggests that
    predicate calculus is an extension of
    propositional calculus.

13
Section 2.3 Arguments with quantified statements
Universal Modus Ponens ?x P(x) ? Q(x)
P(a) for a particular a ? Q(a)
Example For any integer n, if the sum of the
digits in n is divisible by 3, then n
is divisible by 3. The sum of digits in
54627 is divisible by 3. ? 54627 is divisible by
3.
14
Universal Modus Tollens ?x P(x) ? Q(x)
?Q(a) for a particular a ? ?P(a)
Example For any real sequence an, if ?an is
convergent, then an goes to 0 as n
goes to ? .
Write a Comment
User Comments (0)
About PowerShow.com