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.

Predicate calculus

32 views

Published on

A simple introduction to predicate calculus

Published in: Education
  • Be the first to comment

  • Be the first to like this

Predicate calculus

  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. Quantifiers
  18. 18. The Little Prince is wearing a brown scarf
  19. 19. • Wearing_a_brown_scarf (p) • Wearing (p, b_s)
  20. 20. But the Little Prince is the only person in this world
  21. 21. Everyone is wearing a brown scarf
  22. 22. Imagine simple little worlds
  23. 23. What do quantifiers mean?
  24. 24. All – upside-down A
  25. 25. Think of sets
  26. 26. • Two sets • Set A • Set B
  27. 27. • Set A = the set of Linguists • Linguist (x) • Set B = the set of crazy people • Crazy_person (x)
  28. 28. Who is in these sets? • Linguist (x) • {evans, • imai, • ono}
  29. 29. Computer database • Linguist (evans) • Linguist (imai) • Linguist (ono) • Set of linguists = • {evans, imai, ono}
  30. 30. Who is in the set of crazy people? • Crazy_person (x) • {ken, • jim, • ben, • mary, • evans}
  31. 31. Computer database • Crazy_person (evans) • Crazy_person (ken) • Crazy_person (jim) • Crazy_person (ben) • Crazy_person (mary)
  32. 32. Linguist (x)  Crazy_person (x)
  33. 33. All linguists are crazy • ∀x (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.
  34. 34. • Set A = the set of Linguists • Linguist (x) • Set B = the set of crazy people • Crazy_person (x)
  35. 35. Who is in these sets? • Linguist (x) • {evans, • imai, • ono}
  36. 36. Who is in the set of crazy people? • Crazy_person (x) • {ken, • jim, • ben, • mary, • evans}
  37. 37. All linguists are crazy • ∀x (Linguist (x)  Crazy_person (x)) • Is Untrue • Because two members of the set of linguists are not in the set of crazy people.
  38. 38. Some linguists are crazy • Is this True?
  39. 39. • Linguist (x) & Crazy_person (x)
  40. 40. 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
  41. 41. Who is in the set of crazy people? • Crazy_person (x) • {ken, • jim, • ben, • mary, • evans}
  42. 42. 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
  43. 43. Predicate • Mary is a girl • Girl • Girl (mary)
  44. 44. Predicate • Mary lives in Tsuru • Lives_in_Tsuru (mary)
  45. 45. Set of girls • Girl (mary) • Girl (eri) • Girl (rie) • Girl = {mary, eri, rie}
  46. 46. 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}
  47. 47. A girl lives in Tsuru • ∃x • ( • Girl (x) • & Lives_in_tsuru (x) • ) • ∃x (Girl (x) & Lives_in_tsuru (x))
  48. 48. Set of girls • Girl (mary) • Girl (eri) • Girl (rie) • Girl = {mary, eri, rie}
  49. 49. 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}
  50. 50. • ∃x (Girl (x) & Lives_in_tsuru (x)) • Is True!
  51. 51. A girl lives in Fujiyoshida • ∃x • ( • Girl (x) • & Lives_in_fujiyoshida (x) • ) • ∃x (Girl (x) & Lives_in_fujiyoshida (x))
  52. 52. Set of girls • Girl (mary) • Girl (eri) • Girl (rie) • Girl = {mary, eri, rie}
  53. 53. 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}
  54. 54. • ∃x (Girl (x) & Lives_in_fujiyoshida (x)) • Is False!
  55. 55. • 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
  56. 56. Any problems with Predicate Logic? • Yes • We are not always trying to say things that are true
  57. 57. The sky is blue
  58. 58. We don’t say the sky is blue at night
  59. 59. Even though it’s true
  60. 60. • 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))
  61. 61. • 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?
  62. 62. New ideas about how we understand meaning
  63. 63. Language connects to the body
  64. 64. NOT all in the brain!
  65. 65. Also strong evidence for IMAGES rather than CODE
  66. 66. Strong evidence for ACTION simulation
  67. 67. Mental Models as IMAGES
  68. 68. Many people say Logical Form cannot be real
  69. 69. But Logic is VERY important in Linguistics! • The nurse kissed every child on his birthday. • [The nurse] kissed [every child] on his birthday. • Kissed (nurse, every_child)
  70. 70. • ∀x (Child (x)  Kissed (nurse, x)) on x’s birthday • The nurse kissed every child on his birthday
  71. 71. But Logic is VERY important in Linguistics
  72. 72. And logic is the basis of computer science
  73. 73. ∃ (existential) • M(jen,mary) • M = mother • Jen is Mary’s mother • ∃xM(x,y) • Someone is the mother of y
  74. 74. • ∀y∃xM(x,y) • Everyone has a mother
  75. 75. • Likes (ben, emi) • Ben likes Emi • Likes (x, y) • x likes y
  76. 76. 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
  77. 77. • ∃y (Likes (x, y) • There is some girl that x likes • ∀x∃y (Likes (x, y) • Each boy likes a girl
  78. 78. Each boy likes a girl Boys Girls
  79. 79. ∀x∃y (Likes (x, y) Boys Girls
  80. 80. There’s one girl all the boys like Boys Girls
  81. 81. All the boys like one girl Boys Girls
  82. 82. ∃y∀x (Likes (x, y) Boys Girls
  83. 83. p → q • p = Jim is dead • q = Mary is sad • p → q = • If Jim is dead, Mary is sad
  84. 84. p V q • p = My parrot is clever • q = Taro fell over • p V q = • (either) my parrot is clever or Taro fell over
  85. 85. p → q • p = I study hard • q = I will pass the test • p → q = • If I study hard, I will pass the test
  86. 86. ¬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)
  87. 87. p → q • Normal everyday values for p and q • p = a bear has warm blood • q = a bear is a mammal
  88. 88. ¬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
  89. 89. 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?

×