Semantics 1, WiSe 2016/17, Week 4: Difference between revisions
Line 210: | Line 210: | ||
<hr /> | <hr /> | ||
Back to | Back to | ||
* the page of [[Semantics_1,_WiSe_2016/17_(Sailer)|Semantics 1 (WiSe 16/17)]] | |||
* the [[Exercise-ch2|exercises for chapter 2]] | * the [[Exercise-ch2|exercises for chapter 2]] | ||
* the material for [[Textbook-chapters#Chapter_2:_Predicate_logic|chapter 2]] | * the material for [[Textbook-chapters#Chapter_2:_Predicate_logic|chapter 2]] |
Latest revision as of 23:58, 31 October 2016
Computing the truth value of atomic formulae
The following video presents the step-by-step computation of the truth value of two atomic formulae. The example uses a model based on Shakespeare's play Macbeth. The two formulae are:
- kill(macbeth,duncan)
- kill(lady-macbeth,macbet)
Formulae with connectives
The following video presents the step-by-step computation of the truth value of two formulae with connectives. The example uses a model based on Shakespeare's play Macbeth. The two formulae are:
- ¬ king(lady-macbeth)
- king(duncan) ∨ king(lady-macbeth)
The next video shows how the truth value of a more complex formula can be computed. The example contains two connectives:
kill(malcom,lady-macbeth) ∨ ¬thane(macbeth)
The video shows two different methods: top down and bottom up.
Truth tables
The following material is an adapted form of material created by student participants of the project e-Learning Resources for Semantics (e-LRS). Involved participants: Lisa, Marthe, Elisabeth, Isabelle.
Truth tables for connectives
AND (∧)
Symbol: ∧
Sentence: Harry is a student and Snape is a teacher.
Formulae: student(harry) ∧ teacher(snape)
A conjunction p ∧ q it true if and only if p is true and q is true.
Truthtable AND
OR (∨)
Symbol: ∨
Sentence: Harry is a student or Snape is a teacher.
Formulae: student(harry) ∨ teacher(snape)
A disjunction p ∨ q is true if and only if p is true or q is true (or both).
Truthtable OR
IF/THEN (⊃, →)
Symbol: ⊃, → (Note: We use the symbol ⊃ in the textbook as it is more common in the logical literature.)
Sentence: If Harry is a student then Snape is a teacher.
Formula: student(harry) ⊃ teacher(snape)
An implication p ⊃ q is true if and only if p is false or q is true (or both).
In other words: An implication p ⊃ q is true if and only if whenever p is true, q is true as well.
Truthtable IF/THEN
NOT (¬)
Symbol: ¬
Sentence: Harry is not a student.
Formula: ¬student(harry)
A negated formula ¬p is true if and only if p is false.
Example: Only if student(harry) is false, ¬student(harry) is true.
Truthtable NOT
Truth tables for complex formulae
Truth tables are also useful to compute the truth value of complex formulae. This is shown in the following podcast, created by Lisa Günthner.
Interpretation of atomic formulae
Interpret the following formulae as true or false. If you have not defined these relations or properties in your model use the ones given in a previous exercise.
- father-of-someone(paul,lisa)
Check your answers
[[father-of-someone(paul,lisa)]] = true iff
< [[paul]], [[lisa]] > ∈ [[father-of-someone]] iff
< I(paul), I(lisa) > ∈ I(father-of-someone) iff
< Paul, Lisa> ∈ {<Paul, Tom>,<Paul, Lisa>}.
Since this is the case, the formula is true.
- blonde(walter)
Check your answers
[[blonde(walter)]] = true iff
< I(walter) > ∈ I(blonde) iff
< Walter > ∈ {< Alice >,< Lisa >}.
Since this is not the case, the overall formula is false.
- enjoy-watching-football-together(alice,tom)
Check your answers
[[enjoy-watching-football-togehter(alice,tom)]] = true iff
< I(alice), I(tom) > ∈ I(enjoy-watching-football-together) iff
< Alice, Tom > ∈ {<Alice, Paul>,<Paul, Alice>,<Alice, Lisa>,<Lisa, Alice>,<Alice, Tom>,<Tom, Alice>,<Paul, Lisa>,<Lisa, Paul>,<Paul, Tom>,<Tom, Paul>,<Tom, Lisa>,<Lisa, Tom>}
Since this is the case, the formula is true.
Interpretation of formulae with logical connectives
Consider these two natural language sentences. While keeping in mind the scenario given in a previous exercise, create complex formulae with logical connectives and compute the interpretation, respectively.
a.) Alice is a dog and Lisa and Tom enjoy watching football together.
Check your answers
Here the interpretation in predicate logic notation:
[[dog (Alice) Ʌ enjoy-watching-football-together (Lisa,Tom)]] = false
because [[dog (Alice)]]= false
- because I(Alice)= <Alice> and <Alice> is NOT an element of I(dog)
- because I(Alice)= <Alice> and <Alice> is NOT an element of I(dog)
and [[enjoy-watching-soccer-together (Lisa,Tom)]] = true
- because I(Lisa)= <Lisa>, I(Tom)= <Tom> and <Lisa,Tom> is in the set of I(enjoy-watching-football-together).
- because I(Lisa)= <Lisa>, I(Tom)= <Tom> and <Lisa,Tom> is in the set of I(enjoy-watching-football-together).
Conjunction (Ʌ): Both atomic formulae have to be true in order for the complex formula to be true.
b.) Tom is not Paul's daughter or Tom is tall.
Check your answers
Sentence: Tom is not Paul's daughter or Tom is tall.
Here the interpretation in predicate logic notation:
[[¬daughter-of-someone (Tom,Paul) v tall(Tom)]] = true
because [[¬daughter-of-someone (Tom,Paul)]]= true
- because I(Tom)= <Tom>, I(Paul)= <Paul> and <Tom,Paul> is NOT in the set of I(daughter-of-someone)
- because I(Tom)= <Tom>, I(Paul)= <Paul> and <Tom,Paul> is NOT in the set of I(daughter-of-someone)
and [[tall(Tom)]] = false
- because I(Tom)= <Tom> and <Tom> is NOT an element of I(tall).
- because I(Tom)= <Tom> and <Tom> is NOT an element of I(tall).
Disjunction (v): At least one of the atomic formulae has to be true in order for the complex formula to be true.
Back to
- the page of Semantics 1 (WiSe 16/17)
- the exercises for chapter 2
- the material for chapter 2
- the overview over all chapters
Back to the course page.