I'm trying to implement smooth approximations of Max and Abs functions. Moreover I want the functions to map element-wise on tensors. Here's my code.
$Assumptions = {
Element[A, Arrays[{i, j, k}, Reals]],
Element[Nlarge, Reals] (* Nlarge tends to infinity *)
};
Hyper[x_] := Map[Exp[Nlarge #1] &, x, -1]
Hypo[x_] := Map[Log[#1]/Nlarge &, x, -1]
SMax[x__] := Hypo[Plus @@ (Map[Hyper, {x}])]
SAbs[x_] := SMax[x, -x]
SAbs[A] // TensorDimensions
I'm expecting it to return {i, j, k}, but instead I get {}. What's wrong with it?
Assumptions. I don't thinkExphas been updated to work with those. – Sjoerd C. de Vries Dec 23 '12 at 21:32