I wanted to define a general function of many variables which can be used as substitution rule at many points. Here is an example:
rule:=f(???,??) = -???-??;
ex:=f(-a,-b);
substitute(ex,rule);
which gives $a+b$ and is correct. But, if I do
rule:=g(?,??,???) = -?-??-???;
ex:=g(-a,-b,-c);
substitute(ex,rule);
it gives $-a+b+c$ instead of $a+b+c$. The problem seems to be with using single ?. This disappears when I use ???? or ?????. For example
rule:=h(????,??,???) = -????-??-???;
ex:=h(-a,-b,-c);
substitute(ex,rule);
which gives correct result $a+b+c$.
Is there a general way to define such functions?
Thanks.