First draft of some helper functions for dealing with modal logic.