# Assumption on the range of a function

I'm using value-defined function as set of parameter, i.e.

f ===> first parameter
f ===> second parameter
f ===> third parameter


etc. I would like to tell Mathematica that all these parameters are positive. I tried something like

FullSimplify[Abs[f],Assumptions-> {f[x_]>0}]


and I get

Abs[f]


f


Of course here I posted just an example, the function I have to simplify in my case is much more complicated. How can I do?

• Have you tried creating a list of assumptions like Thread[Table[f[i], {i, fmin, fmax}] > 0]? – Feyre Aug 14 '16 at 11:41
• Interestingly using f > 0 in Assumptions does work. Doesn't pattern matching work here, and if so, why? – kirma Aug 14 '16 at 11:45
• Of course this is a solution but in my program I don't know the range of the parameters. I want to tell Mathematica that every value of the function is positive. – MaPo Aug 14 '16 at 11:47
• @MaPo A way I see (not sure whether it fits your need in your more general case) would be to define an UpValue for f, either with f /: Abs[fun : f[_]] := fun or with Abs[fun : f[_]] ^:= fun. This will evaluate Abs[f] to f, for instance, without the need of using Assumptions and FullSimplify. – user31159 Aug 14 '16 at 14:44
• Related: (6182), (42607), (58271), (67343), (79301), (79756), (94983) – Mr.Wizard Aug 15 '16 at 1:05

This constructs assumptions by finding all occurrences of pattern f[_] in the expression being simplified:
FullSimplify[#, Cases[#, v : f[_] :> v > 0, Infinity]] &[

• +1 Or more succinctly: Simplify[#, Cases[#, v : f[_] :> v > 0, Infinity]] &[ Abs[f[f]] + Abs[f[x]]] – Bob Hanlon Aug 14 '16 at 14:57