Let $f$ be a function from a set $X$ into a set $Y$.
prove:
i) the function $f$ has an inverse if and only if $f$ is bijective ii) let $g_1$ and $g_2$ be functions from Y into X. If $g_1$ and $g_2$ are both inverse function of f, then $g_1 = g_2$, that is $g_1(y) = g_2(y)$ for all $y\in Y$
attempt at i)
--> if $f$ has an inverse this means there exists a function g of $Y$ s.t. $g(y) = x\in X$ but this just means that for every $y\in Y$ there exists an $x\in X$ s.t $f(x) = y$ therefore the function is surjective.
to show that the function is injective:
same assumption of f having an inverse.
Assume $f(x_1) = f(x_2)$ these are elements of Y. taking the inverse function g of both of them: $$\implies \\g(f(x_1)) = g(f(x_2))$$ $$\implies \\x_1 = x_2$$ which shows the function is injective.
Therefore the function is bijective.
Now to go the other way and show the function f has an inverse:
Assuming the function is bijective. By the property of surjectivity, for each $y\in Y$ there exits a $x\in X$ s.t $f(x) = y$ Does this mean that there must exist a function g(i.e the inverse) that would allow each $g(f(x)) = x$? if so that would be the conclusion.
Attempt at ii)
well if $g_1(y)$ and $g_2(y)$ are both inverse functions of f, then take the difference of the two functions:
$$f(x) - f(x) = g_1(y) - g_2(y)$$ $$ 0 = g_1(y) - g_2(y) $$ $$ g_2(y) = g_1(y)$$
now I think I may have the right idea for this one, but I know my notation has to be off because there is no way that $f(x) = g_1(y)$, how would I express this?
For the end of i), You can construct the inverse explicitly: $g(y) = x$, where $x$ is such that $f(x) = y$. Now you need to use injectivity to show that this is well defined.
For ii), your approach cannot be right, since $Y$ is a set with no addition defined. A way to start the proof could be, for example $$g_1\circ f = g_2\circ f $$ Now use the fact that $f\circ g_1=\mathrm{id}_Y$ (compose on both sides with $g_1$).