[Math] General form of a proof that $ab=0 \implies a=0 \lor b=0$

logicpropositional-calculus

When proving that $ab = 0 \implies a = 0 \,\mbox{ or }\,b = 0$ for members $a$ and $b$ of a field, I used an argument like

  1. Suppose $ab = 0$ and $a \ne 0$ … then $b = 0$.
  2. Now suppose $ab = 0$ and $b \ne 0$ … then $a = 0$.
  3. Therefore, if $ab = 0$, then $a = 0$ or $b = 0$.

The general form of that argument would, as far as I can tell, be

$$
(p \land \lnot q \to r) \land (p \land \lnot r \to q) \to (p \to q \lor r)
$$

Is that general form indeed a valid argument? How can I know for sure? (Is there a "for sure"?)

Best Answer

There is a brute force method to check whether a logical formula like the one you indicate holds. Namely, make a truth table: http://en.wikipedia.org/wiki/Truth_table. In other words, consider all $8$ possibilities of $p,q,r\in\lbrace T, F\rbrace$.