Mathematical Logic Part Two

Size: px
Start display at page:

Download "Mathematical Logic Part Two"

Transcription

1 Mathematical Logic Part Two

2 Recap from Last Time

3 Recap So Far A propositional variable a variable that either true or false. The propositional connectives are as follows: Negation: p Conjunction: p q Djunction: p q Implication: p q Biconditional: p q True: False:

4 Take out a sheet of paper!

5 What's the truth table for the connective?

6 What's the negation of p q?

7 New Stuff!

8 First-Order Logic

9 What First-Order Logic? First-order logic a logical system for reasoning about properties of objects. Augments the logical connectives from propositional logic with predicates that describe properties of objects, functions that map objects to one another, and quantifiers that allow us to reason about multiple objects.

10 Some Examples

11 Likes(You, ComicBooks) Likes(You, GoodMovies) Likes(You, AwesomeWomenInTech) Likes(You, BlackPanther) Learns(You, Htory) ForeverRepeats(You, Htory) DrinksTooMuch(Me) IsAnIssue(That) IsOkay(Me)

12 Likes(You, Eggs) Likes(You, Tomato) Likes(You, Shakshuka) Learns(You, Htory) ForeverRepeats(You, Htory) In(MyHeart, Havana) TookBackTo(Him, Me, EastAtlanta)

13 Likes(You, Eggs) Likes(You, Tomato) Likes(You, Shakshuka) Learns(You, Htory) ForeverRepeats(You, Htory) In(MyHeart, Havana) TookBackTo(Him, Me, EastAtlanta)

14 Likes(You, Eggs) Likes(You, Tomato) Likes(You, Shakshuka) Learns(You, Htory) ForeverRepeats(You, Htory) In(MyHeart, Havana) TookBackTo(Him, Me, EastAtlanta) These These blue blue terms terms are are called called constant constant symbols. symbols. Unlike Unlike propositional propositional variables, variables, they they refer refer to to objects, objects, not not propositions. propositions.

15 Likes(You, Eggs) Likes(You, Tomato) Likes(You, Shakshuka) Learns(You, Htory) ForeverRepeats(You, Htory) In(MyHeart, Havana) TookBackTo(Him, Me, EastAtlanta)

16 Likes(You, Eggs) Likes(You, Tomato) Likes(You, Shakshuka) Learns(You, Htory) ForeverRepeats(You, Htory) In(MyHeart, Havana) TookBackTo(Him, Me, EastAtlanta) The The red red things things that that look look like like function function calls calls are are called called predicates. predicates. Predicates Predicates take take objects objects as as arguments arguments and and evaluate evaluate to to true true or or false. false.

17 Likes(You, Eggs) Likes(You, Tomato) Likes(You, Shakshuka) Learns(You, Htory) ForeverRepeats(You, Htory) In(MyHeart, Havana) TookBackTo(Him, Me, EastAtlanta)

18 Likes(You, Eggs) Likes(You, Tomato) Likes(You, Shakshuka) Learns(You, Htory) ForeverRepeats(You, Htory) In(MyHeart, Havana) TookBackTo(Him, Me, EastAtlanta) What What remains remains are are traditional traditional propositional propositional connectives. connectives. Because Because each each predicate predicate evaluates evaluates to to true true or or false, false, we we can can connect connect the the truth truth values values of of predicates predicates using using normal normal propositional propositional connectives. connectives.

19 Reasoning about Objects To reason about objects, first-order logic uses predicates. Examples: Cute(Quokka) Likes(DrLee, CS103) Likes(DrLee, Quokka) Cute(Mosquito) Likes(DrLee, Mosquito) Applying a predicate to arguments produces a proposition, which either true or false. Typically, when you re working in FOL, you ll have a lt of predicates, what they stand for, and how many arguments they take. It ll be given separately than the formulas you write.

20 First-Order Sentences Sentences in first-order logic can be constructed from predicates applied to objects: Cute(a) Dikdik(a) Kitty(a) Puppy(a) Succeeds(You) Practices(You) x < 8 x < 137 The The less-than less-than sign sign just just another another predicate. predicate. Binary Binary predicates predicates are are sometimes sometimes written written in in infix infix notation notation th th way. way. Numbers Numbers are are not not built built in in to to first-order first-order logic. logic. They re They re constant constant symbols symbols just just like like You You and and a a above. above.

21 Equality First-order logic equipped with a special predicate = that says whether two objects are equal to one another. Equality a part of first-order logic, just as and are. Examples: TomMarvoloRiddle = LordVoldemort MorningStar = EveningStar Equality can only be applied to objects; to state that two propositions are equal, use.

22 Let's see some more examples.

23 FavoriteMovieOf(You) FavoriteMovieOf(Date) StarOf(FavoriteMovieOf(You)) = StarOf(FavoriteMovieOf(Date))

24 FavoriteMovieOf(You) FavoriteMovieOf(Date) StarOf(FavoriteMovieOf(You)) = StarOf(FavoriteMovieOf(Date))

25 FavoriteMovieOf(You) FavoriteMovieOf(Date) StarOf(FavoriteMovieOf(You)) = StarOf(FavoriteMovieOf(Date))

26 FavoriteMovieOf(You) FavoriteMovieOf(Date) StarOf(FavoriteMovieOf(You)) = StarOf(FavoriteMovieOf(Date))

27 FavoriteMovieOf(You) FavoriteMovieOf(Date) StarOf(FavoriteMovieOf(You)) = StarOf(FavoriteMovieOf(Date)) These These purple purple terms terms are are functions. functions. Functions Functions take take objects objects as as input input and and produce produce objects objects as as output. output.

28 FavoriteMovieOf(You) FavoriteMovieOf(Date) StarOf(FavoriteMovieOf(You)) = StarOf(FavoriteMovieOf(Date))

29 FavoriteMovieOf(You) FavoriteMovieOf(Date) StarOf(FavoriteMovieOf(You)) = StarOf(FavoriteMovieOf(Date))

30 FavoriteMovieOf(You) FavoriteMovieOf(Date) StarOf(FavoriteMovieOf(You)) = StarOf(FavoriteMovieOf(Date))

31 Functions First-order logic allows functions that return objects associated with other objects. Examples: ColorOf(Sky) MedianOf(x, y, z) x + y As with predicates, functions can take in any number of arguments, but always return a single value. Functions evaluate to objects, not propositions.

32 Objects and Predicates When working in first-order logic, be careful to keep objects (actual things) and predicates (true or false) separate. You cannot apply connectives to objects: Venus TheSun You cannot apply functions to propositions: StarOf(IsRed(Sun) IsGreen(Mars)) Ever get confused? Just ask!

33 The Type-Checking Table operate on... and produce Connectives (,, etc.) propositions a proposition Predicates (=, etc.) objects a proposition Functions objects an object

34 Type Inference Consider Consider the the following following formula formula in in first-order first-order logic: logic: R(y) R(y) (S(x, (S(x, y) y) = T(x)) T(x)) Assuming Assuming that that th th formula formula syntactically syntactically correct, correct, which which of of R, R, S, S, and and T are are predicates predicates and and which which are are functions? functions? A. A. R R a a predicate, predicate, S S a a predicate, predicate, and and T T a a predicate. predicate. B. B. R R a a predicate, predicate, S S a a predicate, predicate, and and T T a a function. function. C. C. R R a a predicate, predicate, S S a a function, function, and and T T a a predicate. predicate. D. D. R R a a predicate, predicate, S S a a function, function, and and T T a a function. function. E. E. R R a a function, function, S S a a predicate, predicate, and and T T a a predicate. predicate. F. F. R R a a function, function, S S a a predicate, predicate, and and T T a a function. function. G. G. R R a a function, function, S S a a function, function, and and T T a a predicate. predicate. H. H. R R a a function, function, S S a a function, function, and and T T a a function. function. Answer Answer at at PollEv.com/cs103 PollEv.com/cs103 or or text text CS103 CS103 to to once once to to join, join, then then A, A, B, B, C, C,,, or or H. H.

35 One last (and major) change

36 Some muggle intelligent.

37 Some muggle intelligent. m. (Muggle(m) Intelligent(m))

38 Some muggle intelligent. m. (Muggle(m) Intelligent(m)) the the extential extential quantifier quantifier and and says says for for some some choice choice of of m, m, the the following following true. true.

39 The Extential Quantifier A statement of the form x. some-formula true if, for some choice of x, the statement some-formula true when that x plugged into it. Examples: x. (Even(x) Prime(x)) x. (TallerThan(x, me) LighterThan(x, me)) ( w. Will(w)) ( x. Way(x))

40 The Extential Quantifier x. Smiling(x)

41 The Extential Quantifier x. Smiling(x)

42 The Extential Quantifier x. Smiling(x)

43 The Extential Quantifier x. Smiling(x)

44 The Extential Quantifier x. Smiling(x)

45 The Extential Quantifier x. Smiling(x)

46 The Extential Quantifier x. Smiling(x)

47 The Extential Quantifier x. Smiling(x) Since Since Smiling(x) Smiling(x) true true for for some some choice choice of of x, x, th th statement statement evaluates evaluates to to true. true.

48 The Extential Quantifier x. Smiling(x) Since Since Smiling(x) Smiling(x) true true for for some some choice choice of of x, x, th th statement statement evaluates evaluates to to true. true.

49 The Extential Quantifier x. Smiling(x)

50 The Extential Quantifier x. Smiling(x)

51 The Extential Quantifier x. Smiling(x)

52 The Extential Quantifier x. Smiling(x)

53 The Extential Quantifier x. Smiling(x)

54 The Extential Quantifier x. Smiling(x)

55 The Extential Quantifier x. Smiling(x)

56 The Extential Quantifier x. Smiling(x) Since Since Smiling(x) Smiling(x) not not true true for for any any choice choice of of x, x, th th statement statement evaluates evaluates to to false. false.

57 The Extential Quantifier x. Smiling(x) Since Since Smiling(x) Smiling(x) not not true true for for any any choice choice of of x, x, th th statement statement evaluates evaluates to to false. false.

58 In In th th world, world, th th first-order first-order logic logic statement statement A. A. true. true. B. B. false. false. C. C. neither neither true true nor nor false. false. The Extential Quantifier Answer Answer at at PollEv.com/cs103 PollEv.com/cs103 or or text text CS103 CS103 to to once once to to join, join, then then A, A, B, B, or or C. C. ( x. Smiling(x)) ( y. WearingHat(y))

59 The Extential Quantifier ( x. Smiling(x)) ( y. WearingHat(y))

60 The Extential Quantifier Is Is th th part part of of the the statement statement true true or or false? false? ( x. Smiling(x)) ( y. WearingHat(y))

61 The Extential Quantifier Is Is th th part part of of the the statement statement true true or or false? false? ( x. Smiling(x)) ( y. WearingHat(y))

62 The Extential Quantifier ( x. Smiling(x)) ( y. WearingHat(y)) Is Is th th part part of of the the statement statement true true or or false? false?

63 The Extential Quantifier ( x. Smiling(x)) ( y. WearingHat(y)) Is Is th th part part of of the the statement statement true true or or false? false?

64 The Extential Quantifier Is Is th th overall overall statement statement true true or or false? false? ( x. Smiling(x)) ( y. WearingHat(y))

65 The Extential Quantifier Is Is th th overall overall statement statement true true or or false? false? ( x. Smiling(x)) ( y. WearingHat(y))

66 Fun with Edge Cases x. Smiling(x)

67 Fun with Edge Cases x. Smiling(x) Extentially-quantified Extentially-quantified statements statements are are false false in in an an empty empty world, world, since since it s it s not not possible possible to to choose choose an an object! object!

68 Some Technical Details

69 Variables and Quantifiers Each quantifier has two parts: the variable that introduced, and the statement that's being quantified. The variable introduced scoped just to the statement being quantified. ( x. Loves(You, x)) ( y. Loves(y, You))

70 Variables and Quantifiers Each quantifier has two parts: the variable that introduced, and the statement that's being quantified. The variable introduced scoped just to the statement being quantified. ( x. Loves(You, x)) ( y. Loves(y, You)) The The variable variable x x just just lives lives here. here. The The variable variable y y just just lives lives here. here.

71 Variables and Quantifiers Each quantifier has two parts: the variable that introduced, and the statement that's being quantified. The variable introduced scoped just to the statement being quantified. ( x. Loves(You, x)) ( y. Loves(y, You))

72 Variables and Quantifiers Each quantifier has two parts: the variable that introduced, and the statement that's being quantified. The variable introduced scoped just to the statement being quantified. ( x. Loves(You, x)) ( x. Loves(x, You))

73 Variables and Quantifiers Each quantifier has two parts: the variable that introduced, and the statement that's being quantified. The variable introduced scoped just to the statement being quantified. ( x. Loves(You, x)) ( x. Loves(x, You)) The The variable variable x x just just lives lives here. here. A different different variable, variable, also also named named x, x, just just lives lives here. here.

74 Operator Precedence (Again) When writing out a formula in first-order logic, quantifiers have precedence just below. The statement x. P(x) R(x) Q(x) parsed like th: ( x. P(x)) (R(x) Q(x)) Th syntactically invalid because the variable x out of scope in the back half of the formula. To ensure that x properly quantified, explicitly put parentheses around the region you want to quantify: x. (P(x) R(x) Q(x))

75 For any natural number n, n even iff n 2 even

76 For any natural number n, n even iff n 2 even n. (n N (Even(n) Even(n 2 )))

77 For any natural number n, n even iff n 2 even n. (n N (Even(n) Even(n 2 ))) the the universal universal quantifier quantifier and and says says for for any any choice choice of of n, n, the the following following true. true.

78 The Universal Quantifier A statement of the form x. some-formula true if, for every choice of x, the statement some-formula true when x plugged into it. Examples: p. (Puppy(p) Cute(p)) m. (IsMillennial(m) IsSpecial(m)) Tallest(SultanKösen) x. (SultanKösen x ShorterThan(x, SultanKösen))

79 The Universal Quantifier x. Smiling(x)

80 The Universal Quantifier x. Smiling(x)

81 The Universal Quantifier x. Smiling(x)

82 The Universal Quantifier x. Smiling(x)

83 The Universal Quantifier x. Smiling(x)

84 The Universal Quantifier x. Smiling(x)

85 The Universal Quantifier x. Smiling(x)

86 The Universal Quantifier x. Smiling(x) Since Since Smiling(x) Smiling(x) true true for for every every choice choice of of x, x, th th statement statement evaluates evaluates to to true. true.

87 The Universal Quantifier x. Smiling(x) Since Since Smiling(x) Smiling(x) true true for for every every choice choice of of x, x, th th statement statement evaluates evaluates to to true. true.

88 The Universal Quantifier x. Smiling(x)

89 The Universal Quantifier x. Smiling(x)

90 The Universal Quantifier x. Smiling(x)

91 The Universal Quantifier x. Smiling(x)

92 The Universal Quantifier x. Smiling(x) Since Since Smiling(x) Smiling(x) false false for for th th choice choice x, x, th th statement statement evaluates evaluates to to false. false.

93 The Universal Quantifier x. Smiling(x) Since Since Smiling(x) Smiling(x) false false for for th th choice choice x, x, th th statement statement evaluates evaluates to to false. false.

94 The Universal Quantifier ( x. Smiling(x)) ( y. WearingHat(y))

95 The Universal Quantifier ( x. Smiling(x)) ( y. WearingHat(y))

96 The Universal Quantifier ( x. Smiling(x)) ( y. WearingHat(y)) Is Is th th part part of of the the statement statement true true or or false? false?

97 The Universal Quantifier ( x. Smiling(x)) ( y. WearingHat(y)) Is Is th th part part of of the the statement statement true true or or false? false?

98 The Universal Quantifier Is Is th th part part of of the the statement statement true true or or false? false? ( x. Smiling(x)) ( y. WearingHat(y))

99 The Universal Quantifier Is Is th th part part of of the the statement statement true true or or false? false? ( x. Smiling(x)) ( y. WearingHat(y))

100 The Universal Quantifier ( x. Smiling(x)) ( y. WearingHat(y)) Is Is th th overall overall statement statement true true or or false false in in th th scenario? scenario?

101 The Universal Quantifier ( x. Smiling(x)) ( y. WearingHat(y)) Is Is th th overall overall statement statement true true or or false false in in th th scenario? scenario?

102 Fun with Edge Cases x. Smiling(x)

103 Fun with Edge Cases Universally-quantified Universally-quantified statements statements are are vacuously vacuously true true in in empty empty worlds. worlds. x. Smiling(x)

104 Time-Out for Announcements!

105 Problem Set One Problem Set One due Friday at 2:30PM. Want to use your late days? You can submit up to 2:30PM on Sunday. Remember that late days are 24-hour extensions, so submitting on Sunday would use two late days. Problem Set Two goes out Friday. Checkpoint assignment due next Monday at 2:30PM. Remaining problems are due next Friday at 2:30PM. Play around with propositional and first-order logic and sharpen your proof-writing skills!

106 Back to CS103!

107 Translating into First-Order Logic

108 Translating Into Logic First-order logic an excellent tool for manipulating definitions and theorems to learn more about them. Need to take a negation? Translate your statement into FOL, negate it, then translate it back. Want to prove something by contrapositive? Translate your implication into FOL, take the contrapositive, then translate it back.

109 Translating Into Logic Translating statements into first-order logic a lot more difficult than it looks. There are a lot of nuances that come up when translating into first-order logic. We'll cover examples of both good and bad translations into logic so that you can learn what to watch for. We'll also show lots of examples of translations so that you can see the process that goes into it.

110 Using the predicates - Puppy(p), which states that p a puppy, and - Cute(x), which states that x cute, write a sentence in first-order logic that means all puppies are cute. Which Which of of these these first-order first-order logic logic statements statements a proper proper translation? translation? A. A. p. p. (Puppy(p) (Puppy(p) Cute(p)) Cute(p)) B. B. p. p. (Puppy(p) (Puppy(p) Cute(p)) Cute(p)) C. C. p. p. (Puppy(p) (Puppy(p) Cute(p)) Cute(p)) D. D. p. p. (Puppy(p) (Puppy(p) Cute(p)) Cute(p)) E. E. More More than than one one of of these. these. F. F. None None of of these. these. Answer Answer at at PollEv.com/cs103 PollEv.com/cs103 or or text text CS103 CS103 to to once once to to join, join, then then A, A, B, B, C, C, D, D, E, E, or or F. F.

111 An Incorrect Translation All puppies are cute! x. (Puppy(x) Cute(x))

112 An Incorrect Translation All puppies are cute! x. (Puppy(x) Cute(x)) Th Th should should work work for for any any choice choice of of x, x, including including things things that that aren't aren't puppies. puppies.

113 An Incorrect Translation All puppies are cute! x. (Puppy(x) Cute(x)) Th Th should should work work for for any any choice choice of of x, x, including including things things that that aren't aren't puppies. puppies.

114 An Incorrect Translation All puppies are cute! x. (Puppy(x) Cute(x)) Th Th should should work work for for any any choice choice of of x, x, including including things things that that aren't aren't puppies. puppies.

115 An Incorrect Translation All puppies are cute! x. (Puppy(x) Cute(x)) Th Th should should work work for for any any choice choice of of x, x, including including things things that that aren't aren't puppies. puppies.

116 An Incorrect Translation All puppies are cute! x. (Puppy(x) Cute(x)) Th Th should should work work for for any any choice choice of of x, x, including including things things that that aren't aren't puppies. puppies.

117 An Incorrect Translation All puppies are cute! x. (Puppy(x) Cute(x)) Th Th should should work work for for any any choice choice of of x, x, including including things things that that aren't aren't puppies. puppies.

118 An Incorrect Translation All puppies are cute! x. (Puppy(x) Cute(x)) A statement statement of of the the form form x. x. something true true only only when when something something true true for for every every choice choice of of x. x.

119 An Incorrect Translation All puppies are cute! x. (Puppy(x) Cute(x)) A statement statement of of the the form form x. x. something true true only only when when something something true true for for every every choice choice of of x. x.

120 An Incorrect Translation All puppies are cute! x. (Puppy(x) Cute(x))

121 An Incorrect Translation All puppies are cute! x. (Puppy(x) Cute(x)) Th Th first-order first-order statement statement false false even even though though the the Englh Englh statement statement true. true. Therefore, Therefore, it it can't can't be be a a correct correct translation. translation.

122 An Incorrect Translation All puppies are cute! x. (Puppy(x) Cute(x)) The The sue sue here here that that th th statement statement asserts asserts that that everything everything a a puppy. puppy. That's That's too too strong strong of of a a claim claim to to make. make.

123 A Better Translation All puppies are cute! x. (Puppy(x) Cute(x))

124 A Better Translation All puppies are cute! x. (Puppy(x) Cute(x)) Th Th should should work work for for any any choice choice of of x, x, including including things things that that aren't aren't puppies. puppies.

125 A Better Translation All puppies are cute! x. (Puppy(x) Cute(x)) Th Th should should work work for for any any choice choice of of x, x, including including things things that that aren't aren't puppies. puppies.

126 A Better Translation All puppies are cute! x. (Puppy(x) Cute(x)) Th Th should should work work for for any any choice choice of of x, x, including including things things that that aren't aren't puppies. puppies.

127 A Better Translation All puppies are cute! x. (Puppy(x) Cute(x)) Th Th should should work work for for any any choice choice of of x, x, including including things things that that aren't aren't puppies. puppies.

128 A Better Translation All puppies are cute! x. (Puppy(x) Cute(x)) Th Th should should work work for for any any choice choice of of x, x, including including things things that that aren't aren't puppies. puppies.

129 A Better Translation All puppies are cute! x. (Puppy(x) Cute(x)) Th Th should should work work for for any any choice choice of of x, x, including including things things that that aren't aren't puppies. puppies.

130 A Better Translation All puppies are cute! x. (Puppy(x) Cute(x)) Th Th should should work work for for any any choice choice of of x, x, including including things things that that aren't aren't puppies. puppies.

131 A Better Translation All puppies are cute! x. (Puppy(x) Cute(x)) Th Th should should work work for for any any choice choice of of x, x, including including things things that that aren't aren't puppies. puppies.

132 A Better Translation All puppies are cute! x. (Puppy(x) Cute(x)) Th Th should should work work for for any any choice choice of of x, x, including including things things that that aren't aren't puppies. puppies.

133 A Better Translation All puppies are cute! x. (Puppy(x) Cute(x)) Th Th should should work work for for any any choice choice of of x, x, including including things things that that aren't aren't puppies. puppies.

134 A Better Translation All puppies are cute! x. (Puppy(x) Cute(x)) Th Th should should work work for for any any choice choice of of x, x, including including things things that that aren't aren't puppies. puppies.

135 A Better Translation All puppies are cute! x. (Puppy(x) Cute(x)) Th Th should should work work for for any any choice choice of of x, x, including including things things that that aren't aren't puppies. puppies.

136 A Better Translation All puppies are cute! x. (Puppy(x) Cute(x)) Th Th should should work work for for any any choice choice of of x, x, including including things things that that aren't aren't puppies. puppies.

137 A Better Translation All puppies are cute! x. (Puppy(x) Cute(x)) Th Th should should work work for for any any choice choice of of x, x, including including things things that that aren't aren't puppies. puppies.

138 A Better Translation All puppies are cute! x. (Puppy(x) Cute(x)) Th Th should should work work for for any any choice choice of of x, x, including including things things that that aren't aren't puppies. puppies.

139 A Better Translation All puppies are cute! x. (Puppy(x) Cute(x)) Th Th should should work work for for any any choice choice of of x, x, including including things things that that aren't aren't puppies. puppies.

140 A Better Translation All puppies are cute! x. (Puppy(x) Cute(x)) Th Th should should work work for for any any choice choice of of x, x, including including things things that that aren't aren't puppies. puppies.

141 A Better Translation All puppies are cute! x. (Puppy(x) Cute(x)) Th Th should should work work for for any any choice choice of of x, x, including including things things that that aren't aren't puppies. puppies.

142 A Better Translation All puppies are cute! x. (Puppy(x) Cute(x)) Th Th should should work work for for any any choice choice of of x, x, including including things things that that aren't aren't puppies. puppies.

143 A Better Translation All puppies are cute! x. (Puppy(x) Cute(x)) Th Th should should work work for for any any choice choice of of x, x, including including things things that that aren't aren't puppies. puppies.

144 A Better Translation All puppies are cute! x. (Puppy(x) Cute(x)) Th Th should should work work for for any any choice choice of of x, x, including including things things that that aren't aren't puppies. puppies.

145 A Better Translation All puppies are cute! x. (Puppy(x) Cute(x)) Th Th should should work work for for any any choice choice of of x, x, including including things things that that aren't aren't puppies. puppies.

146 A Better Translation All puppies are cute! x. (Puppy(x) Cute(x))

147 A Better Translation All puppies are cute! x. (Puppy(x) Cute(x)) A statement statement of of the the form form x. x. something true true only only when when something something true true for for every every choice choice of of x. x.

148 A Better Translation All puppies are cute! x. (Puppy(x) Cute(x)) A statement statement of of the the form form x. x. something true true only only when when something something true true for for every every choice choice of of x. x.

149 All P's are Q's translates as x. (P(x) Q(x))

150 Useful Intuition: Universally-quantified statements are true unless there's a counterexample. x. (P(x) Q(x)) If If x x a a counterexample, counterexample, it it must must have have property property P but but not not have have property property Q. Q.

151 Using the predicates - Blobfh(b), which states that b a blobfh, and - Cute(x), which states that x cute, write a sentence in first-order logic that means some blobfh cute.

152 Using the predicates - Blobfh(b), which states that b a blobfh, and - Cute(x), which states that x cute, write a sentence in first-order logic that means some blobfh cute. Which Which of of these these first-order first-order logic logic statements statements a proper proper translation? translation? A. A. b. b. (Blobfh(b) (Blobfh(b) Cute(b)) Cute(b)) B. B. b. b. (Blobfh(b) (Blobfh(b) Cute(b)) Cute(b)) C. C. b. b. (Blobfh(b) (Blobfh(b) Cute(b)) Cute(b)) D. D. b. b. (Blobfh(b) (Blobfh(b) Cute(b)) Cute(b)) E. E. More More than than one one of of these. these. F. F. None None of of these. these. Answer Answer at at PollEv.com/cs103 PollEv.com/cs103 or or text text CS103 CS103 to to once once to to join, join, then then A, A, B, B, C, C, D, D, E, E, or or F. F.

153 An Incorrect Translation Some blobfh cute. x. (Blobfh(x) Cute(x))

154 An Incorrect Translation Some blobfh cute. x. (Blobfh(x) Cute(x))

155 An Incorrect Translation Some blobfh cute. x. (Blobfh(x) Cute(x))

156 An Incorrect Translation Some blobfh cute. x. (Blobfh(x) Cute(x))

157 An Incorrect Translation Some blobfh cute. x. (Blobfh(x) Cute(x))

158 An Incorrect Translation Some blobfh cute. x. (Blobfh(x) Cute(x))

159 An Incorrect Translation Some blobfh cute. x. (Blobfh(x) Cute(x)) A statement statement of of the the form form x. x. something true true only only when when something something true true for for at at least least one one choice choice of of x. x.

160 An Incorrect Translation Some blobfh cute. x. (Blobfh(x) Cute(x)) A statement statement of of the the form form x. x. something true true only only when when something something true true for for at at least least one one choice choice of of x. x.

161 An Incorrect Translation Some blobfh cute. x. (Blobfh(x) Cute(x))

162 An Incorrect Translation Some blobfh cute. x. (Blobfh(x) Cute(x)) Th Th first-order first-order statement statement true true even even though though the the Englh Englh statement statement false. false. Therefore, Therefore, it it can't can't be be a a correct correct translation. translation.

163 An Incorrect Translation Some blobfh cute. x. (Blobfh(x) Cute(x)) The The sue sue here here that that implications implications are are true true whenever whenever the the antecedent antecedent false. false. Th Th statement statement accidentally accidentally true true because because of of what what happens happens when when x x n't n't a a blobfh. blobfh.

164 A Correct Translation Some blobfh cute. x. (Blobfh(x) Cute(x))

165 A Correct Translation Some blobfh cute. x. (Blobfh(x) Cute(x))

166 A Correct Translation Some blobfh cute. x. (Blobfh(x) Cute(x))

167 A Correct Translation Some blobfh cute. x. (Blobfh(x) Cute(x))

168 A Correct Translation Some blobfh cute. x. (Blobfh(x) Cute(x))

169 A Correct Translation Some blobfh cute. x. (Blobfh(x) Cute(x))

170 A Correct Translation Some blobfh cute. x. (Blobfh(x) Cute(x))

171 A Correct Translation Some blobfh cute. x. (Blobfh(x) Cute(x))

172 A Correct Translation Some blobfh cute. x. (Blobfh(x) Cute(x))

173 A Correct Translation Some blobfh cute. x. (Blobfh(x) Cute(x))

174 A Correct Translation Some blobfh cute. x. (Blobfh(x) Cute(x))

175 A Correct Translation Some blobfh cute. x. (Blobfh(x) Cute(x))

176 A Correct Translation Some blobfh cute. x. (Blobfh(x) Cute(x))

177 A Correct Translation Some blobfh cute. x. (Blobfh(x) Cute(x))

178 A Correct Translation Some blobfh cute. x. (Blobfh(x) Cute(x))

179 A Correct Translation Some blobfh cute. x. (Blobfh(x) Cute(x))

180 A Correct Translation Some blobfh cute. x. (Blobfh(x) Cute(x))

181 A Correct Translation Some blobfh cute. x. (Blobfh(x) Cute(x))

182 A Correct Translation Some blobfh cute. x. (Blobfh(x) Cute(x))

183 A Correct Translation Some blobfh cute. x. (Blobfh(x) Cute(x))

184 A Correct Translation Some blobfh cute. x. (Blobfh(x) Cute(x))

185 A Correct Translation Some blobfh cute. x. (Blobfh(x) Cute(x)) A statement statement of of the the form form x. x. something true true only only when when something something true true for for at at least least one one choice choice of of x. x.

186 A Correct Translation Some blobfh cute. x. (Blobfh(x) Cute(x)) A statement statement of of the the form form x. x. something true true only only when when something something true true for for at at least least one one choice choice of of x. x.

187 Some P a Q translates as x. (P(x) Q(x))

188 Useful Intuition: Extentially-quantified statements are false unless there's a positive example. x. (P(x) Q(x)) If If x x an an example, example, it it must must have have property property P on on top top of of property property Q. Q.

189 Good Pairings The quantifier usually paired with. x. (P(x) Q(x)) The quantifier usually paired with. x. (P(x) Q(x)) In the case of, the connective prevents the statement from being false when speaking about some object you don't care about. In the case of, the connective prevents the statement from being true when speaking about some object you don't care about.

190 Next Time First-Order Translations How do we translate from Englh into first-order logic? Quantifier Orderings How do you select the order of quantifiers in first-order logic formulas? Negating Formulas How do you mechanically determine the negation of a first-order formula? Expressing Uniqueness How do we say there s just one object of a certain type?

Mathematical Logic Part Two

Mathematical Logic Part Two Mathematical Logic Part Two Recap from Last Time Recap So Far A propositional variable is a variable that is either true or false. The propositional connectives are as follows: Negation: p Conjunction:

More information

Mathematical Logic Part Two

Mathematical Logic Part Two Mathematical Logic Part Two A Note on the Career Fair Recap from Last Time Recap So Far A propositional variable is a variable that is either true or false. The propositional connectives are as follows:

More information

Mathematical Logic Part Two

Mathematical Logic Part Two Mathematical Logic Part Two A Note on the Career Fair Recap from Last Time Recap So Far A propositional variable is a variable that is either true or false. The propositional connectives are as follows:

More information

Mathematical Logic Part One

Mathematical Logic Part One Mathematical Logic Part One Question: How do we formalize the logic we've been using in our proofs? Where We're Going Propositional Logic (Today) Basic logical connectives. Truth tables. Logical equivalences.

More information

for all x, the assertion P(x) is false. there exists x, for which the assertion P(x) is true.

for all x, the assertion P(x) is false. there exists x, for which the assertion P(x) is true. You can t prove a predicate is true because a predicate is not an assertion, you can t prove it is valid as it is not a deduction! If someone asks you to prove P(x), it is not totally clear what they mean.

More information

Mathematical Logic Part One

Mathematical Logic Part One Mathematical Logic Part One Question: How do we formalize the logic we've been using in our proofs? Where We're Going Propositional Logic (Today) Basic logical connectives. Truth tables. Logical equivalences.

More information

Chapter 1.3 Quantifiers, Predicates, and Validity. Reading: 1.3 Next Class: 1.4. Motivation

Chapter 1.3 Quantifiers, Predicates, and Validity. Reading: 1.3 Next Class: 1.4. Motivation Chapter 1.3 Quantifiers, Predicates, and Validity Reading: 1.3 Next Class: 1.4 1 Motivation Propositional logic allows to translate and prove certain arguments from natural language If John s wallet was

More information

First-Order Translation Checklist

First-Order Translation Checklist CS103 Winter 2019 First-Order Translation Checklist Cynthia Lee Keith Schwarz In this handout, we ve distilled five specific points that you should check in your first-order logic statements before submitting

More information

CS103 Spring 2018 Mathematical Vocabulary

CS103 Spring 2018 Mathematical Vocabulary CS103 Spring 2018 Mathematical Vocabulary You keep using that word. I do not think it means what you think it means. - Inigo Montoya, from The Princess Bride Consider the humble while loop in most programming

More information

Section 2.2: Introduction to the Logic of Quantified Statements

Section 2.2: Introduction to the Logic of Quantified Statements Section 2.2: Introduction to the Logic of Quantified Statements In this section, we shall continue to examine some of the fundamentals of predicate calculus. Specifically, we shall look at the negations

More information

Program Verification & Testing; Review of Propositional Logic

Program Verification & Testing; Review of Propositional Logic 8/24: p.1, solved; 9/20: p.5 Program Verification & Testing; Review of Propositional Logic CS 536: Science of Programming, Fall 2018 A. Why Course guidelines are important. Active learning is the style

More information

In our first lecture on sets and set theory, we introduced a bunch of new symbols and terminology.

In our first lecture on sets and set theory, we introduced a bunch of new symbols and terminology. Guide to and Hi everybody! In our first lecture on sets and set theory, we introduced a bunch of new symbols and terminology. This guide focuses on two of those symbols: and. These symbols represent concepts

More information

Propositional Logic. Part I

Propositional Logic. Part I Part I Propositional Logic 1 Classical Logic and the Material Conditional 1.1 Introduction 1.1.1 The first purpose of this chapter is to review classical propositional logic, including semantic tableaux.

More information

CSE 20 DISCRETE MATH. Fall

CSE 20 DISCRETE MATH. Fall CSE 20 DISCRETE MATH Fall 2017 http://cseweb.ucsd.edu/classes/fa17/cse20-ab/ Final exam The final exam is Saturday December 16 11:30am-2:30pm. Lecture A will take the exam in Lecture B will take the exam

More information

Formal Methods of Software Design, Eric Hehner, segment 1 page 1 out of 5

Formal Methods of Software Design, Eric Hehner, segment 1 page 1 out of 5 Formal Methods of Software Design, Eric Hehner, segment 1 page 1 out of 5 [talking head] Formal Methods of Software Engineering means the use of mathematics as an aid to writing programs. Before we can

More information

Mathematical Logic Prof. Arindama Singh Department of Mathematics Indian Institute of Technology, Madras. Lecture - 9 Normal Forms

Mathematical Logic Prof. Arindama Singh Department of Mathematics Indian Institute of Technology, Madras. Lecture - 9 Normal Forms Mathematical Logic Prof. Arindama Singh Department of Mathematics Indian Institute of Technology, Madras Lecture - 9 Normal Forms In the last class we have seen some consequences and some equivalences,

More information

Guide to First-Order Logic Translations

Guide to First-Order Logic Translations Guide to First-Order Logic Translations Hi everybody! In last Friday's lecture, we talked about how to translate statements from English into frst-order logic. Translating into logic is a skill that takes

More information

Propositional Logic Formal Syntax and Semantics. Computability and Logic

Propositional Logic Formal Syntax and Semantics. Computability and Logic Propositional Logic Formal Syntax and Semantics Computability and Logic Syntax and Semantics Syntax: The study of how expressions are structured (think: grammar) Semantics: The study of the relationship

More information

CSC 501 Semantics of Programming Languages

CSC 501 Semantics of Programming Languages CSC 501 Semantics of Programming Languages Subtitle: An Introduction to Formal Methods. Instructor: Dr. Lutz Hamel Email: hamel@cs.uri.edu Office: Tyler, Rm 251 Books There are no required books in this

More information

Summary of Course Coverage

Summary of Course Coverage CS-227, Discrete Structures I Spring 2006 Semester Summary of Course Coverage 1) Propositional Calculus a) Negation (logical NOT) b) Conjunction (logical AND) c) Disjunction (logical inclusive-or) d) Inequalities

More information

CS 3512, Spring Instructor: Doug Dunham. Textbook: James L. Hein, Discrete Structures, Logic, and Computability, 3rd Ed. Jones and Barlett, 2010

CS 3512, Spring Instructor: Doug Dunham. Textbook: James L. Hein, Discrete Structures, Logic, and Computability, 3rd Ed. Jones and Barlett, 2010 CS 3512, Spring 2011 Instructor: Doug Dunham Textbook: James L. Hein, Discrete Structures, Logic, and Computability, 3rd Ed. Jones and Barlett, 2010 Prerequisites: Calc I, CS2511 Rough course outline:

More information

Notes for Recitation 8

Notes for Recitation 8 6.04/8.06J Mathematics for Computer Science October 5, 00 Tom Leighton and Marten van Dijk Notes for Recitation 8 Build-up error Recall a graph is connected iff there is a path between every pair of its

More information

Quantification. Using the suggested notation, symbolize the statements expressed by the following sentences.

Quantification. Using the suggested notation, symbolize the statements expressed by the following sentences. Quantification In this and subsequent chapters, we will develop a more formal system of dealing with categorical statements, one that will be much more flexible than traditional logic, allow a deeper analysis

More information

Resolution (14A) Young W. Lim 6/14/14

Resolution (14A) Young W. Lim 6/14/14 Copyright (c) 2013-2014. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free

More information

MITOCW watch?v=4dj1oguwtem

MITOCW watch?v=4dj1oguwtem MITOCW watch?v=4dj1oguwtem PROFESSOR: So it's time to examine uncountable sets. And that's what we're going to do in this segment. So Cantor's question was, are all sets the same size? And he gives a definitive

More information

University of Illinois at Chicago Department of Computer Science. Final Examination. CS 151 Mathematical Foundations of Computer Science Fall 2012

University of Illinois at Chicago Department of Computer Science. Final Examination. CS 151 Mathematical Foundations of Computer Science Fall 2012 University of Illinois at Chicago Department of Computer Science Final Examination CS 151 Mathematical Foundations of Computer Science Fall 2012 Thursday, October 18, 2012 Name: Email: Print your name

More information

Lecture 1: Conjunctive Queries

Lecture 1: Conjunctive Queries CS 784: Foundations of Data Management Spring 2017 Instructor: Paris Koutris Lecture 1: Conjunctive Queries A database schema R is a set of relations: we will typically use the symbols R, S, T,... to denote

More information

CS Bootcamp Boolean Logic Autumn 2015 A B A B T T T T F F F T F F F F T T T T F T F T T F F F

CS Bootcamp Boolean Logic Autumn 2015 A B A B T T T T F F F T F F F F T T T T F T F T T F F F 1 Logical Operations 1.1 And The and operator is a binary operator, denoted as, &,, or sometimes by just concatenating symbols, is true only if both parameters are true. A B A B F T F F F F The expression

More information

Practice Problems: All Computer Science majors are people. Some computer science majors are logical thinkers. Some people are logical thinkers.

Practice Problems: All Computer Science majors are people. Some computer science majors are logical thinkers. Some people are logical thinkers. CSE 240, Fall, 2013 Homework 2 Due, Tuesday September 17. Can turn in class, at the beginning of class, or earlier in the mailbox labelled Pless in Bryan Hall, room 509c. Practice Problems: 1. Consider

More information

Propositional Calculus

Propositional Calculus Propositional Calculus Proposition is a statement that is either or. Example 1 Propositions: It rains. Sun is shining and my coat is wet. If Ann plays with me, I give her a candy. x > 10 x = 1 and y

More information

CS103 Handout 29 Winter 2018 February 9, 2018 Inductive Proofwriting Checklist

CS103 Handout 29 Winter 2018 February 9, 2018 Inductive Proofwriting Checklist CS103 Handout 29 Winter 2018 February 9, 2018 Inductive Proofwriting Checklist In Handout 28, the Guide to Inductive Proofs, we outlined a number of specifc issues and concepts to be mindful about when

More information

Guidelines for Writing Mathematical Proofs

Guidelines for Writing Mathematical Proofs Appendix A Guidelines for Writing Mathematical Proofs One of the most important forms of mathematical writing is writing mathematical proofs. The writing of mathematical proofs is an acquired skill and

More information

Notes slides from before lecture. CSE 21, Winter 2017, Section A00. Lecture 9 Notes. Class URL:

Notes slides from before lecture. CSE 21, Winter 2017, Section A00. Lecture 9 Notes. Class URL: Notes slides from before lecture CSE 21, Winter 2017, Section A00 Lecture 9 Notes Class URL: http://vlsicad.ucsd.edu/courses/cse21-w17/ Notes slides from before lecture Notes February 8 (1) HW4 is due

More information

Today s Topics. What is a set?

Today s Topics. What is a set? Today s Topics Introduction to set theory What is a set? Set notation Basic set operations What is a set? Definition: A set is an unordered collection of objects Examples: Sets can contain items of mixed

More information

Strategies for Proofs

Strategies for Proofs Strategies for Proofs Landscape with House and Ploughman Van Gogh Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois 1 Goals of this lecture A bit more logic Reviewing Implication

More information

Propositional Logic. Andreas Klappenecker

Propositional Logic. Andreas Klappenecker Propositional Logic Andreas Klappenecker Propositions A proposition is a declarative sentence that is either true or false (but not both). Examples: College Station is the capital of the USA. There are

More information

MITOCW watch?v=kz7jjltq9r4

MITOCW watch?v=kz7jjltq9r4 MITOCW watch?v=kz7jjltq9r4 PROFESSOR: We're going to look at the most fundamental of all mathematical data types, namely sets, and let's begin with the definitions. So informally, a set is a collection

More information

Logical Connectives. All kittens are cute. ; I like pizza. ; The sky is blue. ; Triangles have three sides.

Logical Connectives. All kittens are cute. ; I like pizza. ; The sky is blue. ; Triangles have three sides. Logical Connectives We have learned what a statement is. Recall that a statement is just a proposition that asserts something that is either true or false. For instance, these are propositions: All kittens

More information

CS 161 Computer Security

CS 161 Computer Security Wagner Spring 2014 CS 161 Computer Security 1/27 Reasoning About Code Often functions make certain assumptions about their arguments, and it is the caller s responsibility to make sure those assumptions

More information

First Order Predicate Logic CIS 32

First Order Predicate Logic CIS 32 First Order Predicate Logic CIS 32 Functionalia Demos? HW 3 is out on the web-page. Today: Predicate Logic Constructing the Logical Agent Predicate Logic First-order predicate logic More expressive than

More information

LOGIC AND DISCRETE MATHEMATICS

LOGIC AND DISCRETE MATHEMATICS LOGIC AND DISCRETE MATHEMATICS A Computer Science Perspective WINFRIED KARL GRASSMANN Department of Computer Science University of Saskatchewan JEAN-PAUL TREMBLAY Department of Computer Science University

More information

CPSC 121: Models of Computation. Module 5: Predicate Logic

CPSC 121: Models of Computation. Module 5: Predicate Logic CPSC 121: Models of Computation Module 5: Predicate Logic Module 5: Predicate Logic Midterm 1: Friday February 9 th, 17:00 to 18:15 A to C (by last name): room DMP 310 D to K: room MATH 100 L to P: room

More information

CITS2211 Discrete Structures Logic

CITS2211 Discrete Structures Logic CITS2211 Discrete Structures Logic Unit coordinator: Rachel Cardell-Oliver August 6, 2017 Highlights All men are mortal, Socrates is a man, therefore Socrates is mortal. Reading Chapter 3: Logical Formulas

More information

Lecture Notes 15 Number systems and logic CSS Data Structures and Object-Oriented Programming Professor Clark F. Olson

Lecture Notes 15 Number systems and logic CSS Data Structures and Object-Oriented Programming Professor Clark F. Olson Lecture Notes 15 Number systems and logic CSS 501 - Data Structures and Object-Oriented Programming Professor Clark F. Olson Number systems The use of alternative number systems is important in computer

More information

Truth Functional Properties on Truth Trees

Truth Functional Properties on Truth Trees Truth Functional Properties on Truth Trees Truth-functional: Truth Falsity Indeterminacy Entailment Validity Equivalence Consistency A set of sentences of SL is truth-functionally consistent if and only

More information

To prove something about all Boolean expressions, we will need the following induction principle: Axiom 7.1 (Induction over Boolean expressions):

To prove something about all Boolean expressions, we will need the following induction principle: Axiom 7.1 (Induction over Boolean expressions): CS 70 Discrete Mathematics for CS Fall 2003 Wagner Lecture 7 This lecture returns to the topic of propositional logic. Whereas in Lecture 1 we studied this topic as a way of understanding proper reasoning

More information

Chapter 3. Set Theory. 3.1 What is a Set?

Chapter 3. Set Theory. 3.1 What is a Set? Chapter 3 Set Theory 3.1 What is a Set? A set is a well-defined collection of objects called elements or members of the set. Here, well-defined means accurately and unambiguously stated or described. Any

More information

CS103 Handout 50 Fall 2018 November 30, 2018 Problem Set 9

CS103 Handout 50 Fall 2018 November 30, 2018 Problem Set 9 CS103 Handout 50 Fall 2018 November 30, 2018 Problem Set 9 What problems are beyond our capacity to solve? Why are they so hard? And why is anything that we've discussed this quarter at all practically

More information

Multi-Place Predicates and Multiple Quantifiers

Multi-Place Predicates and Multiple Quantifiers Multi-Place Predicates and Multiple Quantifiers So far we have looked only at monadic predicates. That is, predicates that apply to only one thing. For instance, Fa might mean Alice is friendly. But, what

More information

To prove something about all Boolean expressions, we will need the following induction principle: Axiom 7.1 (Induction over Boolean expressions):

To prove something about all Boolean expressions, we will need the following induction principle: Axiom 7.1 (Induction over Boolean expressions): CS 70 Discrete Mathematics for CS Spring 2005 Clancy/Wagner Notes 7 This lecture returns to the topic of propositional logic. Whereas in Lecture Notes 1 we studied this topic as a way of understanding

More information

First-Order Logic PREDICATE LOGIC. Syntax. Terms

First-Order Logic PREDICATE LOGIC. Syntax. Terms First-Order Logic PREDICATE LOGIC Aim of this lecture: to introduce first-order predicate logic. More expressive than propositional logic. Consider the following argument: all monitors are ready; X12 is

More information

Predicate Logic CHAPTER What This Chapter Is About

Predicate Logic CHAPTER What This Chapter Is About CHAPTER 14 Predicate Logic We now turn our attention to a generalization of propositional logic, called predicate, or first-order, logic. Predicates are functions of zero or more variables that return

More information

L05 - Negating Statements

L05 - Negating Statements L05 - Negating Statements CSci/Math 2112 15 May 2015 1 / 14 Assignment 1 Assignment 1 is now posted Due May 22 at the beginning of class Can work on it in groups, but separate write-up Don t forget your

More information

SOFTWARE VERIFICATION AND COMPUTER PROOF (lesson 1) Enrico Tassi Inria Sophia-Antipolis

SOFTWARE VERIFICATION AND COMPUTER PROOF (lesson 1) Enrico Tassi Inria Sophia-Antipolis SOFTWARE VERIFICATION AND COMPUTER PROOF (lesson 1) Enrico Tassi Inria Sophia-Antipolis Who am I? 1. I'm a researcher at Inria 2. I work on proof assistants, the kind of tools that we will be using for

More information

CPSC 121 Midterm 2 Friday November 13th, 2015

CPSC 121 Midterm 2 Friday November 13th, 2015 CPSC 121 Midterm 2 Friday November 13th, 2015 [10] 1. For each of the following statements: Rewrite the statement using predicate logic. Write down ALL of the proof strategies (from the list given below),

More information

Overview. CS389L: Automated Logical Reasoning. Lecture 6: First Order Logic Syntax and Semantics. Constants in First-Order Logic.

Overview. CS389L: Automated Logical Reasoning. Lecture 6: First Order Logic Syntax and Semantics. Constants in First-Order Logic. Overview CS389L: Automated Logical Reasoning Lecture 6: First Order Logic Syntax and Semantics Işıl Dillig So far: Automated reasoning in propositional logic. Propositional logic is simple and easy to

More information

Propositional Logic. Application of Propositional logic

Propositional Logic. Application of Propositional logic DISCRETE STRUCTURE Propositional Logic Application of Propositional logic Propositional logic is the study of propositions (true or false statements) and ways of combining them (logical operators) to

More information

CPSC 121: Models of Computation Assignment #4, due Thursday, March 16 th,2017at16:00

CPSC 121: Models of Computation Assignment #4, due Thursday, March 16 th,2017at16:00 CPSC 121: Models of Computation Assignment #4, due Thursday, March 16 th,2017at16:00 [18] 1. Consider the following predicate logic statement: 9x 2 A, 8y 2 B,9z 2 C, P(x, y, z)! Q(x, y, z), where A, B,

More information

This is already grossly inconvenient in present formalisms. Why do we want to make this convenient? GENERAL GOALS

This is already grossly inconvenient in present formalisms. Why do we want to make this convenient? GENERAL GOALS 1 THE FORMALIZATION OF MATHEMATICS by Harvey M. Friedman Ohio State University Department of Mathematics friedman@math.ohio-state.edu www.math.ohio-state.edu/~friedman/ May 21, 1997 Can mathematics be

More information

Homework 1. Due Date: Wednesday 11/26/07 - at the beginning of the lecture

Homework 1. Due Date: Wednesday 11/26/07 - at the beginning of the lecture Homework 1 Due Date: Wednesday 11/26/07 - at the beginning of the lecture Problems marked with a [*] are a littlebit harder and count as extra credit. Note 1. For any of the given problems make sure that

More information

Lecture 5. Logic I. Statement Logic

Lecture 5. Logic I. Statement Logic Ling 726: Mathematical Linguistics, Logic. Statement Logic V. Borschev and B. Partee, September 27, 2 p. Lecture 5. Logic I. Statement Logic. Statement Logic...... Goals..... Syntax of Statement Logic....2.

More information

Range Minimum Queries Part Two

Range Minimum Queries Part Two Range Minimum Queries Part Two Recap from Last Time The RMQ Problem The Range Minimum Query (RMQ) problem is the following: Given a fixed array A and two indices i j, what is the smallest element out of

More information

Binary Relations Part One

Binary Relations Part One Binary Relations Part One Outline for Today Binary Relations Reasoning about connections between objects. Equivalence Relations Reasoning about clusters. A Fundamental Theorem How do we know we have the

More information

CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Chapter p. 1/27

CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Chapter p. 1/27 CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Chapter 2.1-2.7 p. 1/27 CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer

More information

CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Sections p.

CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Sections p. CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Sections 10.1-10.3 p. 1/106 CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer

More information

Higher-Order Logic. Specification and Verification with Higher-Order Logic

Higher-Order Logic. Specification and Verification with Higher-Order Logic Higher-Order Logic Specification and Verification with Higher-Order Logic Arnd Poetzsch-Heffter (Slides by Jens Brandt) Software Technology Group Fachbereich Informatik Technische Universität Kaiserslautern

More information

Propositional Logic:

Propositional Logic: CS2209A 2017 Applied Logic for Computer Science Lecture 2 Propositional Logic: Syntax, semantics, truth table Instructor: Yu Zhen Xie Language of logic: building blocks Proposition: A sentence that can

More information

Today s Lecture 4/13/ WFFs/ Free and Bound Variables 9.3 Proofs for Pred. Logic (4 new implicational rules)!

Today s Lecture 4/13/ WFFs/ Free and Bound Variables 9.3 Proofs for Pred. Logic (4 new implicational rules)! Today s Lecture 4/13/10 9.1 WFFs/ Free and Bound Variables 9.3 Proofs for Pred. Logic (4 new implicational rules)! Announcements Welcome Back! Answers to latest symbolizations HW are posted on-line Homework:

More information

Lecture 5: Predicate Calculus. ffl Predicate Logic ffl The Language ffl Semantics: Structures

Lecture 5: Predicate Calculus. ffl Predicate Logic ffl The Language ffl Semantics: Structures Lecture 5: Predicate Calculus ffl Predicate Logic ffl The Language ffl Semantics: Structures 1 Why Predicate Logic? Propositional logic is not powerful enough to express statements such as ffl For every

More information

CSE 311: Foundations of Computing. Lecture 8: Predicate Logic Proofs

CSE 311: Foundations of Computing. Lecture 8: Predicate Logic Proofs CSE 311: Foundations of Computing Lecture 8: Predicate Logic Proofs Last class: Propositional Inference Rules Two inference rules per binary connective, one to eliminate it and one to introduce it Elim

More information

Propositional Calculus: Boolean Functions and Expressions. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson

Propositional Calculus: Boolean Functions and Expressions. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson Propositional Calculus: Boolean Functions and Expressions CS 270: Mathematical Foundations of Computer Science Jeremy Johnson Propositional Calculus Objective: To provide students with the concepts and

More information

CSE 20 DISCRETE MATH. Winter

CSE 20 DISCRETE MATH. Winter CSE 20 DISCRETE MATH Winter 2017 http://cseweb.ucsd.edu/classes/wi17/cse20-ab/ Final exam The final exam is Saturday March 18 8am-11am. Lecture A will take the exam in GH 242 Lecture B will take the exam

More information

6.034 Notes: Section 10.1

6.034 Notes: Section 10.1 6.034 Notes: Section 10.1 Slide 10.1.1 A sentence written in conjunctive normal form looks like ((A or B or not C) and (B or D) and (not A) and (B or C)). Slide 10.1.2 Its outermost structure is a conjunction.

More information

First-Order Logic Syntax

First-Order Logic Syntax First-Order Logic Syntax Reading: Chapter 8, 9.1-9.2, 9.5.1-9.5.5 FOL Syntax and Semantics read: 8.1-8.2 FOL Knowledge Engineering read: 8.3-8.5 FOL Inference read: Chapter 9.1-9.2, 9.5.1-9.5.5 (Please

More information

Introduction to Sets and Logic (MATH 1190)

Introduction to Sets and Logic (MATH 1190) Introduction to Sets and Logic () Instructor: Email: shenlili@yorku.ca Department of Mathematics and Statistics York University Dec 4, 2014 Outline 1 2 3 4 Definition A relation R from a set A to a set

More information

Chapter 3: Propositional Languages

Chapter 3: Propositional Languages Chapter 3: Propositional Languages We define here a general notion of a propositional language. We show how to obtain, as specific cases, various languages for propositional classical logic and some non-classical

More information

Sets. Margaret M. Fleck. 15 September 2010

Sets. Margaret M. Fleck. 15 September 2010 Sets Margaret M. Fleck 15 September 2010 These notes cover set notation, operations on sets, and how to prove claims involving sets (Rosen sections 2.1 and 2.2). They also cover some logic subtleties that

More information

CSL105: Discrete Mathematical Structures. Ragesh Jaiswal, CSE, IIT Delhi

CSL105: Discrete Mathematical Structures. Ragesh Jaiswal, CSE, IIT Delhi is another way of showing that an argument is correct. Definitions: Literal: A variable or a negation of a variable is called a literal. Sum and Product: A disjunction of literals is called a sum and a

More information

So many Logics, so little time

So many Logics, so little time So many Logics, so little time One classical way to organize them is by tractability vs. expressivity. Description Logics (DLs) are basically subsets of FO logic, located in a 'sweet spot' which provides

More information

The set consisting of all natural numbers that are in A and are in B is the set f1; 3; 5g;

The set consisting of all natural numbers that are in A and are in B is the set f1; 3; 5g; Chapter 5 Set Theory 5.1 Sets and Operations on Sets Preview Activity 1 (Set Operations) Before beginning this section, it would be a good idea to review sets and set notation, including the roster method

More information

Formal Methods of Software Design, Eric Hehner, segment 24 page 1 out of 5

Formal Methods of Software Design, Eric Hehner, segment 24 page 1 out of 5 Formal Methods of Software Design, Eric Hehner, segment 24 page 1 out of 5 [talking head] This lecture we study theory design and implementation. Programmers have two roles to play here. In one role, they

More information

Knowledge Representation. CS 486/686: Introduction to Artificial Intelligence

Knowledge Representation. CS 486/686: Introduction to Artificial Intelligence Knowledge Representation CS 486/686: Introduction to Artificial Intelligence 1 Outline Knowledge-based agents Logics in general Propositional Logic& Reasoning First Order Logic 2 Introduction So far we

More information

CS40-S13: Functional Completeness

CS40-S13: Functional Completeness CS40-S13: Functional Completeness Victor Amelkin victor@cs.ucsb.edu April 12, 2013 In class, we have briefly discussed what functional completeness means and how to prove that a certain system (a set)

More information

CS 512, Spring 2017: Take-Home End-of-Term Examination

CS 512, Spring 2017: Take-Home End-of-Term Examination CS 512, Spring 2017: Take-Home End-of-Term Examination Out: Tuesday, 9 May 2017, 12:00 noon Due: Wednesday, 10 May 2017, by 11:59 am Turn in your solutions electronically, as a single PDF file, by placing

More information

For next Tuesday. Read chapter 8 No written homework Initial posts due Thursday 1pm and responses due by class time Tuesday

For next Tuesday. Read chapter 8 No written homework Initial posts due Thursday 1pm and responses due by class time Tuesday For next Tuesday Read chapter 8 No written homework Initial posts due Thursday 1pm and responses due by class time Tuesday Any questions? Program 1 Imperfect Knowledge What issues arise when we don t know

More information

1. true / false By a compiler we mean a program that translates to code that will run natively on some machine.

1. true / false By a compiler we mean a program that translates to code that will run natively on some machine. 1. true / false By a compiler we mean a program that translates to code that will run natively on some machine. 2. true / false ML can be compiled. 3. true / false FORTRAN can reasonably be considered

More information

THE LOGIC OF QUANTIFIED STATEMENTS

THE LOGIC OF QUANTIFIED STATEMENTS CHAPTER 3 THE LOGIC OF QUANTIFIED STATEMENTS Copyright Cengage Learning. All rights reserved. SECTION 3.4 Arguments with Quantified Statements Copyright Cengage Learning. All rights reserved. Arguments

More information

Practice Final. Read all the problems first before start working on any of them, so you can manage your time wisely

Practice Final. Read all the problems first before start working on any of them, so you can manage your time wisely PRINT your name here: Practice Final Print your name immediately on the cover page, as well as each page of the exam, in the space provided. Each time you are caught working on a page without your name

More information

Denotational semantics

Denotational semantics 1 Denotational semantics 2 What we're doing today We're looking at how to reason about the effect of a program by mapping it into mathematical objects Specifically, answering the question which function

More information

CSC2108: Automated Verification Assignment 1 - Solutions

CSC2108: Automated Verification Assignment 1 - Solutions 8 CSC218: Automated Verification Assignment 1 - Solutions 1. Solve the following problem: Use the definition of between states and CTL formulas to explain why means that is true infinitely often along

More information

Constraint Propagation for Efficient Inference in Markov Logic

Constraint Propagation for Efficient Inference in Markov Logic Constraint Propagation for Efficient Inference in Tivadar Papai 1 Parag Singla 2 Henry Kautz 1 1 University of Rochester, Rochester NY 14627, USA 2 University of Texas, Austin TX 78701, USA September 13,

More information

Lecture 6,

Lecture 6, Lecture 6, 4.16.2009 Today: Review: Basic Set Operation: Recall the basic set operator,!. From this operator come other set quantifiers and operations:!,!,!,! \ Set difference (sometimes denoted, a minus

More information

Inference rule for Induction

Inference rule for Induction Inference rule for Induction Let P( ) be a predicate with domain the positive integers BASE CASE INDUCTIVE STEP INDUCTIVE Step: Usually a direct proof Assume P(x) for arbitrary x (Inductive Hypothesis),

More information

Mathematically Rigorous Software Design Review of mathematical prerequisites

Mathematically Rigorous Software Design Review of mathematical prerequisites Mathematically Rigorous Software Design 2002 September 27 Part 1: Boolean algebra 1. Define the Boolean functions and, or, not, implication ( ), equivalence ( ) and equals (=) by truth tables. 2. In an

More information

Finite Automata Part Three

Finite Automata Part Three Finite Automata Part Three Recap from Last Time A language L is called a regular language if there exists a DFA D such that L( D) = L. NFAs An NFA is a Nondeterministic Finite Automaton Can have missing

More information

Z Notation. June 21, 2018

Z Notation. June 21, 2018 Z Notation June 21, 2018 1 Definitions There are many different ways to introduce an object in a Z specification: declarations, abbreviations, axiomatic definitions, and free types. Keep in mind that the

More information

Notes. Notes. Introduction. Notes. Propositional Functions. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry.

Notes. Notes. Introduction. Notes. Propositional Functions. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry Spring 2006 1 / 1 Computer Science & Engineering 235 Introduction to Discrete Mathematics Sections 1.3 1.4 of Rosen cse235@cse.unl.edu Introduction

More information

Formal Predicate Calculus. Michael Meyling

Formal Predicate Calculus. Michael Meyling Formal Predicate Calculus Michael Meyling May 24, 2013 2 The source for this document can be found here: http://www.qedeq.org/0_04_07/doc/math/qedeq_formal_logic_v1.xml Copyright by the authors. All rights

More information

Problem One: A Quick Algebra Review

Problem One: A Quick Algebra Review CS103A Winter 2019 Solutions for Week One Handout 01S Problem One: A Quick Algebra Review In the first week of CS103, we'll be doing a few proofs that will require some algebraic manipulations and reasoning

More information

Computation Club: Gödel s theorem

Computation Club: Gödel s theorem Computation Club: Gödel s theorem The big picture mathematicians do a lot of reasoning and write a lot of proofs formal systems try to capture the ideas of reasoning and proof in a purely mechanical set

More information