Exercises in formal logic