I need an operation $\tilde{}$ that lifts another operation (for example, the sum, but this does not have to be limited to real numbers) in the sense that $\widetilde{ (x \oplus y)} = \tilde x + \tilde y $.
I tried to implement this
Til[x⊕y]
Til[x_CirclePlus] := Til[#] & /@ x
Til[x ⊕ y]
where Til
is the tilde. But this yields $ \widetilde{ (x \oplus y)} = \tilde x \color{red}\oplus \tilde y $.
How to replace the red plus by a normal sum?
Alternatively, how can I read each of the summands without using
x_CirclePlus
?
Til[CirclePlus[a_, b_]] := Til[a] + Til[b]
? If I understand you correctly, you would not need your other definition if you use this one. $\endgroup$Til[CirclePlus[args__]] := Apply[Plus, Til /@ {args}]
. $\endgroup$Til
cannot read directly the arguments ofCirclePlus
. As for the second, I didn't know that syntax, sorry. Both work. $\endgroup$Til[x_CirclePlus] := Til /@ Plus@@x
; it is just a slightly shorter version of @J.M.'sTil[CirlePlus[args__]]:=Plus@@(Til/@{args})
$\endgroup$