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?
Asked
Active
Viewed 90 times
0
Bipolar Minds
- 265
- 1
- 6
1 Answers
3
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] *)
Bob Hanlon
- 157,611
- 7
- 77
- 198
==) as anAssumptionwithinSimplify. Can you provide some more context? – MarcoB Feb 09 '17 at 17:10