Tag Info

New answers tagged


I think the reason, at least primarily, that it works differently for Plus is the following from its documentation: Unlike other functions, Plus applies built-in rules before user-defined ones. It may seem a little obscure, because perhaps we don't know all the rules, but these two are mentioned explicitly: Plus[] is taken to be 0. ...


Assignments to MakeBoxes and Format get special treatment. The definitions are stored as (under-documented) FormatValues: FormatValues[baseForm] // InputForm (* {HoldPattern[MakeBoxes[baseForm[a_, b_], fmt_]] :> ToBoxes[BaseForm[a, b]]} *) Note that if we omit InputForm from the expression above, then the system will attempt to apply the formatting ...


With $tz::tzset = "Unable to set $tz to `1`. Time zone should be an integer, real number, a string, or an Entity object."; $tz /: Set[$tz, x_] := If[Internal`PossibleTimeZoneQ[x], OwnValues[$tz] = {HoldPattern[$tz] -> x}; x, Message[$tz::tzset, x, False]] $tz = 1 $\ $1 and $tz = "America/Agloe" $tz $\ $1


Your definition a[x_] == a[y_] ^:= Round[x] == Round[y] Is structural. It tells Mathematica how to rewrite certain expressions. It has no mathematical meaning. Mathematica has no mechanism to infer mathematical meaning from the rewrite rules you provide. It cannot determine what mathematical consistency might mean for your symbols. Rewrite rules are not ...

Top 50 recent answers are included