I have a class called phi defined on certain ring which morally should be C-valued, ϕ:R→Z, bt from that I need only that adding 0Z to the phi-elements does nothing, and the next (pseudocode) works for adding 0 by the right to the phi elements:
class phi: ...
...
def __add__(self, other):
if type(other) == Integers
return self
How can I define the addition of a left argument in Z with an element of my phi class to be trivial, without changing the __add__ of the Integer class? (Or a work arround. Actually my target is not the integers but the sage symbolic ring, SR.)