Alternate proof for a problem using logic

44 Views Asked by At

I applied Modus Tollens and De Morgan's laws to the following property of primes:

If $p$ is a prime and $p | ab$ for $a, b \in \mathbb{Z}$, then either $p|a$ or $p|b$.

Modus Tollens: If not ($p|a$) or ($p|b$) then $p$ is not (a prime and $p|ab$).

By De Morgan's laws, If $p \nmid a$ and $p \nmid b$, then $p$ is not a prime or $p \nmid ab$.

Is it possible to use this to prove the following statement?

If $n$ is not a prime, then $a, b \in \mathbb{Z} : n | ab$ but $n \nmid a$ and $n \nmid b$.

I'm thinking about applying De Morgan to that statement but wouldn't know how when there's a "but".