M ACM 101 Fundamentals of Logic Page 1 M ACM 101 Fundamentals of Logic Page 2 Back to Statements Statements - cont’d… A declarative sentence is an open statement if 1) it contains one or more variables, and 2) it is not a statement, but 3) it becomes a statement when the variables in it are replaced by certain allowable choices. E.g. q(x,y): The numbers y+2, x-y, and x+2y are even integers. E.g. We can quantify an open statement using: existential quantifier: “For some x”: !x universal quantifier: “For all x”: "x q(5,2): Therefore, For some x, p(x) is For some x,y, q(x,y) is p(x): The number x+2 is an even integer. p(5): ¬p(7): p(6): ¬p(8): M ACM 101 Fundamentals of Logic ¬q(4,7): For some x, ¬p(x) is For some x,y, ¬q(x,y) is x in p(x): x in !x,p(x): Page 3 M ACM 101 Fundamentals of Logic Example Implicit Quantification Consider the universe of all real numbers and the open statements: p(x): x ! 0 Sometimes statements (like those found in textbooks) implicitly imply quantification: q(x): x2 ! 0 r(x): x2-3x-4 = 0 s(x): x2-3 > 0 E.g. the trigonometric identity: sin2x + cos2x = 1 really means: Page 4 M ACM 101 Fundamentals of Logic Page 5 M ACM 101 Fundamentals of Logic Quantifier Examples Examples Consider the statements: Consider the statements: p(x): Student x likes Physics. q(x): Student x is a genius. r(x): Student x is happy. Page 6 “If a quadrilateral is a rectangle then it has four equal angles.” “If a quadrilateral has four equal angles, then it is a rectangle.” Translate the following into quantified statements: “Not every student likes Physics.” “Every student who likes Physics is a genius, but not happy.” “For every integer n we call n even if it is divisible by 2.” “For every student who is a genius there is a student who likes Physics.” M ACM 101 Fundamentals of Logic Logical Equivalence & Open Statements As we might expect, the open statements p(x) and q(x) are called logically equivalent, and we write "x[p(x) # q(x)] when p(x) $ q(x) for all x. Similarly, if p(x) % q(x) is true for all x then p(x) logically implies q(x) and we write x[p(x) & q(x)]. Finally, for the statement "x[p(x) % q(x)]: contrapositive: converse: inverse: Page 7 M ACM 101 Fundamentals of Logic Page 8 Example Consider the universe of all integers and the open statements: r(x): 2x+1 = 5 s(x): x2 = 9 M ACM 101 Fundamentals of Logic Page 9 M ACM 101 Fundamentals of Logic Logical Equivalences & Implications Negating Statements For a prescribed universe and any open statements p(x), q(x): Rules for negating statements with one quantifier: ¬["x p(x)] # !x[p(x) ' q(x)] & [!x p(x) ' !x q(x)] ¬[!x p(x)] # !x[p(x) ( q(x)] # "x[p(x) ' q(x)] # ¬["x ¬p(x)] # ["x p(x) ( "x q(x)] & M ACM 101 Fundamentals of Logic Example For the universe of all integers we have the following: p(x): x is odd. q(x): x2-1 is even. Find the negation of the statement "x[p(x) % q(x)] ¬[!x ¬p(x)] # Page 11 Page 10
© Copyright 2026 Paperzz