I am trying to define a function that is zero when it is evaluated on real numbers and on a preset list of symbols. I am doing this by using
f[x_]:=0/;Element[x,Reals]||MemberQ[{m,a,b},x]
where {m,a,b} are the set of symbols I want the function to be zero on. The problem is, I can't seem to set more rules for the function f. For example, if I try to set the rule
newRule= {f[x_]:>g[x]+q[x]}
Mathematica evaluates this to
newRule={0:>g[x]+q[x]}
How should a set the pattern for f so that I can make rules that do not evaluate to zero?
I am using Mathematica 11.