Aspects of logic, category theory, and theorem proving