Exercise-ch2: Difference between revisions

From Lexical Resource Semantics
Jump to navigation Jump to search
Line 22: Line 22:
- '''frodo''' ∧ '''gandalf'''
- '''frodo''' ∧ '''gandalf'''
|| The connectors "∧" and "∨" can only be used to combine two formulae.
|| The connectors "∧" and "∨" can only be used to combine two formulae.
- ∃''x''
|| A quantifier, "∀" or "∃", can only be used with a variable and a formula. For example: ∃''x''('''hobbit'''(''x''))
- '''know'''('''gandalf''')
- '''know'''('''gandalf''')
|| '''know''' is a 2-place predicate. Therefore it must combine with two arguments.
|| '''know''' is a 2-place predicate. Therefore it must combine with two arguments.
Line 34: Line 32:
- '''frodo'''
- '''frodo'''
+ '''hobbit'''('''aragorn''')
+ '''hobbit'''('''aragorn''')
+ ∀''x'' ('''hobbit'''(''x'') ⊃ x = '''gandalf''')
+ '''hobbit'''('''frodo''') ∧ '''wizard'''('''gandalf''')
+ ∃''y''('''hobbit'''(''x'') ∨ '''wizard'''(''gandalf''))
- '''hobbit'''('''frodo''') ¬ '''wizard'''('''sam''')
|| Note: The variable bound by the quantifier, ''y'', need not occur in the scope of the quantifier.
|| "¬" combines with '''one''' formula only, not with two.
 
</quiz>
</quiz>



Revision as of 21:12, 15 March 2013

Additional Exercises for Chapter 2: Predicate Logic

The syntax of predicate logic

For the following exercises we use names and properties from the The Lord of the Rings novels.

Names: frodo, sam, gandalf, aragorn
1-place predicates: hobbit, wizard
2-place predicates: know, help

Formulae without variables

1 Click on the items that are well-formed expressions of the semantic representation language.

gandalf
hobbit
sauron
frodogandalf
know(gandalf)
help(aragorn,frodo)

2 Click on the expressions that are well-formed formulae.

hobbit
frodo
hobbit(aragorn)
hobbit(frodo) ∧ wizard(gandalf)
hobbit(frodo) ¬ wizard(sam)


Formulae with variables

1 Click on the items that are well-formed expressions of the semantic representation language.

y
xfrodo
x

2 Click on the expressions that are well-formed formulae.

x (hobbit(x) ⊃ x = gandalf)
y(hobbit(x) ∨ wizard(gandalf))