Modality, mathematics, and logic