I was looking at this question (writing a program such that 2 + 2 = 5) and tried to write something in Mathematica, but I couldn't get something to work without completely replacing Plus
. Neither of these worked:
Unprotect[Plus]
Plus[2, 2] := 5
Unprotect[Integer]
2 + 2 ^= 5
This book suggests that Plus
and Times
have special rules. Is this really impossible to do?
Block[{Plus = Times}, 2 + 3]
$\endgroup$ – Jacob Akkerboom Jun 2 '14 at 11:25Plus
" $\endgroup$ – Artefacto Jun 2 '14 at 12:13