Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Upcoming SlideShare
×

# Predicate calculus up

131 views

Published on

A simple introduction to Predicate Calculus, Logic, and Computer Science

Published in: Education
• Full Name
Comment goes here.

Are you sure you want to Yes No
Your message goes here
• Be the first to comment

• Be the first to like this

### Predicate calculus up

1. 1. Propositional Logic • p  q • NO internal structure
2. 2. Predicate logic • Loves (j, m) • DOES have internal structure
3. 3. Japan is a country
4. 4. Japan is a country • Country (x) • x = japan • Country (japan)
5. 5. Easy so far? • Yes • But what is the point? • Good question
6. 6. It helps with computer programming
7. 7. We use it to input data
8. 8. And write code
9. 9. Data • You can put in any information you want
10. 10. Peter fell over • Predicate? • Fell_over • How many arguments? • One – peter • Fell_over (peter)
11. 11. Jim donated \$100 to the city hospital • Donated (x,…..n) • Donated (jim, \$100, city_hospital) • Donated (x, y, z) • X = Jim • Y = \$100 • Z= the city hospital
12. 12. Ben hates computers • Hate (ben, computers)
13. 13. Eri gave up • Gave_up (eri)
14. 14. Emi is a genius • Genius (emi)
15. 15. No limits as long as it’s organized • Visit (mary, familiymart, sat_15th_april,) • Computational Linguistics: • Verb • Subject • Complement
16. 16. Hit • Hit ( ) • Hit (x, ) • Hit (x, y) • X = bill • Y = ken • Bill hit Ken
17. 17. Database 1 • “Jun, Ken, and Emi are all Japanese” Japanese (jun) Japanese (ken) Japanese (emi) Japanese (x)  ………………………
18. 18. Database 1 Japanese (x)  Human (x) Japanse (x)  Asian (x)
19. 19. Database 2 • “Jim is Bob’s father. Fred is Jerry’s father. Bob is Erica’s father. Will is Mary’s father. Jim, Bob, Fred, Jerry, and Will are male. Erica and Mary are female”
20. 20. Database 2 Father (jim, bob) Father (fred, jerry) Father (bob, erica) Father (will, mary) Male (jim) Male (bob) Male (fred) Male (jerry) Male (will) Female (erica) Female (mary)
21. 21. Database 2 Father (x, y) & Male (y)  ……………………… Father (x, y) & Female (y)  …………………… Father (x, y) & Father (y, z)  …………………. Father (x, y) & Father (y, z) & Female (z)  …………………….. Father (x, y) & Father (y, z) & Male (z)  ………………………..
22. 22. Database 2 Father (x, y) & Male (y)  Son (y)  Son (y, x) Father (x, y) & Female (y)  Daughter (y)  Daughter (y, x)
23. 23. Database 2 Father (x, y) & Father (y, z)  Grandfather (x, z) Father (x, y) & Father (y, z) & Female (z)  Granddaughter (z, x) Father (x, y) & Father (y, z) & Male (z)  Grandson (z, x)
24. 24. Quantifiers
25. 25. The Little Prince is wearing a brown scarf
26. 26. • Wearing_a_brown_scarf (p) • Wearing (p, b_s)
27. 27. But the Little Prince is the only person in this world
28. 28. Everyone is wearing a brown scarf
29. 29. Imagine simple little worlds
30. 30. What do quantifiers mean?
31. 31. All – upside-down A
32. 32. Think of sets
33. 33. • Two sets • Set A • Set B
34. 34. • Set A = the set of Linguists • Linguist (x) • Set B = the set of crazy people • Crazy_person (x)
35. 35. A = Linguists; B = Crazy people
36. 36. Who is in these sets? • Linguist (x) • {evans, • imai, • ono}
37. 37. Computer database • Linguist (evans) • Linguist (imai) • Linguist (ono) • Set of linguists = • {evans, imai, ono}
38. 38. Who is in the set of crazy people? • Crazy_person (x) • {ken, • jim, • ben, • mary, • evans}
39. 39. Computer database • Crazy_person (evans) • Crazy_person (ken) • Crazy_person (jim) • Crazy_person (ben) • Crazy_person (mary)
40. 40. ∀= universal (all) Linguist (x)  Crazy_person (x)
41. 41. All linguists are crazy • Linguist (x)  Crazy_person (x) • Is this true? • For all individuals x, if x is in the set of Linguists, x is also in the set of Crazy persons.
42. 42. • Set A = the set of Linguists • Linguist (x) • Set B = the set of crazy people • Crazy_person (x)
43. 43. Who is in these sets? • Linguist (x) • {evans, • imai, • ono}
44. 44. Who is in the set of crazy people? • Crazy_person (x) • {ken, • jim, • ben, • mary, • evans}
45. 45. All linguists are crazy • Linguist (x)  Crazy_person (x) • Is Untrue • Because two members of the set of linguists are not in the set of crazy people.
46. 46. Some linguists are crazy • Is this True?
47. 47. Does this kind of x exist? • Linguist (x) & Crazy_person (x)
48. 48. Some linguists are crazy • ∃x (Linguist (x) & Crazy_person (x)) • Backward E • Existential Quantifier • There is at least one individual x • x is a linguist • And x is crazy
49. 49. Who is in the set of crazy people? • Crazy_person (x) • {ken, • jim, • ben, • mary, • evans}
50. 50. Evans is in the set of crazy people • So this is true • ∃x (Linguist (x) & Crazy_person (x)) • Backward E • Existential Quantifier • There is at least one individual x • x is a linguist • And x is crazy
51. 51. Predicate • Mary is a girl • Girl • Girl (mary)
52. 52. Predicate • Mary lives in Tsuru • Lives_in_Tsuru (mary)
53. 53. Set of girls • Girl (mary) • Girl (eri) • Girl (rie) • Girl = {mary, eri, rie}
54. 54. Set of people who live in Tsuru • Live_in_tsuru (ben) • Live_in_tsuru (ken) • Live_in_tsuru (mary) • Live in Tsuru = {ben, ken, mary}
55. 55. A girl lives in Tsuru • ∃x • ( • Girl (x) • & Lives_in_tsuru (x) • ) • ∃x (Girl (x) & Lives_in_tsuru (x))
56. 56. Set of girls • Girl (mary) • Girl (eri) • Girl (rie) • Girl = {mary, eri, rie}
57. 57. Set of people who live in Tsuru • Live_in_tsuru (ben) • Live_in_tsuru (ken) • Live_in_tsuru (mary) • Live in Tsuru = {ben, ken, mary}
58. 58. • ∃x (Girl (x) & Lives_in_tsuru (x)) • Is True!
59. 59. A girl lives in Fujiyoshida • ∃x • ( • Girl (x) • & Lives_in_fujiyoshida (x) • ) • ∃x (Girl (x) & Lives_in_fujiyoshida (x))
60. 60. Set of girls • Girl (mary) • Girl (eri) • Girl (rie) • Girl = {mary, eri, rie}
61. 61. Set of people who live in Fujiyoshida • Live_in_tsuru (ben) • Live_in_tsuru (len) • Live_in_tsuru (stan) • Live in Tsuru = {ben, len, stan}
62. 62. • ∃x (Girl (x) & Lives_in_fujiyoshida (x)) • Is False!
63. 63. • But • ¬∃x (Girl (x) & Lives_in_fujiyoshida (x)) • Is true • ~∃x (Girl (x) & Lives_in_fujiyoshida (x)) • Is true • -∃x (Girl (x) & Lives_in_fujiyoshida (x)) • Is true
64. 64. Any problems with Predicate Logic? • Yes • We are not always trying to say things that are true
65. 65. The sky is blue
66. 66. We don’t say the sky is blue at night
67. 67. Even though it’s true
68. 68. • We sometimes say things that are not true • “My brain exploded” • And do we really think in Logical Form? • ¬∃x (Girl (x) & Lives_in_fujiyoshida (x))
69. 69. • And if I say “A girl lives in Fujiyoshida” … • … is it really a statement about existence of an individual? • Or am I more concerned with number • Or the fact that we’re talking about a girl rather than a boy? • Or a girl rather than a woman? • Or something else related to CONTEXT?
70. 70. New ideas about how we understand meaning
71. 71. Language connects to the body
72. 72. NOT all in the brain!
73. 73. Also strong evidence for IMAGES rather than CODE
74. 74. Strong evidence for ACTION simulation
75. 75. Mental Models as IMAGES
76. 76. Many people say Logical Form cannot be real
77. 77. But Logic is VERY important in Linguistics! • Is it just because computers are important?
78. 78. Logic is the basis of computer science
79. 79. ∃ (existential) • M(jen,mary) • M = mother • Jen is Mary’s mother • ∃xM(x,y) • Someone is the mother of y
80. 80. • ∀y∃xM(x,y) • Everyone has a mother
81. 81. • Likes (ben, emi) • Ben likes Emi • Likes (x, y) • x likes y
82. 82. X = boys, Y = girls • Likes (x, y) • x likes y • (let’s say x = boys and y = girls) • ∃y (Likes (x, y) • There is some girl that x likes
83. 83. • ∃y (Likes (x, y) • There is some girl that x likes • ∀x∃y (Likes (x, y) • Each boy likes a girl
84. 84. Each boy likes a girl Boys Girls
85. 85. Each boy likes a girl Boys Girls
86. 86. Each boy likes a girl Boys Girls
87. 87. ∀x∃y (Likes (x, y)) Boys (x) Girls (y)
88. 88. There’s one girl all the boys like Boys Girls
89. 89. All the boys like the same one girl Boys Girls
90. 90. ∃y∀x (Likes (x, y) Boys (x) Girls (y)
91. 91. Each girl punched a boy Girls Boys
92. 92. ∀x∃y (Punched (x, y) Girls (x) Boys (y)
93. 93. All the girls punched the same boy Girls (x) Boys (y)
94. 94. ∃y ∀x (Punched (x, y) Girls (x) Boys (y)
95. 95. p → q • p = Jim is dead • q = Mary is sad • p → q = • If Jim is dead, Mary is sad
96. 96. p V q • p = My parrot is clever • q = Taro fell over • p V q = • (either) my parrot is clever or Taro fell over
97. 97. p → q • p = I study hard • q = I will pass the test • p → q = • If I study hard, I will pass the test
98. 98. ¬p → ¬q • P = I study hard • Q = I will pass the test • ¬p → ¬q = If I do not study hard, I will not pass the test • If NOT(I study hard) then NOT (I will pass the test)
99. 99. p → q • Normal everyday values for p and q • p = a bear has warm blood • q = a bear is a mammal
100. 100. ¬p → q • Normal everyday values for p and q • p = you study hard • q = you will fail • If you DON’T study hard, you will fail
101. 101. Modern Linguistics • Studying language helps us understand the human brain • Do you think the human brain works like computer code? • Do you think studying language tells us something about the brain?