14-PredCalc

Examples allcatshavetailsxcatxhastailx

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ans substitute term t for all variables x in A. • Sxt A is called an instantiation of A and t is said to be an instance of x. • Examples: Sx3 P(x, y) = P(3, y) Sx3+1 P(x, y, z, x) = P(3+1, y, z, 3+1) = P(4, y, z, 4) Discussion #14 Chapter 2, Section 1 10/20 Universal Quantification • Let A be an expression, and let x be a variable. If we want to say that P(x) is true for all substitutions of values for x in the UofD, we write ∀xP(x). • The symbol ∀ is pronounced “for all” and is called the universal quantifier. • Examples: – All cats have tails, ∀x(cat(x) ⇒ hasTail(x)). – For every integer x, x+1 > x, ∀x(>(x+1, x)). Discussion #14 Chapter 2, Section 1 11/20 Universal Quantification (continued…) ∀ ∀x P(x) is shorthand for: ∀x P(x) = P(a) ∧ P(b) ∧ P(c) with UoD = {a, b, c}. ∀x P(x) = P(0) ∧ P(1) ∧ … with UoD = non­negative integers. ∀ ∀x P(x) = T when P(x) = T for all substitutions from the UoD. (Only need one false predicate instantiation to make the formula false.) • Examples: ∀x red(x) = T for UoD = red apples ∀x red(x) = F for UoD = apples Discussion #14 Chapter 2, Section 1 12/20 Existential Quantification • Let A be an expression, and let x be a variable. If we want to say that P(x) is true for at least one value of x, we write ∃ xP(x). • The symbol ∃ is pronounced “there exists” and is called the existential quantifier. • Examples: – Some people like apples, ∃ x(likesApples(x)). – There is an integer larger than 10, ∃ x(>(x, 10)). Discussion #14 Chapter 2, Section 1 13/20 Existential Quantification (continued…) ∀ ∃ x is shorthand for: ∃ x P(x) = P(a) ∨ P(b) ∨ P(c) with UoD = {a, b, c}. ∃ x P(x) = P(1) ∨ P(2) ∨...
View Full Document

This note was uploaded on 03/02/2012 for the course C S 236 taught by Professor Michaelgoodrich during the Winter '12 term at BYU.

Ask a homework question - tutors are online