Terminology Predicate Logic The public will believe anything, so long as it is not founded on truth. (Edith Sitwell) Terminology . . . . . . . . . . . . . Quantifiers . . . . . . . . . . . . . . Negating Quantifiers . . . . . . . Definition of Implies . . . . . . . . Nested Quantifiers . . . . . . . . . Examples of Nested Quantifiers Complex Nested Quantifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 3 4 5 6 7 8 A predicate is a statement with variables, e.g., Boolean expressions, conditions, tests. With values to variables, a predicate is T or F. P (x) denotes a predicate with one variable. Q(x, y) denotes a predicate with two variables. Examples: x > 3, x = y + 3, x y = z We might define P (x) to be x > 3, Q(x, y) to be x = y + 3, and R(x, y, z) to be x y = z. The domain specifies all possible values of the variables. Unless otherwise stated, the domain is R, the real numbers. CS 2233 Discrete Mathematical Structures Predicate Logic – 2 Quantifiers We form propositions from predicates by assigning values to the variables or by quantification. Universal quantification: ∀x P (x) is T if P (x) is T for all values of x. – Examples: ∀x (x > 3), ∀x (x2 ≥ 0) Existential quantification: ∃x P (x) is T if P (x) is T for some value of x. – Examples: ∃x (x > 3), ∃x (x2 < 0) CS 2233 Discrete Mathematical Structures 1 Predicate Logic – 3 2 Negating Quantifiers Nested Quantifiers ¬∃x P (x) is equivalent to ∀x ¬P (x) Ex: ¬∃x(x2 < 0) is equiv. to ∀x(x2 ≥ 0) Note: the negation of x2 < 0 is x2 ≥ 0. – Ex: ¬∃x(x = x2 ) is equiv. to ∀x(x 6= x2 ) Note: the negation of x = x2 is x 6= x2. – ¬∀x P (x) is equivalent to ∃x ¬P (x) – – Ex: ¬∀x(x = x2) is equiv. to ∃x(x 6= x2 ) Ex: ¬∀x(x < x + 1) is equiv. to ∃x(x ≥ x + 1) Note: ¬(x < x + 1) is x ≥ x + 1. CS 2233 Discrete Mathematical Structures Predicate Logic – 4 Definition of Implies CS 2233 Discrete Mathematical Structures Predicate Logic – 6 Define P (x) implies Q(x) as ∀x(P (x) → Q(x)). Note: ∀x(P (x) → Q(x)) is equivalent to ¬∃x(P (x) ∧ ¬Q(x)). Examples of Nested Quantifiers P (x) implies Q(x) is true if, whenever P (x) is true, Q(x) is also true. P (x) implies Q(x) is false if there is any counterexample x = a where P (a) is true and Q(a) is false. The sum of two positive numbers is positive. – Example 1: x < 0 implies x − 1 < 0. Every number has an additive inverse. – Example 2: x < 0 does not imply x + 1 < 0. CS 2233 Discrete Mathematical Structures Predicate Logic – 5 ∀x∃y(x + y = 0) There is a number such that this number times any other number results in zero. – ∀x∀y((x > 0 ∧ y > 0) → (x + y > 0)) ∃y∀x(x y = 0) There exists two negative numbers that add up to −3. – ∃x∃y(x < 0 ∧ y < 0 ∧ x + y = −3) CS 2233 Discrete Mathematical Structures 3 Predicate Logic – 7 4 Complex Nested Quantifiers The definition of limits: lim f (x) = b if x→a ∀ǫ ∃δ ∀x (0 < |x − a| < δ → |f (x) − b| < ǫ) where ǫ and δ are positive reals and x is real. The definition of big-Oh (later in course): f (n) is O(g(n)) if ∃k∃c∀n(n > k → f (n) < c g(n)) where the domain is R, the real numbers. CS 2233 Discrete Mathematical Structures Predicate Logic – 8 5
© Copyright 2026 Paperzz