# Inverse on a restricted domain

I have a function, whose domain is [0,1]. The function is

f = Piecewise[{{Exp[-β * (-Log[#])^α], 0 < # <= 1}}, #]&


with β > 0 and α > 0

(side note: is this the best way of defining the function such that it's Exp[-β * (-Log[#])^α] on (0,1] and 0 at 0?)

I would now like to use the inverse of this function, which I'm pretty sure exists (and is E^(-(-1)^((1/α)) β^(-1/α) Log[w]^(1/α))). However,

InverseFunction[f]


simply returns the call and not the actual inverse.

At this point I'm not sure whether it's my lousy Mathematica skills that keep me from getting the correct inverse or whether there's something in the math that I've neglected to consider. What am I doing wrong? How do I tell Mathematica to just find the inverse on [0,1] and how do I tell it that both parameters are positive?

In this case, I would restrict the domain of the inverse after inverting it, as follows

invf = InverseFunction[Exp[-β (-Log[#])^α] &]
(* E^(-(-1)^((1/α)) β^(-1/α) Log[#1]^(1/α))& *)

Piecewise[{{E^(-(-1)^((1/α)) β^(-1/α) Log[#1]^(1/α)), 0 < # <= 1}}, #]&


or, a little more programmatically

With[{f = invf[], Piecewise[{{f, 0 < # <= 1}}, #]&]


where the With gets around the HoldAll attribute of Function. Although, this works, too:

Piecewise[{{invf[#], 0 < # <= 1}}, #]&