210 likes | 498 Views
Chapter 3 The Logic of Quantified Statements. Predicates. A predicate is a sentence with a finite number of variables, and it normally does not have any truth value. A predicate becomes a statement when specific values are substituted for the variables. Examples: P( x ): x 2 – 3 x + 2 = 0
E N D
Predicates A predicate is a sentence with a finite number of variables, and it normally does not have any truth value. A predicate 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. • Examples: • P(x):x2 – 3x + 2 = 0 Domain is the real numbers • Q(n):n is the sum of two integer squares Domain is the natural numbers • R(x): sin2(x) ≥ cos2(x) Domain is the real numbers
Quantifiers A quantifier is a symbols that expresses the quantity of a certain type of objects. Only two types of quantifiers will be needed. Universal quantifier: x(x2 0) means “for all x, x2 0” Existential quantifier: n (n×n = n+n) means “there exists an n such that n×n = n+n”
Quantified Statements • A quantified statement is a statement that specifies quantity (of something). • Examples: • There is at least one student absent today. • Everybody in the class passes the 1st quiz. • The equation x2 + 5x – 6 = 0 has exactly two different real solutions. • A non-quantified statement: “3331 is a prime number.”
Quantified Statements Most interesting properties (theorems) in mathematics are quantified statements. Examples: All polynomial functions are differentiable. For all real number x, sin2x + cos2x = 1. For any whole number n > 1, there is always a prime number between n and 2n.
Quantifiers How do we express “there exists only one” with a quantified statement ? ! x P(x) means there is exactly one x such that P(x) is true. It is the abbrev. of x { P(x) [y (y x P(y))]}
Notations for some common sets • R is the set of real numbers • Z is the set of integers Zahlen (German for numbers). • 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). Example: x > 4 x2 > 16 Note: A predicate can be interpreted as a function whose (output) value(s) is a proposition.
Bound and Free variables In the following predicate xyP(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.
Truth and Falsity of Quantified statements A universal statement xD, P(x) is true if for each x in D, P(x) is true Example: The statement “nN (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.
A universal statement xD, 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. xD P(x) cannot be false, xD P(x) must be true. We say that xD, P(x) is true by default
Examples of False Universal Statements • nN, 2(2^n) + 1 is prime • All members in the sequence {31, 331, 3331, 33331, 333331, …. }are prime numbers. If you can find even just one counter-example, then you prove that the universal statement is false.
An existential statement xD, Q(x) is true if there is a w in D such that Q(w) is true Example: The statement “nN (n is the sum of its proper factors)” is true because 6 = 1 + 2 + 3 is the sum of all it’s proper factors. (note: proper here means less than n itself.) There are of course more numbers of this type (i.e. perfectnumbers) but it is irrelevant to the truth of this statement. The next three perfect numbers are 28, 496, 8128.
Note: the truth of an existential statement cannot always be determined by a computer either, as the search may last for ever. Example: “nN (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.
Negations of Quantified Statements [xD P(x) ] is equiv. to xD [ P(x)] [xD P(x) ] is equiv. to xD [ P(x)] • Examples: • xR (sin2x + cos2x = 1). • negation: • xR (sin2x + cos2x 1). • xR (x2 + x + 1 = 0). • negation: • xR (x2 + x + 1 0).
Section 3.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 • [ yR xR (x y y > x) ] • “Every real number has an additive inverse” is expressed as • xR yR ( x + y = 0 ) • “limit of f(x) = L at x = c” is defined as • > 0 > 0 s.t. x (0< x –c < f(x) – L < ) • “If n is an integer greater than 1, there is a prime number • between n and 2n” • n Z [n>1 p Z (“p is prime” n < p < 2n) ]
Negations [ xD yD P(x, y)] xD yD[P(x, y)] [ xD yDP(x, y)] xD yD [P(x, y)] Remark: if there is no change to the domain, we can skip the domain when it is clear in the context. [ xy zQ(x, y, z)] x y z [ Q(x, y, z)] [ xy z Q(x, y, z)] x y z [ Q(x, y, z)]
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.
Section 3.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.
does not go to 0 as n goes to is not convergent. 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 .