How Transformers Solve Propositional Logic Problems: A Mechanistic Analysis