Exercise-ch2: Difference between revisions

From Lexical Resource Semantics
Jump to navigation Jump to search
Line 10: Line 10:
1-place predicates: '''hobbit''', '''wizard'''<br />
1-place predicates: '''hobbit''', '''wizard'''<br />
2-place predicates: '''know''', '''help'''
2-place predicates: '''know''', '''help'''
=== Formulae without variables ===


<quiz display="simple">
<quiz display="simple">
Line 32: Line 34:
- '''frodo'''
- '''frodo'''
+ '''hobbit'''('''aragorn''')
+ '''hobbit'''('''aragorn''')
+ &forall;''x'' ('''hobbit'''(''x'') &sup; x = '''gandalf''')
+ &exist;''y''('''hobbit'''(''x'') &or; '''wizard'''(''gandalf''))
|| Note: The variable bound by the quantifier, ''y'', need not occur in the scope of the quantifier.
</quiz>
=== Formulae with variables ===
<quiz display="simple">
{Click on the items that are well-formed expressions of the semantic representation language.
}
+ ''y''
- ''x'' &and; '''frodo'''
- &exist;''x''
|| A quantifier, "&forall;" or "&exist;", can only be used with a variable and a formula. For example: &exist;''x''('''hobbit'''(''x''))
{Click on the expressions that are well-formed formulae.
}
+ &forall;''x'' ('''hobbit'''(''x'') &sup; x = '''gandalf''')
+ &forall;''x'' ('''hobbit'''(''x'') &sup; x = '''gandalf''')
+ &exist;''y''('''hobbit'''(''x'') &or; '''wizard'''(''gandalf''))
+ &exist;''y''('''hobbit'''(''x'') &or; '''wizard'''(''gandalf''))

Revision as of 20:53, 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
x
know(gandalf)
help(aragorn,frodo)

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

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


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))