Element–wise summation for custom function
8
$begingroup$
I use a custom function/head Operator[low, high] which encodes a generic polynomial expression split into "low" and "high" summands following considerations which are irrelevant to this question. Two Operator objects should sum in the following way: Operator[a,b] + Operator[c,d] -> Operator[a+c,b+d] which is just standard element–wise summation that List does automatically. How can I tell Mathematica that this kind of automatic simplification or rearrangement is not only allowed, but desirable?
function-construction
share | improve this question
asked Dec 21 '18 at 15:12
...