0
$\begingroup$

Yes, I know, I should never actually do this in a package or something. But I'm curious - how could I undefine Times or Plus or the like? I tried Unprotect and Clear, but that didn't seem to work.

$\endgroup$
4
  • $\begingroup$ Related: (19126), (89832) $\endgroup$
    – Michael E2
    Commented Dec 5, 2016 at 11:41
  • $\begingroup$ Also: 48929 $\endgroup$
    – Kuba
    Commented Dec 5, 2016 at 11:43
  • $\begingroup$ Hm. Interesting, but that doesn't answer the question for Dot, which as far as I know isn't defined this way and still refuses to be redefined. $\endgroup$ Commented Dec 5, 2016 at 11:47
  • 1
    $\begingroup$ Why? Unprotect[Dot]; Dot[x_, y_] := x^2 + y^2; Protect[Dot]; then Dot[a, b] yields $a^2+b^2$, and Dot[2, 5] gives $29$. Although this trick indeed doesn't work for Plus. $\endgroup$
    – corey979
    Commented Dec 5, 2016 at 13:27

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.