0
$\begingroup$

I would like to define a function f(x,y,z) by its attribute, namely by the specific equation f(b,c,d)f(a,b+c,d)f(a,b,c)=f(a+b,c,d)f(a,b,c+d) for all a,b,c,d. Is it pssible to set this specific attribute to f?

$\endgroup$
1
  • $\begingroup$ Will this be used in simplifying expressions? You could perhaps use your constraint (expressed as an equation, using ==) as an Assumption within Simplify. Can you provide some more context? $\endgroup$ – MarcoB Feb 9 '17 at 17:10
3
$\begingroup$

Use UpSet

f /: f[b_, c_, d_] f[a_, b_ + c_, d_] f[a_, b_, c_] = 
  f[a + b, c, d] f[a, b, c + d];

f[b, c, d] f[a, b + c, d] f[a, b, c]

(*  f[a, b, c + d] f[a + b, c, d]  *)

f[y, x, t] f[z, y + x, t] f[z, y, x]

(*  f[z, y, t + x] f[y + z, x, t]  *)

However, this won't work for numeric inputs that cause the additions to be carried out

f[2, 3, t] f[z, 2 + 3, t] f[z, 2, 3]

(*  f[2, 3, t] f[z, 2, 3] f[z, 5, t]  *)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.