I recently started studying logic. Unfortunately, I'm really struggling when it comes to word problems. I would really appreciate if someone could help me understand and solve the following problem.
James is cunning. He sometimes lies and sometimes he tells the truth. When we ask him about his favourite subject, he says:
"If I like analysis, I definitely don't like algebra."
"If I didn't lie in the previous sentence, I'm doing it now and I like algebra."
James of course likes at least one of these two subjects, but which?
Thanks for any help.
Introducing two atomic propositions,
Let us translate.
$$p \to \neg q$$
$$(p \to \neg q) \to \neg q$$
Using modus ponens (implication elimination), we conclude $\neg q$. Thus, James does not like algebra. Since he must like at least one course, he likes analysis.