Propositional and predicate logic
Discrete Mathematics · Engineering
Study notes
Prove that if n squared is even then n is even, using the contrapositive method. Assume n is odd, so n equals 2k plus 1 for some integer k. Then n squared equals 4k squared plus 4k plus 1, which factors as 2 times (2k squared plus 2k) plus 1, clearly odd. We proved that n odd implies n squared odd, which is the contrapositive of our goal. Therefore the original statement holds. In predicate logic this is: for all n, if Even(n squared) then Even(n).