# Predicate Logic. Lucia Moura. Winter Predicates and Quantifiers Nested Quantifiers Using Predicate Calculus

Save this PDF as:

Size: px
Start display at page:

Download "Predicate Logic. Lucia Moura. Winter Predicates and Quantifiers Nested Quantifiers Using Predicate Calculus"

## Transcription

1 Predicate Logic Winter 2010

2 Predicates A Predicate is a declarative sentence whose true/false value depends on one or more variables. The statement x is greater than 3 has two parts: the subject: x is the subject of the statement the predicate: is greater than 3 (a property that the subject can have). We denote the statement x is greater than 3 by P (x), where P is the predicate is greater than 3 and x is the variable. The statement P (x) is also called the value of propositional function P at x. Assign a value to x, so P (x) becomes a proposition and has a truth value: P (5) is the statement 5 is greater than 3, so P (5) is true. P (2) is the statement 2 is greater than 3, so P (2) is false.

3 Predicates: Examples Given each propositional function determine its true/false value when variables are set as below. Prime(x) = x is a prime number. Prime(2) is true, since the only numbers that divide 2 are 1 and itself. Prime(9) is false, since 3 divides 9. C(x, y)= x is the capital of y. C(Ottawa,Canada) is true. C(Buenos Aires,Brazil) is false. E(x, y, z) = x + y = z. E(2, 3, 5) is... E(4, 4, 17) is...

4 Quantifiers Assign a value to x in P (x) = x is an odd number, so the resulting statement becomes a proposition: P (7) is true, P (2) is false. Quantification is another way to create propositions from a propositional functions: universal quantification: xp (x) says the predicate P is true for every element under consideration. Under the domain of natural numbers, xp (x) is false. existencial quantification: xp (x) says there is one or more element under consideration for which the predicate P is true. Under the domain of natural numbers, xp (x) is true, since for instance P (7) is true. Predicate calculus: area of logic dealing with predicates and quantifiers.

5 Domain, domain of discourse, universe of discourse Before deciding on the truth value of a quantified predicate, it is mandatory to specify the domain (also called domain of discourse or universe of discourse). P (x) = x is an odd number xp (x) is false for the domain of integer numbers; but xp (x) is true for the domain of prime numbers greater than 2.

6 Universal Quantifier The universal quantification of P (x) is the statement: P (x) for all values of x in the domain denoted xp (x). xp (x) is true when P (x) is true for every x in the domain. xp (x) is false when there is an x for which P (x) is false. An element for which P (x) is false is called a counterexample of xp (x). If the domain is empty, xp (x) is true for any propositional function P (x), since there are no counterexamples in the domain. If the domain is finite {x 1, x 2,..., x n }, xp (x) is the same as P (x 1 ) P (x 2 ) P (x n ).

7 Universal quantifiers: example Let P (x) be x 2 > 10. What is the truth value of xp (x) for each of the following domains:

8 Universal quantifiers: example Let P (x) be x 2 > 10. What is the truth value of xp (x) for each of the following domains: the set of real numbers: R

9 Universal quantifiers: example Let P (x) be x 2 > 10. What is the truth value of xp (x) for each of the following domains: the set of real numbers: R False. 3 is a counterexample.

10 Universal quantifiers: example Let P (x) be x 2 > 10. What is the truth value of xp (x) for each of the following domains: the set of real numbers: R False. 3 is a counterexample. the set of positive integers not exceeding 4: {1, 2, 3, 4}

11 Universal quantifiers: example Let P (x) be x 2 > 10. What is the truth value of xp (x) for each of the following domains: the set of real numbers: R False. 3 is a counterexample. the set of positive integers not exceeding 4: {1, 2, 3, 4} False. 3 is a counterexample.

12 Universal quantifiers: example Let P (x) be x 2 > 10. What is the truth value of xp (x) for each of the following domains: the set of real numbers: R False. 3 is a counterexample. the set of positive integers not exceeding 4: {1, 2, 3, 4} False. 3 is a counterexample. Also note that here P (x) is P (1) P (2) P (3) P (4), so its enough to observe that P (3) is false.

13 Universal quantifiers: example Let P (x) be x 2 > 10. What is the truth value of xp (x) for each of the following domains: the set of real numbers: R False. 3 is a counterexample. the set of positive integers not exceeding 4: {1, 2, 3, 4} False. 3 is a counterexample. Also note that here P (x) is P (1) P (2) P (3) P (4), so its enough to observe that P (3) is false. the set of real numbers in the interval [10, 39.5]

14 Universal quantifiers: example Let P (x) be x 2 > 10. What is the truth value of xp (x) for each of the following domains: the set of real numbers: R False. 3 is a counterexample. the set of positive integers not exceeding 4: {1, 2, 3, 4} False. 3 is a counterexample. Also note that here P (x) is P (1) P (2) P (3) P (4), so its enough to observe that P (3) is false. the set of real numbers in the interval [10, 39.5] True. It takes a bit longer to verify than in false statements. Let x [10, 39.5]. Then x 10 which implies x = 100 > 10, and so x 2 > 10.

15 Existencial Quantifier The existential quantification of P (x) is the statement: There exists an element x in the domain such that P (x) denoted xp (x). xp (x) is true when P (x) is true for one or more x in the domain. An element for which P (x) is true is called a witness of xp (x). xp (x) is false when P (x) is false for every x in the domain (if domain nonempty). If the domain is empty, xp (x) is false for any propositional function P (x), since there are no witnesses in the domain. If the domain is finite {x 1, x 2,..., x n }, xp (x) is the same as P (x 1 ) P (x 2 ) P (x n ).

16 Existencial quantifiers: example Let P (x) be x 2 > 10. What is the truth value of xp (x) for each of the following domains:

17 Existencial quantifiers: example Let P (x) be x 2 > 10. What is the truth value of xp (x) for each of the following domains: the set of real numbers: R

18 Existencial quantifiers: example Let P (x) be x 2 > 10. What is the truth value of xp (x) for each of the following domains: the set of real numbers: R True. 10 is a witness.

19 Existencial quantifiers: example Let P (x) be x 2 > 10. What is the truth value of xp (x) for each of the following domains: the set of real numbers: R True. 10 is a witness. the set of positive integers not exceeding 4: {1, 2, 3, 4}

20 Existencial quantifiers: example Let P (x) be x 2 > 10. What is the truth value of xp (x) for each of the following domains: the set of real numbers: R True. 10 is a witness. the set of positive integers not exceeding 4: {1, 2, 3, 4} True. 4 is a witness.

21 Existencial quantifiers: example Let P (x) be x 2 > 10. What is the truth value of xp (x) for each of the following domains: the set of real numbers: R True. 10 is a witness. the set of positive integers not exceeding 4: {1, 2, 3, 4} True. 4 is a witness. Also note that here P (x) is P (1) P (2) P (3) P (4), so its enough to observe that P (4) is true.

22 Existencial quantifiers: example Let P (x) be x 2 > 10. What is the truth value of xp (x) for each of the following domains: the set of real numbers: R True. 10 is a witness. the set of positive integers not exceeding 4: {1, 2, 3, 4} True. 4 is a witness. Also note that here P (x) is P (1) P (2) P (3) P (4), so its enough to observe that P (4) is true. the set of real numbers in the interval [0, 9.8]

23 Existencial quantifiers: example Let P (x) be x 2 > 10. What is the truth value of xp (x) for each of the following domains: the set of real numbers: R True. 10 is a witness. the set of positive integers not exceeding 4: {1, 2, 3, 4} True. 4 is a witness. Also note that here P (x) is P (1) P (2) P (3) P (4), so its enough to observe that P (4) is true. the set of real numbers in the interval [0, 9.8] False. It takes a bit longer to conclude than in true statements. Let x [0, 9.8]. Then 0 x 9.8 which implies x 2 ( 9.8) 2 = 9.8 < 10, and so x 2 < 10. What we have shown is that x P (x), which (we will see) is equivalent to xp (x)

24 Other forms of quantification Other Quantifiers The most important quantifiers are and, but we could define many different quantifiers: there is a unique, there are exactly two, there are no more than three, there are at least 100, etc. A common one is the uniqueness quantifier, denoted by!.!xp (x) states There exists a unique x such that P (x) is true. Advice: stick to the basic quantifiers. We can write!xp (x) as x(p (x) y(p (y) y = x)) or more compactly x y(p (y) y = x) Restricting the domain of a quantifier Abbreviated notation is allowed, in order to restrict the domain of certain quantifiers. x > 0(x 2 > 0) is the same as x(x > 0 x 2 > 0). y 0(y 3 0) is the same as y(y 0 y 3 0). z > 0(z 2 = 2) is the same as x(z > 0 z 2 = 2)

25 Precedence and scope of quantifiers and have higher precedence than logical operators. Example: xp (x) Q(x) means ( xp (x)) Q(x), it doesn t mean x(p (x) Q(x)). (Note: This statement is not a proposition since there is a free variable!) Binding variables and scope When a quantifier is used on the variable x we say that this occurrence of x is bound. When the occurrence of a variable is not bound by a quantifier or set to a particular value, the variable is said to be free. The part of a logical expression to which a quantifier is applied is the scope of the quantifier. A variable is free if it is outside the scope of all quantifiers. In the example above, ( xp (x)) Q(x), the x in P (x) is bound by the existencial quantifier, while the x in Q(x) is free. The scope of the universal quantifier is underlined.

26 Logical Equivalences Involving Quantifiers Definition Two statements S and T involving predicates and quantifiers are logically equivalent if and only if they have the same truth value regardless of the interpretation, i.e. regardless of the meaning that is attributed to each propositional function, the domain of discourse. We denote S T. Is x(p (x) Q(x)) logically equivalent to xp (x) xq(x)? Is x(p (x) Q(x)) logically equivalent to xp (x) xq(x)?

27 Prove that x(p (x) Q(x)) is logically equivalent to xp (x) xq(x) (where the same domain is used throughout).

28 Prove that x(p (x) Q(x)) is logically equivalent to xp (x) xq(x) (where the same domain is used throughout). Use two steps:

29 Prove that x(p (x) Q(x)) is logically equivalent to xp (x) xq(x) (where the same domain is used throughout). Use two steps: If x(p (x) Q(x)) is true, then xp (x) xq(x) is true.

30 Prove that x(p (x) Q(x)) is logically equivalent to xp (x) xq(x) (where the same domain is used throughout). Use two steps: If x(p (x) Q(x)) is true, then xp (x) xq(x) is true. Proof: Suppose x(p (x) Q(x)) is true. Then if a is in the domain, P (a) Q(a) is true, and so P (a) is true and Q(a) is true. So, if a in in the domain P (a) is true, which is the same as xp (x) is true; and similarly, we get that xq(x) is true. This means that xp (x) xq(x) is true.

31 Prove that x(p (x) Q(x)) is logically equivalent to xp (x) xq(x) (where the same domain is used throughout). Use two steps: If x(p (x) Q(x)) is true, then xp (x) xq(x) is true. Proof: Suppose x(p (x) Q(x)) is true. Then if a is in the domain, P (a) Q(a) is true, and so P (a) is true and Q(a) is true. So, if a in in the domain P (a) is true, which is the same as xp (x) is true; and similarly, we get that xq(x) is true. This means that xp (x) xq(x) is true. If xp (x) xq(x) is true, then x(p (x) Q(x)) is true.

32 Prove that x(p (x) Q(x)) is logically equivalent to xp (x) xq(x) (where the same domain is used throughout). Use two steps: If x(p (x) Q(x)) is true, then xp (x) xq(x) is true. Proof: Suppose x(p (x) Q(x)) is true. Then if a is in the domain, P (a) Q(a) is true, and so P (a) is true and Q(a) is true. So, if a in in the domain P (a) is true, which is the same as xp (x) is true; and similarly, we get that xq(x) is true. This means that xp (x) xq(x) is true. If xp (x) xq(x) is true, then x(p (x) Q(x)) is true. Proof: Suppose that xp (x) xq(x) is true. It follows that xp (x) is true and xq(x) is true. So, if a is in the domain, then P (a) is true and Q(a) is true. It follows that if a is in the domain P (a) Q(a) is true. This means that x(p (x) Q(x)) is true.

33 Prove that x(p (x) Q(x)) is not logically equivalent to xp (x) xq(x).

34 Prove that x(p (x) Q(x)) is not logically equivalent to xp (x) xq(x). It is enough to give a counterexample to the assertion that they have the same truth value for all possible interpretations.

35 Prove that x(p (x) Q(x)) is not logically equivalent to xp (x) xq(x). It is enough to give a counterexample to the assertion that they have the same truth value for all possible interpretations. Under the following interpretation: domain: set of people in the world P (x) = x is male. Q(x) = x is female. We have: x(p (x) Q(x)) (every person is a male or a female) is true; while xp (x) xq(x) (every person is a male or every person is a female) is false.

36 Negating Quantified Expressions: De Morgan Laws xp (x) x P (x) Proof: xp (x) is true if and only if xp (x) is false. Note that xp (x) is false if and only if there exists an element in the domain for which P (x) is false. But this holds if and only if there exists an element in the domain for which P (x) is true. The latter holds if and only if x P (x) is true.

37 De Morgan Laws for quantifiers (continued) xp (x) x P (x) Proof: P (x) is true if and only if xp (x) is false. Note that xp (x) is false if and only there exists no element in the domain for which P (x) is true. But this holds if and only if for all elements in the domain we have P (x) is false; which is the same as for all elements in the domain we have P (x) is true. The latter holds if and only if x P (x) is true.

38 Practice Exercises 1 What are the negatons of the following statements: There is an honest politician. All americans eat cheeseburgers. 2 What are the negations of x(x 2 > x) and x(x 2 = 2)? 3 Show that x(p (x) Q(x)) and x(p (x) Q(x)) are logically equivalent. Solutions in the textbook s page 41.

39 Example from Lewis Caroll s book Symbolic Logic Consider these statements (two premises followed by a conclusion): All lions are fierce. Some lions do not drink coffee. Some fierce creatures do not drink coffee. Assume that the domain is the set of all creatures and P (x) = x is a lion, Q(x) = x is fierce, R(x) = x drinks coffee. Exercise: Express the above statements using P (x), Q(x) and R(x), under the domain of all creatures. Is the conclusion a valid consequence of the premises? In this case, yes. (See more on this type of derivation, in a future lecture on Rules of Inference).

40 Nested Quantifiers Nested Quantifiers Two quantifiers are nested if one is in the scope of the other. Everything within the scope of a quantifier can be thought of as a propositional function. For instance, x y(x + y = 0) is the same as xq(x), where Q(x) is y(x + y = 0).

41 Nested Quantifiers The order of quantifiers Let P (x, y) be the statement x + y = y + x. Consider the following: x yp (x, y) and y xp (x, y). What is the meaning of each of these statements? What is the truth value of each of these statements? Are they equivalent? Let Q(x, y) be the statement x + y = 0. Consider the following: y xq(x, y) and x yq(x, y). What is the meaning of each of these statements? What is the truth value of each of these statements? Are they equivalent?

42 Nested Quantifiers Summary of quantification of two variables statement when true? when false? x yp (x, y) P (x, y) is true There is a pair x, y for y xp (x, y) for every pair x, y. which P (x, y) is false x yp (x, y) For every x there is y There is an x such that for which P (x, y) is true P (x, y) is false for every y x yp (x, y) There is an x for which For every x there is a y P (x, y) is true for every y for which P (x, y) is false. x yp (x, y) There is a pair x, y P (x, y) is false y xp (x, y) for which P (x, y) is true for every pair x, y.

43 Nested Quantifiers Translating Math Statements into Nested quantifiers Translate the following statements: 1 The sum of two positive integers is always positive. 2 Every real number except zero has a multiplicative inverse. (a multiplicative inverse of x is y such that xy = 1). 3 Every positive integer is the sum of the squares of four integers.

44 Nested Quantifiers Translating from Nested Quantifiers into English Let C(x) denote x has a computer and F (x, y) be x and y are friends., and the domain be all students in your school. Translate: 1 x(c(x) y(c(y) F (x, y)). 2 x y z((f (x, y) F (x, z) (y z)) F (y, z))

45 Nested Quantifiers Translating from English into Nested Quantifiers 1 If a person is female and is a parent, then this person is someone s mother. 2 Everyone has exactly one best friend. 3 There is a woman who has taken a flight on every airline of the world.

46 Nested Quantifiers Negating Nested Quantifiers Express the negation of the following statements, so that no negation precedes a quantifier (apply DeMorgan successively): x y(xy = 1) x yp (x, y) x yq(x, y) x y(p (x, y) zr(x, y, z))

47 Using Predicate Calculus Predicate calculus in Mathematical Reasoning Using predicates to express definitions. D(x) = x is a prime number (defined term) P (x) = x 2 and the only divisors of x are 1 and x (defining property about x) Definition of prime number: x(d(x) P (x)) Note that definitions in English form use if instead of if and only if, but we really mean if and only if.

48 Using Predicate Calculus Predicate calculus in Mathematical Reasoning (cont d) Let P (n, x, y, z) be the predicate x n + y n = z n. 1 Write the following statements in predicate logic, using the domain of positive integers: For every integer n > 2, there does not exist positive integers x, y and z such that x n + y n = z n. 2 Negate the previous statement, and simplify it so that no negation precedes a quantifier. 3 What needs to be found in order to give a counter example to 1? 4 Which famous theorem is expressed in 1, who proved and when?

49 Using Predicate Calculus Predicate calculus in Program Verification: a toy example The following program is designed to exchange the value of x and y: temp := x x := y y := temp Find preconditions, postconditions and verify its correctness. Precondition: P (x, y) is x = a and y = b, where a and b are the values of x and y before we execute these 3 statements.

50 Using Predicate Calculus Predicate calculus in Program Verification: a toy example The following program is designed to exchange the value of x and y: temp := x x := y y := temp Find preconditions, postconditions and verify its correctness. Precondition: P (x, y) is x = a and y = b, where a and b are the values of x and y before we execute these 3 statements. Postconditon: Q(x, y) is x = b and y = a.

51 Using Predicate Calculus Predicate calculus in Program Verification: a toy example The following program is designed to exchange the value of x and y: temp := x x := y y := temp Find preconditions, postconditions and verify its correctness. Precondition: P (x, y) is x = a and y = b, where a and b are the values of x and y before we execute these 3 statements. Postconditon: Q(x, y) is x = b and y = a. Assume P (x, y) holds before and show that Q(x, y) holds after.

52 Using Predicate Calculus Predicate calculus in Program Verification: a toy example The following program is designed to exchange the value of x and y: temp := x x := y y := temp Find preconditions, postconditions and verify its correctness. Precondition: P (x, y) is x = a and y = b, where a and b are the values of x and y before we execute these 3 statements. Postconditon: Q(x, y) is x = b and y = a. Assume P (x, y) holds before and show that Q(x, y) holds after. Originally x = a and y = b, by P (x, y).

53 Using Predicate Calculus Predicate calculus in Program Verification: a toy example The following program is designed to exchange the value of x and y: temp := x x := y y := temp Find preconditions, postconditions and verify its correctness. Precondition: P (x, y) is x = a and y = b, where a and b are the values of x and y before we execute these 3 statements. Postconditon: Q(x, y) is x = b and y = a. Assume P (x, y) holds before and show that Q(x, y) holds after. Originally x = a and y = b, by P (x, y). After step 1, x = a, temp = a and y = b.

54 Using Predicate Calculus Predicate calculus in Program Verification: a toy example The following program is designed to exchange the value of x and y: temp := x x := y y := temp Find preconditions, postconditions and verify its correctness. Precondition: P (x, y) is x = a and y = b, where a and b are the values of x and y before we execute these 3 statements. Postconditon: Q(x, y) is x = b and y = a. Assume P (x, y) holds before and show that Q(x, y) holds after. Originally x = a and y = b, by P (x, y). After step 1, x = a, temp = a and y = b. After step 2, x = b, temp = a and y = b.

55 Using Predicate Calculus Predicate calculus in Program Verification: a toy example The following program is designed to exchange the value of x and y: temp := x x := y y := temp Find preconditions, postconditions and verify its correctness. Precondition: P (x, y) is x = a and y = b, where a and b are the values of x and y before we execute these 3 statements. Postconditon: Q(x, y) is x = b and y = a. Assume P (x, y) holds before and show that Q(x, y) holds after. Originally x = a and y = b, by P (x, y). After step 1, x = a, temp = a and y = b. After step 2, x = b, temp = a and y = b. After step 3, x = b, temp = a and y = a.

56 Using Predicate Calculus Predicate calculus in Program Verification: a toy example The following program is designed to exchange the value of x and y: temp := x x := y y := temp Find preconditions, postconditions and verify its correctness. Precondition: P (x, y) is x = a and y = b, where a and b are the values of x and y before we execute these 3 statements. Postconditon: Q(x, y) is x = b and y = a. Assume P (x, y) holds before and show that Q(x, y) holds after. Originally x = a and y = b, by P (x, y). After step 1, x = a, temp = a and y = b. After step 2, x = b, temp = a and y = b. After step 3, x = b, temp = a and y = a. Therefore, after the program we know Q(x, y) holds.

57 Using Predicate Calculus Predicate calculus in System Specification Use predicates and quantifiers to express system specifications: 1 Every mail message larger than one megabyte will be compressed.

58 Using Predicate Calculus Predicate calculus in System Specification Use predicates and quantifiers to express system specifications: 1 Every mail message larger than one megabyte will be compressed. S(m, y): mail message m is larger than y megabytes

59 Using Predicate Calculus Predicate calculus in System Specification Use predicates and quantifiers to express system specifications: 1 Every mail message larger than one megabyte will be compressed. S(m, y): mail message m is larger than y megabytes C(m): mail message m will be compressed

60 Using Predicate Calculus Predicate calculus in System Specification Use predicates and quantifiers to express system specifications: 1 Every mail message larger than one megabyte will be compressed. S(m, y): mail message m is larger than y megabytes C(m): mail message m will be compressed m(s(m, 1) C(m))

61 Using Predicate Calculus Predicate calculus in System Specification Use predicates and quantifiers to express system specifications: 1 Every mail message larger than one megabyte will be compressed. S(m, y): mail message m is larger than y megabytes C(m): mail message m will be compressed m(s(m, 1) C(m)) 2 If a user is active, at least one network link will be available.

62 Using Predicate Calculus Predicate calculus in System Specification Use predicates and quantifiers to express system specifications: 1 Every mail message larger than one megabyte will be compressed. S(m, y): mail message m is larger than y megabytes C(m): mail message m will be compressed m(s(m, 1) C(m)) 2 If a user is active, at least one network link will be available. A(u): User u is active.

63 Using Predicate Calculus Predicate calculus in System Specification Use predicates and quantifiers to express system specifications: 1 Every mail message larger than one megabyte will be compressed. S(m, y): mail message m is larger than y megabytes C(m): mail message m will be compressed m(s(m, 1) C(m)) 2 If a user is active, at least one network link will be available. A(u): User u is active. S(n, x): Network n is in state x.

64 Using Predicate Calculus Predicate calculus in System Specification Use predicates and quantifiers to express system specifications: 1 Every mail message larger than one megabyte will be compressed. S(m, y): mail message m is larger than y megabytes C(m): mail message m will be compressed m(s(m, 1) C(m)) 2 If a user is active, at least one network link will be available. A(u): User u is active. S(n, x): Network n is in state x. ua(u) ns(n, available)

65 Using Predicate Calculus Predicate calculus in Logic Programming Prolog is a declarative language based in predicate logic. The program is expressed as Prolog facts and Prolog rules. Execution is triggered by running queries over these relations. mother_child(trude, sally). father_child(tom, sally). father_child(tom, erica). father_child(mike, tom). sibling(x, Y) :- parent_child(z, X), parent_child(z, Y). parent_child(x, Y) :- father_child(x, Y). parent_child(x, Y) :- mother_child(x, Y). The result of the following query is given:?- sibling(sally, erica). Yes

### Predicate Logic. Example: All men are mortal. Socrates is a man. Socrates is mortal.

Predicate Logic Example: All men are mortal. Socrates is a man. Socrates is mortal. Note: We need logic laws that work for statements involving quantities like some and all. In English, the predicate is

### Propositional Logic. A proposition is a declarative sentence (a sentence that declares a fact) that is either true or false, but not both.

irst Order Logic Propositional Logic A proposition is a declarative sentence (a sentence that declares a fact) that is either true or false, but not both. Are the following sentences propositions? oronto

### Predicate Calculus. There are certain arguments that seem to be perfectly logical, yet they cannot be expressed by using propositional calculus.

Predicate Calculus (Alternative names: predicate logic, first order logic, elementary logic, restricted predicate calculus, restricted functional calculus, relational calculus, theory of quantification,

### The Foundations: Logic and Proofs. Chapter 1, Part III: Proofs

The Foundations: Logic and Proofs Chapter 1, Part III: Proofs Rules of Inference Section 1.6 Section Summary Valid Arguments Inference Rules for Propositional Logic Using Rules of Inference to Build Arguments

### Handout #1: Mathematical Reasoning

Math 101 Rumbos Spring 2010 1 Handout #1: Mathematical Reasoning 1 Propositional Logic A proposition is a mathematical statement that it is either true or false; that is, a statement whose certainty or

### 2. Methods of Proof Types of Proofs. Suppose we wish to prove an implication p q. Here are some strategies we have available to try.

2. METHODS OF PROOF 69 2. Methods of Proof 2.1. Types of Proofs. Suppose we wish to prove an implication p q. Here are some strategies we have available to try. Trivial Proof: If we know q is true then

### CHAPTER 3. Methods of Proofs. 1. Logical Arguments and Formal Proofs

CHAPTER 3 Methods of Proofs 1. Logical Arguments and Formal Proofs 1.1. Basic Terminology. An axiom is a statement that is given to be true. A rule of inference is a logical rule that is used to deduce

### Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson

Mathematics for Computer Science/Software Engineering Notes for the course MSM1F3 Dr. R. A. Wilson October 1996 Chapter 1 Logic Lecture no. 1. We introduce the concept of a proposition, which is a statement

### Rules of Inference Friday, January 18, 2013 Chittu Tripathy Lecture 05

Rules of Inference Today s Menu Rules of Inference Quantifiers: Universal and Existential Nesting of Quantifiers Applications Old Example Re-Revisited Our Old Example: Suppose we have: All human beings

### Problems on Discrete Mathematics 1

Problems on Discrete Mathematics 1 Chung-Chih Li 2 Kishan Mehrotra 3 Syracuse University, New York L A TEX at January 11, 2007 (Part I) 1 No part of this book can be reproduced without permission from

### Invalidity in Predicate Logic

Invalidity in Predicate Logic So far we ve got a method for establishing that a predicate logic argument is valid: do a derivation. But we ve got no method for establishing invalidity. In propositional

### Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products

Chapter 3 Cartesian Products and Relations The material in this chapter is the first real encounter with abstraction. Relations are very general thing they are a special type of subset. After introducing

### Math 3000 Section 003 Intro to Abstract Math Homework 2

Math 3000 Section 003 Intro to Abstract Math Homework 2 Department of Mathematical and Statistical Sciences University of Colorado Denver, Spring 2012 Solutions (February 13, 2012) Please note that these

### 3. Mathematical Induction

3. MATHEMATICAL INDUCTION 83 3. Mathematical Induction 3.1. First Principle of Mathematical Induction. Let P (n) be a predicate with domain of discourse (over) the natural numbers N = {0, 1,,...}. If (1)

### Math 55: Discrete Mathematics

Math 55: Discrete Mathematics UC Berkeley, Fall 2011 Homework # 1, due Wedneday, January 25 1.1.10 Let p and q be the propositions The election is decided and The votes have been counted, respectively.

### Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2

CS 70 Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2 Proofs Intuitively, the concept of proof should already be familiar We all like to assert things, and few of us

### Discrete Mathematics Lecture 3 Elementary Number Theory and Methods of Proof. Harper Langston New York University

Discrete Mathematics Lecture 3 Elementary Number Theory and Methods of Proof Harper Langston New York University Proof and Counterexample Discovery and proof Even and odd numbers number n from Z is called

### Announcements. CompSci 230 Discrete Math for Computer Science Sets. Introduction to Sets. Sets

CompSci 230 Discrete Math for Computer Science Sets September 12, 2013 Prof. Rodger Slides modified from Rosen 1 nnouncements Read for next time Chap. 2.3-2.6 Homework 2 due Tuesday Recitation 3 on Friday

### Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.

Elementary Number Theory and Methods of Proof CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.edu/~cse215 1 Number theory Properties: 2 Properties of integers (whole

### Semantics for the Predicate Calculus: Part I

Semantics for the Predicate Calculus: Part I (Version 0.3, revised 6:15pm, April 14, 2005. Please report typos to hhalvors@princeton.edu.) The study of formal logic is based on the fact that the validity

### Introduction to Proofs

Chapter 1 Introduction to Proofs 1.1 Preview of Proof This section previews many of the key ideas of proof and cites [in brackets] the sections where they are discussed thoroughly. All of these ideas are

### def: An axiom is a statement that is assumed to be true, or in the case of a mathematical system, is used to specify the system.

Section 1.5 Methods of Proof 1.5.1 1.5 METHODS OF PROOF Some forms of argument ( valid ) never lead from correct statements to an incorrect. Some other forms of argument ( fallacies ) can lead from true

### Section 6-2 Mathematical Induction

6- Mathematical Induction 457 In calculus, it can be shown that e x k0 x k k! x x x3!! 3!... xn n! where the larger n is, the better the approximation. Problems 6 and 6 refer to this series. Note that

### Predicate Logic Review

Predicate Logic Review UC Berkeley, Philosophy 142, Spring 2016 John MacFarlane 1 Grammar A term is an individual constant or a variable. An individual constant is a lowercase letter from the beginning

### CS 441 Discrete Mathematics for CS Lecture 5. Predicate logic. CS 441 Discrete mathematics for CS. Negation of quantifiers

CS 441 Discrete Mathematics for CS Lecture 5 Predicate logic Milos Hauskrecht milos@cs.pitt.edu 5329 Sennott Square Negation of quantifiers English statement: Nothing is perfect. Translation: x Perfect(x)

### The last three chapters introduced three major proof techniques: direct,

CHAPTER 7 Proving Non-Conditional Statements The last three chapters introduced three major proof techniques: direct, contrapositive and contradiction. These three techniques are used to prove statements

### Predicate Logic. For example, consider the following argument:

Predicate Logic The analysis of compound statements covers key aspects of human reasoning but does not capture many important, and common, instances of reasoning that are also logically valid. For example,

### Logic in Computer Science: Logic Gates

Logic in Computer Science: Logic Gates Lila Kari The University of Western Ontario Logic in Computer Science: Logic Gates CS2209, Applied Logic for Computer Science 1 / 49 Logic and bit operations Computers

### SECTION 10-2 Mathematical Induction

73 0 Sequences and Series 6. Approximate e 0. using the first five terms of the series. Compare this approximation with your calculator evaluation of e 0.. 6. Approximate e 0.5 using the first five terms

### Quotient Rings and Field Extensions

Chapter 5 Quotient Rings and Field Extensions In this chapter we describe a method for producing field extension of a given field. If F is a field, then a field extension is a field K that contains F.

Lecture Notes in Discrete Mathematics Marcel B. Finan Arkansas Tech University c All Rights Reserved 2 Preface This book is designed for a one semester course in discrete mathematics for sophomore or junior

### (LMCS, p. 317) V.1. First Order Logic. This is the most powerful, most expressive logic that we will examine.

(LMCS, p. 317) V.1 First Order Logic This is the most powerful, most expressive logic that we will examine. Our version of first-order logic will use the following symbols: variables connectives (,,,,

### GROUPS SUBGROUPS. Definition 1: An operation on a set G is a function : G G G.

Definition 1: GROUPS An operation on a set G is a function : G G G. Definition 2: A group is a set G which is equipped with an operation and a special element e G, called the identity, such that (i) the

### PART I. THE REAL NUMBERS

PART I. THE REAL NUMBERS This material assumes that you are already familiar with the real number system and the representation of the real numbers as points on the real line. I.1. THE NATURAL NUMBERS

### MAT-71506 Program Verication: Exercises

MAT-71506 Program Verication: Exercises Antero Kangas Tampere University of Technology Department of Mathematics September 11, 2014 Accomplishment Exercises are obligatory and probably the grades will

### Mathematical Induction

Mathematical Induction (Handout March 8, 01) The Principle of Mathematical Induction provides a means to prove infinitely many statements all at once The principle is logical rather than strictly mathematical,

### Mathematical Induction

Mathematical Induction In logic, we often want to prove that every member of an infinite set has some feature. E.g., we would like to show: N 1 : is a number 1 : has the feature Φ ( x)(n 1 x! 1 x) How

### 4.1. Definitions. A set may be viewed as any well defined collection of objects, called elements or members of the set.

Section 4. Set Theory 4.1. Definitions A set may be viewed as any well defined collection of objects, called elements or members of the set. Sets are usually denoted with upper case letters, A, B, X, Y,

### Applications of Methods of Proof

CHAPTER 4 Applications of Methods of Proof 1. Set Operations 1.1. Set Operations. The set-theoretic operations, intersection, union, and complementation, defined in Chapter 1.1 Introduction to Sets are

### Sections 2.1, 2.2 and 2.4

SETS Sections 2.1, 2.2 and 2.4 Chapter Summary Sets The Language of Sets Set Operations Set Identities Introduction Sets are one of the basic building blocks for the types of objects considered in discrete

### Homework 5 Solutions

Homework 5 Solutions 4.2: 2: a. 321 = 256 + 64 + 1 = (01000001) 2 b. 1023 = 512 + 256 + 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = (1111111111) 2. Note that this is 1 less than the next power of 2, 1024, which

### MATHEMATICAL INDUCTION. Mathematical Induction. This is a powerful method to prove properties of positive integers.

MATHEMATICAL INDUCTION MIGUEL A LERMA (Last updated: February 8, 003) Mathematical Induction This is a powerful method to prove properties of positive integers Principle of Mathematical Induction Let P

### INTRODUCTORY SET THEORY

M.Sc. program in mathematics INTRODUCTORY SET THEORY Katalin Károlyi Department of Applied Analysis, Eötvös Loránd University H-1088 Budapest, Múzeum krt. 6-8. CONTENTS 1. SETS Set, equal sets, subset,

### Chapter 7. Functions and onto. 7.1 Functions

Chapter 7 Functions and onto This chapter covers functions, including function composition and what it means for a function to be onto. In the process, we ll see what happens when two dissimilar quantifiers

### 4 Domain Relational Calculus

4 Domain Relational Calculus We now present two relational calculi that we will compare to RA. First, what is the difference between an algebra and a calculus? The usual story is that the algebra RA is

### Boolean Algebra Part 1

Boolean Algebra Part 1 Page 1 Boolean Algebra Objectives Understand Basic Boolean Algebra Relate Boolean Algebra to Logic Networks Prove Laws using Truth Tables Understand and Use First Basic Theorems

### Logic is a systematic way of thinking that allows us to deduce new information

CHAPTER 2 Logic Logic is a systematic way of thinking that allows us to deduce new information from old information and to parse the meanings of sentences. You use logic informally in everyday life and

### Continued Fractions and the Euclidean Algorithm

Continued Fractions and the Euclidean Algorithm Lecture notes prepared for MATH 326, Spring 997 Department of Mathematics and Statistics University at Albany William F Hammond Table of Contents Introduction

### Lecture 16 : Relations and Functions DRAFT

CS/Math 240: Introduction to Discrete Mathematics 3/29/2011 Lecture 16 : Relations and Functions Instructor: Dieter van Melkebeek Scribe: Dalibor Zelený DRAFT In Lecture 3, we described a correspondence

### Discrete Mathematics: Solutions to Homework (12%) For each of the following sets, determine whether {2} is an element of that set.

Discrete Mathematics: Solutions to Homework 2 1. (12%) For each of the following sets, determine whether {2} is an element of that set. (a) {x R x is an integer greater than 1} (b) {x R x is the square

### The Language of Mathematics

CHPTER 2 The Language of Mathematics 2.1. Set Theory 2.1.1. Sets. set is a collection of objects, called elements of the set. set can be represented by listing its elements between braces: = {1, 2, 3,

### Propositional Logic. Definition: A proposition or statement is a sentence which is either true or false.

Propositional Logic Definition: A proposition or statement is a sentence which is either true or false. Definition:If a proposition is true, then we say its truth value is true, and if a proposition is

### Proofs are short works of prose and need to be written in complete sentences, with mathematical symbols used where appropriate.

Advice for homework: Proofs are short works of prose and need to be written in complete sentences, with mathematical symbols used where appropriate. Even if a problem is a simple exercise that doesn t

### CHAPTER 1. Logic, Proofs Propositions

CHAPTER 1 Logic, Proofs 1.1. Propositions A proposition is a declarative sentence that is either true or false (but not both). For instance, the following are propositions: Paris is in France (true), London

### Math 319 Problem Set #3 Solution 21 February 2002

Math 319 Problem Set #3 Solution 21 February 2002 1. ( 2.1, problem 15) Find integers a 1, a 2, a 3, a 4, a 5 such that every integer x satisfies at least one of the congruences x a 1 (mod 2), x a 2 (mod

### WHAT ARE MATHEMATICAL PROOFS AND WHY THEY ARE IMPORTANT?

WHAT ARE MATHEMATICAL PROOFS AND WHY THEY ARE IMPORTANT? introduction Many students seem to have trouble with the notion of a mathematical proof. People that come to a course like Math 216, who certainly

### a 1 x + a 0 =0. (3) ax 2 + bx + c =0. (4)

ROOTS OF POLYNOMIAL EQUATIONS In this unit we discuss polynomial equations. A polynomial in x of degree n, where n 0 is an integer, is an expression of the form P n (x) =a n x n + a n 1 x n 1 + + a 1 x

### Math 4310 Handout - Quotient Vector Spaces

Math 4310 Handout - Quotient Vector Spaces Dan Collins The textbook defines a subspace of a vector space in Chapter 4, but it avoids ever discussing the notion of a quotient space. This is understandable

### 8 Divisibility and prime numbers

8 Divisibility and prime numbers 8.1 Divisibility In this short section we extend the concept of a multiple from the natural numbers to the integers. We also summarize several other terms that express

### 6.080/6.089 GITCS Feb 12, 2008. Lecture 3

6.8/6.89 GITCS Feb 2, 28 Lecturer: Scott Aaronson Lecture 3 Scribe: Adam Rogal Administrivia. Scribe notes The purpose of scribe notes is to transcribe our lectures. Although I have formal notes of my

### No Solution Equations Let s look at the following equation: 2 +3=2 +7

5.4 Solving Equations with Infinite or No Solutions So far we have looked at equations where there is exactly one solution. It is possible to have more than solution in other types of equations that are

### We now explore a third method of proof: proof by contradiction.

CHAPTER 6 Proof by Contradiction We now explore a third method of proof: proof by contradiction. This method is not limited to proving just conditional statements it can be used to prove any kind of statement

### 2.1 Sets, power sets. Cartesian Products.

Lecture 8 2.1 Sets, power sets. Cartesian Products. Set is an unordered collection of objects. - used to group objects together, - often the objects with similar properties This description of a set (without

### Elementary Number Theory We begin with a bit of elementary number theory, which is concerned

CONSTRUCTION OF THE FINITE FIELDS Z p S. R. DOTY Elementary Number Theory We begin with a bit of elementary number theory, which is concerned solely with questions about the set of integers Z = {0, ±1,

### Discrete Mathematics and Probability Theory Fall 2009 Satish Rao,David Tse Note 11

CS 70 Discrete Mathematics and Probability Theory Fall 2009 Satish Rao,David Tse Note Conditional Probability A pharmaceutical company is marketing a new test for a certain medical condition. According

### CHAPTER 2. Logic. 1. Logic Definitions. Notation: Variables are used to represent propositions. The most common variables used are p, q, and r.

CHAPTER 2 Logic 1. Logic Definitions 1.1. Propositions. Definition 1.1.1. A proposition is a declarative sentence that is either true (denoted either T or 1) or false (denoted either F or 0). Notation:

### Chapter 1. Use the following to answer questions 1-5: In the questions below determine whether the proposition is TRUE or FALSE

Use the following to answer questions 1-5: Chapter 1 In the questions below determine whether the proposition is TRUE or FALSE 1. 1 + 1 = 3 if and only if 2 + 2 = 3. 2. If it is raining, then it is raining.

### Subjects, Predicates and The Universal Quantifier

Introduction to Logic Week Sixteen: 14 Jan., 2008 Subjects, Predicates and The Universal Quantifier 000. Office Hours this term: Tuesdays and Wednesdays 1-2, or by appointment; 5B-120. 00. Results from

### Cartesian Products and Relations

Cartesian Products and Relations Definition (Cartesian product) If A and B are sets, the Cartesian product of A and B is the set A B = {(a, b) :(a A) and (b B)}. The following points are worth special

### Rigorous Software Development CSCI-GA 3033-009

Rigorous Software Development CSCI-GA 3033-009 Instructor: Thomas Wies Spring 2013 Lecture 11 Semantics of Programming Languages Denotational Semantics Meaning of a program is defined as the mathematical

### Solutions to Homework 6 Mathematics 503 Foundations of Mathematics Spring 2014

Solutions to Homework 6 Mathematics 503 Foundations of Mathematics Spring 2014 3.4: 1. If m is any integer, then m(m + 1) = m 2 + m is the product of m and its successor. That it to say, m 2 + m is the

### Florida State University Course Notes MAD 2104 Discrete Mathematics I

Florida State University Course Notes MAD 2104 Discrete Mathematics I Florida State University Tallahassee, Florida 32306-4510 Copyright c 2011 Florida State University Written by Dr. John Bryant and Dr.

### An Innocent Investigation

An Innocent Investigation D. Joyce, Clark University January 2006 The beginning. Have you ever wondered why every number is either even or odd? I don t mean to ask if you ever wondered whether every number

### CONTENTS 1. Peter Kahn. Spring 2007

CONTENTS 1 MATH 304: CONSTRUCTING THE REAL NUMBERS Peter Kahn Spring 2007 Contents 2 The Integers 1 2.1 The basic construction.......................... 1 2.2 Adding integers..............................

### Formal Languages and Automata Theory - Regular Expressions and Finite Automata -

Formal Languages and Automata Theory - Regular Expressions and Finite Automata - Samarjit Chakraborty Computer Engineering and Networks Laboratory Swiss Federal Institute of Technology (ETH) Zürich March

### Mathematical Induction. Lecture 10-11

Mathematical Induction Lecture 10-11 Menu Mathematical Induction Strong Induction Recursive Definitions Structural Induction Climbing an Infinite Ladder Suppose we have an infinite ladder: 1. We can reach

### Chapter 4. Polynomial and Rational Functions. 4.1 Polynomial Functions and Their Graphs

Chapter 4. Polynomial and Rational Functions 4.1 Polynomial Functions and Their Graphs A polynomial function of degree n is a function of the form P = a n n + a n 1 n 1 + + a 2 2 + a 1 + a 0 Where a s

### 1 Propositional Logic

1 Propositional Logic Propositions 1.1 Definition A declarative sentence is a sentence that declares a fact or facts. Example 1 The earth is spherical. 7 + 1 = 6 + 2 x 2 > 0 for all real numbers x. 1 =

### x if x 0, x if x < 0.

Chapter 3 Sequences In this chapter, we discuss sequences. We say what it means for a sequence to converge, and define the limit of a convergent sequence. We begin with some preliminary results about the

### 2.1 The Algebra of Sets

Chapter 2 Abstract Algebra 83 part of abstract algebra, sets are fundamental to all areas of mathematics and we need to establish a precise language for sets. We also explore operations on sets and relations

### So let us begin our quest to find the holy grail of real analysis.

1 Section 5.2 The Complete Ordered Field: Purpose of Section We present an axiomatic description of the real numbers as a complete ordered field. The axioms which describe the arithmetic of the real numbers

### You know from calculus that functions play a fundamental role in mathematics.

CHPTER 12 Functions You know from calculus that functions play a fundamental role in mathematics. You likely view a function as a kind of formula that describes a relationship between two (or more) quantities.

### Basic Set Theory. Chapter Set Theory. can be written: A set is a Many that allows itself to be thought of as a One.

Chapter Basic Set Theory A set is a Many that allows itself to be thought of as a One. - Georg Cantor This chapter introduces set theory, mathematical induction, and formalizes the notion of mathematical

### z = i ± 9 2 2 so z = 2i or z = i are the solutions. (c) z 4 + 2z 2 + 4 = 0. By the quadratic formula,

91 Homework 8 solutions Exercises.: 18. Show that Z[i] is an integral domain, describe its field of fractions and find the units. There are two ways to show it is an integral domain. The first is to observe:

### MODULAR ARITHMETIC. a smallest member. It is equivalent to the Principle of Mathematical Induction.

MODULAR ARITHMETIC 1 Working With Integers The usual arithmetic operations of addition, subtraction and multiplication can be performed on integers, and the result is always another integer Division, on

### 4.5 Linear Dependence and Linear Independence

4.5 Linear Dependence and Linear Independence 267 32. {v 1, v 2 }, where v 1, v 2 are collinear vectors in R 3. 33. Prove that if S and S are subsets of a vector space V such that S is a subset of S, then

### PUTNAM TRAINING POLYNOMIALS. Exercises 1. Find a polynomial with integral coefficients whose zeros include 2 + 5.

PUTNAM TRAINING POLYNOMIALS (Last updated: November 17, 2015) Remark. This is a list of exercises on polynomials. Miguel A. Lerma Exercises 1. Find a polynomial with integral coefficients whose zeros include

### Worksheet on induction Calculus I Fall 2006 First, let us explain the use of for summation. The notation

Worksheet on induction MA113 Calculus I Fall 2006 First, let us explain the use of for summation. The notation f(k) means to evaluate the function f(k) at k = 1, 2,..., n and add up the results. In other

### Predicate logic Proofs Artificial intelligence. Predicate logic. SET07106 Mathematics for Software Engineering

Predicate logic SET07106 Mathematics for Software Engineering School of Computing Edinburgh Napier University Module Leader: Uta Priss 2010 Copyright Edinburgh Napier University Predicate logic Slide 1/24

### Mathematical induction. Niloufar Shafiei

Mathematical induction Niloufar Shafiei Mathematical induction Mathematical induction is an extremely important proof technique. Mathematical induction can be used to prove results about complexity of

### CLASS 3, GIVEN ON 9/27/2010, FOR MATH 25, FALL 2010

CLASS 3, GIVEN ON 9/27/2010, FOR MATH 25, FALL 2010 1. Greatest common divisor Suppose a, b are two integers. If another integer d satisfies d a, d b, we call d a common divisor of a, b. Notice that as

### APPLICATIONS OF THE ORDER FUNCTION

APPLICATIONS OF THE ORDER FUNCTION LECTURE NOTES: MATH 432, CSUSM, SPRING 2009. PROF. WAYNE AITKEN In this lecture we will explore several applications of order functions including formulas for GCDs and

### CS510 Software Engineering

CS510 Software Engineering Propositional Logic Asst. Prof. Mathias Payer Department of Computer Science Purdue University TA: Scott A. Carr Slides inspired by Xiangyu Zhang http://nebelwelt.net/teaching/15-cs510-se

### Midterm Practice Problems

6.042/8.062J Mathematics for Computer Science October 2, 200 Tom Leighton, Marten van Dijk, and Brooke Cowan Midterm Practice Problems Problem. [0 points] In problem set you showed that the nand operator

### Chapter 4, Arithmetic in F [x] Polynomial arithmetic and the division algorithm.

Chapter 4, Arithmetic in F [x] Polynomial arithmetic and the division algorithm. We begin by defining the ring of polynomials with coefficients in a ring R. After some preliminary results, we specialize

### Notes on Factoring. MA 206 Kurt Bryan

The General Approach Notes on Factoring MA 26 Kurt Bryan Suppose I hand you n, a 2 digit integer and tell you that n is composite, with smallest prime factor around 5 digits. Finding a nontrivial factor

### E3: PROBABILITY AND STATISTICS lecture notes

E3: PROBABILITY AND STATISTICS lecture notes 2 Contents 1 PROBABILITY THEORY 7 1.1 Experiments and random events............................ 7 1.2 Certain event. Impossible event............................

### 1 Propositions. mcs-ftl 2010/9/8 0:40 page 5 #11. Definition. A proposition is a statement that is either true or false.

mcs-ftl 2010/9/8 0:40 page 5 #11 1 Propositions Definition. A proposition is a statement that is either true or false. For example, both of the following statements are propositions. The first is true