solved problem-set4 automate deduction