The Logic of the Trinity