Studies in logic and the foundations of mathematics