assignment 5: proof for exercise 4