- 151 Views
- Updated On :
- Presentation posted in: General

Overview of this lecture. Inferences on the sentence levelEntailmentParaphraseContradictionUsing logic to understand semanticsIntroduction to propositional logicSyntax and SemanticsDifferent kinds of logics. Making inferences. Meaning relations between expressions in a languageEntailmentsParaphrasesContradictions.

Propositional Logic Johan Bos

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

**1. **Propositional Logic
Johan Bos

**2. **Overview of this lecture Inferences on the sentence level
Entailment
Paraphrase
Contradiction
Using logic to understand semantics
Introduction to propositional logic
Syntax and Semantics
Different kinds of logics

**3. **Making inferences Meaning relations between expressions in a language
Entailments
Paraphrases
Contradictions

**4. **Entailment, definition A sentence expressing a proposition X entails a sentence expressing a proposition Y if
it is not possible to think of a situation where X is true and Y is false
Or, put differently: the truth of Y follows necessarily from the truth of X

**5. **Entailments, examples the sentences 2, 3, and 4 are entailed by sentence 1:
Dylan stroked the cat and hugged the dog.
Dylan hugged the dog.
Someone stroked the cat.
Dylan hugged an animal.

**6. **Paraphrases, definition Two sentences are paraphrases of each other if they entail each other
Put differently: whenever one is true, the other must also be true

**7. **Paraphrases, examples The following sentences are paraphrases of each other:
Dylan stroked the cat and hugged the dog.
Dylan hugged the dog and stroked the cat.
The cat was stroked by Dylan and the dog was hugged by Dylan.

**8. **Contradiction, definition Two sentences are contradictory if it is impossible to think of a situation where both sentences can be true

**9. **Contradiction, examples Sentence 1 and 2 are contradictions, and so are sentence 1 and 3:
Dylan stroked the cat and hugged the dog.
The dog wasn’t hugged.
Nobody stroked anything.

**10. **Side remark Usually references and contexts are kept constant in natural language inferences!
Example:
Dylan likes Groucho.
Dylan hates Groucho.
Contradiction or not?

**11. **Side remark Usually references and contexts are kept constant in natural language inferences!
Example:
Dylan likes Groucho.
Dylan hates Groucho.
Contradiction or not?
“Of course the sentences are contradictory. You can’t hate and like someone at the same time.”
“The sentences are not contradictory. I meant Dylan Dog in the first sentence, and Bob Dylan in the second…”

**12. **Formal Semantics Study of meaning with the help of (mathematical) logic
Has been controversial for some time, but now widely accepted
"Aren’t human languages imperfect and illogical anyway?"
"Human languages have their own internal logic!"

**13. **Human vs. logical languages Languages such as Italian, English and Dutch are human languages (natural or ordinary languages)
Logical systems are also referred to as languages by logicians; these are of course artificial languages; to avoid confusion they are sometimes called formal languages or calculi

**14. **Basic idea of formal semantics Provide a mapping from ordinary language to logic

**15. **Logical languages
propositional logic
modal logic
description logic
first-order logic (predicate logic)
second-order logic
higher-order logic

**16. **This lecture In this lecture we will try to map English to Propositional Logic
Propositional logic is suitable to model the basics of sentence semantics
As we will see it is not very useful for modelling sub-sentential semantics, for which usually more expressive logics are needed

**17. **Why is this a useful exercise? Description of some aspects of meaning in language
Detect ambiguities or imprecisions in natural language
Most of the literature in formal semantics presuppose familiarity with propositional and first-order logic

**18. **Propositions What is a proposition?
Something that is expressed by a declarative sentence making a statement
Something that has a truth-value
Propositions can be true or false
There are only two possible truth-values True (or T, or 1)
False (or F, or 0)

**19. **Propositional logic Propositional logic is a language
So we will look at its ingredients
We will define the syntax, or in other words, the grammar
We will define the semantics

**20. **Ingredients of propositional logic Propositional variables
Usually: p, q, r, …
Connectives
The symbols: ?, ?,?, ?, ?
Often called logical constants
Punctuation symbols
The round brackets ( )

**21. **Propositional variables Variables are used to stand for propositions
Usually, the letters p, q, r are used for propositional variables
Example
p ? “It is raining outside."
q ? “Eva Kant is reading a newspaper.“
Note:
the internal structure of propositions is not of our concern in this lecture

**22. **Syntax of propositional logic All propositional variables are propositional formulas
If ? is a propositional formula, then so is ??
If ? and ? are propositional formulas, then so are (???), (???), (???) and (???)
Nothing else is a propositional formula

**23. **Which of these are propositional formulas? (p?p)
p
???q
((p?q)?(?q))
((p?q)?q?r)
(p?(p?(p?p)))
(?r?q)
(?((p?q)??q))
?(p?p))

**24. **Which of these are propositional formulas? (p?p)
p
???q
((p?q)?(?q))
((p?q)?q?r)
(p?(p?(p?p)))
(?r?q)
(?((p?q)??q))
?(p?p)) Yes
Yes
Yes
No
No
Yes
No
No
No

**25. **Logicians are only human Even though logicians and mathematicians are usually very precise in their formulations, they sometimes drop punctuation symbols if this does not give rise to confusion
Often outermost brackets are dropped; also other brackets if no confusion arises

**26. **Logicians are only human Even though logicians and mathematicians are usually very precise in their formulations, they sometimes drop punctuation symbols if this does not give rise to confusion
Often outermost brackets are dropped; also other brackets as long as no confusion arises
Examples:
p ? q instead of (p ? q)
p ? (q ? r) instead of (p ? (q ? r))
(p ? q ? r) instead of (p ? (q ? r))

**27. **Negation Symbol: ?
Pronounced as: “not”
?? is called the negation of ?
Truth-table:

**28. **Negation: examples p ? “It is raining." ?p ? “It is not raining.”
p ? “Eva said something." ?p ? “Eva didn’t say anything.”
p ? “Diabolik sometimes lies." ?p ? “Diabolik never lies.”

**29. **Conjunction Symbol: ?
Pronounced as: “and”
(???) is called the conjunction of the conjuncts ? and ?
Truth table:

**30. **Conjunction: examples p ? “The plan is simple.” q ? “The plan is effective." (p?q) ? “The plan is simple and effective."
p ? “Diabolik was in trouble.” q ? “Diabolik managed to escape." (p?q) ? “Although he was in trouble, Diabolik managed to escape."

**31. **Disjunction Symbol: ?
Pronounced as: “or”
(???) is called the disjunction of the disjuncts ? and ?
Truth table:

**32. **Disjunction: examples p ? “Eva has a gun." q ? “Eva has a knife." (p?q) ? “Eva has a gun or a knife (or both)."
p ? “He is a fool." q ? “He is a liar." (p?q) ? “He is a fool or a liar (or both)."

**33. **(Material) Implication Symbol: ?
Pronounced as: “implies” or “arrow”
Truth table:

**34. **Implication: examples p ? “Ginko shot Diabolik." q ? “Diabolik is wounded." (p?q) ? “If Ginko shot Diabolik then Diabolik is wounded."
p ? “The paper will turn red." q ? “The solution is acid." (p?q) ? “If the paper turns red, then the solution is acid."

**35. **Equivalence (biconditional) Symbol: ?
Pronounced as: “if and only if”
Truth table:

**36. **Equivalence: examples p ? “The number is even." q ? “The number is divisible by two." (p?q) ? “The number is even precisely if it is divisible by two."
p ? “The company has to be registered." q ? “The annual turnover of the company is above Euro 5,000." (p?q) ? “The company has to be registered just if its annual turnover is above Euro 5,000."

**37. **Problematic cases “Eva wants a black and white cat.”
“Eva wants a black cat” ? “Eva wants a white cat”
“Geller can read your mind or he can bend spoons”
“Geller can read your mind” v “Geller can bend spoons”
“If you want to wash your hands, the bathroom is first on the left”
“You want to wash your hands” ? “the bathroom is first on the left”

**38. **Problematic cases “Eva wants a black and white cat.”
“Eva wants a black cat” ? “Eva wants a white cat”
“Geller can read your mind or he can bend spoons”
“Geller can read your mind” v “Geller can bend spoons”
“If you want to wash your hands, the bathroom is first on the left”
“You want to wash your hands” ? “the bathroom is first on the left”

**39. **Problematic cases “Eva wants a black and white cat.”
“Eva wants a black cat” ? “Eva wants a white cat”
“Geller can read your mind or he can bend spoons”
“Geller can read your mind” v “Geller can bend spoons”
“If you want to wash your hands, the bathroom is first on the left”
“You want to wash your hands” ? “the bathroom is first on the left”

**40. **Problematic cases “Eva wants a black and white cat.”
“Eva wants a black cat” ? “Eva wants a white cat”
“Geller can read your mind or he can bend spoons”
“Geller can read your mind” v “Geller can bend spoons”
“If you want to wash your hands, the bathroom is first on the left”
“You want to wash your hands” ? “the bathroom is first on the left”

**41. **Translate these in logic Neither I nor my wife speak Russian.
If I am not Italian then I am not allowed to play for the Italian football team.
You will get a room provided you have no pets.
Diabolik will not fail to find the diamonds.

**42. **Semantic relations

**43. **Semantic relations

**44. **Different Logics
propositional logic
modal logic
description logic
first-order logic (predicate logic)
second-order logic
higher-order logic

**45. **Logics and how they relate

**46. **Logics and how they relate

**47. **Logics and how they relate

**48. **Logics and how they relate

**49. **Why different logics? Why don’t we take the most expressive logic and use that to analyse semantics?
Answer: different logics have different computational properties
There exists an algorithm to decide whether a formula is a validity (a theorem) for propositional and modal logic
But there is no such algorithm for first-order logic (or higher-order logic) [In logical terms: first-order logic “is undecidable”]

**50. **A note on notation…
Negation: ? or ?
Conjunction: ? or &
Implication: ? or ?
Equivalence: ? or ?
Brackets: (…) or […]

**51. **Summary

**52. **Truth Tables We will look at the role of tautologies in propositional logic
Explain the method of truth tables to detect tautologies
Apply this formal method to textual entailment

**53. **Tautologies A formula that is true in all situations is called a tautology or a semantic theorem
Examples of tautologies: (p??p) (q?q) (p???p) (p?(q?p)) (p?(q?p)) ((p?q)?((p?q)?(q ?p))

**54. **Checking for tautologies How can we systematically check whether some formula is a tautology?
This is the business of theorem proving
This is what mathematicians do, and
therefore is not our main concern here
There are many methods
Using semantic tableaux (intuitive)
Using resolution (advanced)
Using truth-tables (nice for simple cases)

**55. **Using a truth-table Example: (p??p)
1) Make a column for all propositional variables with possible truth-values

**56. **Using a truth-table Example: (p??p)
2) Add columns for all sub-formulas

**57. **Using a truth-table Example: (p??p)
3) Put the formula itself in the last column

**58. **Using a truth-table Example: (p??p)
4) Fill in the truth values for the columns using the tables of the connectives

**59. **Using a truth-table Example: (p??p)
4) Fill in the truth values for the columns using the tables of the connectives

**60. **Using a truth-table Example: (p??p)
4) Fill in the truth values for the columns using the tables of the connectives

**61. **Using a truth-table Example: (p??p)
4) Fill in the truth values for the columns using the tables of the connectives

**62. **Using a truth-table Example: (p??p)
4) Fill in the truth values for the columns using the tables of the connectives

**63. **Using a truth-table Example: (p??p)
5) Check the values in the last column

**64. **Another example Example: (p ? q)
1) Make a column for all propositional variables with possible truth-values

**65. **Another example Example: (p ? q)
2) Add columns for sub-formulas

**66. **Another example Example: (p ? q)
3) Add formula itself in last column

**67. **Another example Example: (p ? q)
4) Fill in the truth values

**68. **Another example Example: (p ? q)
5) Check values in last column

**69. **Which of the following are tautologies? (p?(p?q))
(p?(q??r))
((p?q)?p)
((?p?q)?(p?q))

**70. **Tautologies and inference We are now ready to formalise the notions of
Entailment
Paraphrase
Contradiction
Some notational convention
If S is a sentence, then we will write S' meaning the logical translation of S.

**71. **Entailment Let S be a sentence and S' the logical translation of S. Then:

**72. **Paraphrase Let S be a sentence and S' the logical translation of S. Then:
Note: If S1 entails S2, and S2 entails S1, then S1 and S2 are paraphrases

**73. **Contradiction Let S be a sentence and S' the logical translation of S. Then:
Note: If a set of a sentences is not contradictory, they are called consistent

**74. **Consistency If someone supports Inter today, and Milan tomorrow, that is clearly inconsistent, but not the logically kind of consistency that we are interested in
A set of formulas is consistent if they are true in at least one situation

**75. **Entailment, example 1 Translate into propositional logic and check if entailment holds:
Diabolik found the treasure.
Eva will be happy if Diabolik found the treasure.
-----------------------------------------------------
Eva will be happy.

**76. **Entailment, example 2 Translate into propositional logic and check if entailment holds:
Diabolik found the treasure.
Eva will be disappointed if Diabolik didn’t find the treasure.
-----------------------------------------------------
Eva won’t be disappointed.

**77. **Entailment or not? Milan is a more expensive city than Rome.
Rome is an expensive city.

**78. **Entailment or not? All churches in Rome are beautiful.
All old churches in Rome are beautiful.

**79. **Further reading Cann (1993): Formal Semantics; An introduction, Chapter 7
Hodges (1977): Logic. An introduction to elementary logic.
Hurford & Heasley (1983): Semantics. A coursebook, Unit 10
Lyons (1977): Semantics, Volume 1, Chapter 6