A Logical Approach to Discrete Math