A function f:A->B is said to be invertible if there exists a function g:b->A such that
f(g(y)) = y for all y belong to B and g(f(x) = x for all x belong to A.
f is invertible if and only if f is both one-to-one and onto.