COMP 140-04B
Foundations of Computer Science
Test 4
14th October 2004
Family Name:
Given Name:
ID Number:
Instructions
1. First write your name and ID number into the space above.
2. Write your answers into the space provided.
3. If the space provided is insufficient, continue writing on the back side of the page, or on the spare page at the end of this test. If that also is insufficient, additional paper can be obtained from the lecturer. Do not use paper of your own.
4. There are five questions, worth 10 marks each. Answer all of them.
5. Time allowed is 40 minutes.
6. Do not fill the table below.
1 2 3 4 5 Total
a) Write down the →-elimination rule (→-elim)for natural deduction as given in the lec- tures.
b) What other name is frequently given to this rule?
c) Write down the→-introduction rule (→-intro)for natural deduction as given in the lec- tures.
d) Explain how to use the→-introduction rule.
e) Can there be a sound deductive system that does not use at least one of these two proof rules?
Give natural deduction proofs for the following propositional formulas under the premises given in each case. Write each proof step on a numbered line of its own, and indicate for each line how it was obtained.
a) Give a proof forp→rfrom the premisesp→qandp∧q→r.
b) Give a proof for(p→q)→(¬q → ¬p)without premises.
Consider a language of predicate logic with the predicate symbols lion, zebra, predator, andeats, and their intended meaning given as follows.
• lion(x)means thatxis a lion.
• zebra(x)means thatxis a zebra.
• predator(x)means thatxis a predator.
• eats(x, y)means thatxlikes to eaty.
Translate the following sentences into predicate logic, using only the above predicate symbols.
a) There exists a lion.
b) All lions are predators.
c) Nothing is both a lion and a zebra.
d) Some lions like to eat zebras.
e) Some lions only like to eat zebras.
State for each of the following predicate logic formulas whether they are valid, satisfiable but not valid, or unsatisfiable.
a) ∃x white(x)
b) ∀x(white(x)∧black(x))
c) ∃x white(x)∧ ∀x¬white(x)
d) ∀x(white(x)∧black(x))→(∀x white(x)∧ ∀x black(x))
e) ∀x(white(x)∨black(x))→(∀x white(x)∨ ∀x black(x))
Give a natural deduction proof for the predicate logic formula
∃x(white(x)∨black(x))→(∃x white(x)∨ ∃x black(x))
without premises. Write each proof step on a numbered line of its own, and indicate for each line how it was obtained.