6
$\begingroup$

I've been trying to prove this for a long time now, anyone willing to offer some help or get me pointed in the right direction?

$(x>0 \implies z = x) \wedge (x < 0 \implies z = -x) \implies z \ge 0$

  • 0
    Re-tagged as "logic" instead of "higher-order-logic", as this is first-order logic.2011-03-21

2 Answers 2

4

Hint: What happens if x = 0? Does that say anything about z?

3

As Robert's answer indicates, the statement is false. However, changing the first $>$ to $\geq$ gives a true statement which I would use a proof by contradiction, that is assume $z < 0$ and $(x \geq 0 \implies z = x) \wedge (x < 0 \implies z = -x)$ and derive a contradiction. This can be done as follows:

$(z < 0) \wedge ((x>0 \implies z = x) \wedge (x < 0 \implies z = -x))$ $\implies (((x \geq 0 \implies z = x) \wedge z < 0) \wedge ((x < 0 \implies z = -x) \wedge z < 0))$ $\implies ((x \geq 0 \implies x < 0) \wedge (x < 0 \implies -x < 0))$ $\implies ((F \wedge (x < 0 \implies -x < 0)) \vee ((x \geq 0 \implies x < 0) \wedge F))$ $\implies (F \vee F)$ $\implies F$ $\therefore \neg((z < 0) \wedge ((x \geq 0 \implies z = x) \wedge (x < 0 \implies z = -x)))$ $\therefore (x \geq 0 \implies z = x) \wedge (x < 0 \implies z = -x) \implies z \ge 0$

  • 0
    @Joriki: Thanks, I missed that. Fixed.2011-03-24