Solution (source code)

= Solution

\b[The <function> is <injective> and <surjective>, with <inverse function> $f^{-1}(y)=1-y$.] Equality $1-x=1-x'$ forces $x=x'$. For any $y\in(0,1)$, the input $x=1-y$ also lies in $(0,1)$ and satisfies $f(x)=y$. Applying the <function> twice returns the original input.