Logic Homework, writing in latex