I'm using value-defined function as set of parameter, i.e.
f[1] ===> first parameter
f[2] ===> second parameter
f[3] ===> third parameter
etc. I would like to tell Mathematica that all these parameters are positive. I tried something like
FullSimplify[Abs[f[1]],Assumptions-> {f[x_]>0}]
and I get
Abs[f[1]]
instead of the desired
f[1]
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?
Thread[Table[f[i], {i, fmin, fmax}] > 0]
? $\endgroup$f[1] > 0
inAssumptions
does work. Doesn't pattern matching work here, and if so, why? $\endgroup$UpValue
forf
, either withf /: Abs[fun : f[_]] := fun
or withAbs[fun : f[_]] ^:= fun
. This will evaluateAbs[f[1]]
tof[1]
, for instance, without the need of usingAssumptions
andFullSimplify
. $\endgroup$