Is this definition correct for the inverse of a function?
Let $f:X\to Y$ be a function. The inverse of $f$ is the function $g:Y\to X$ such that $g\circ f=i_X$ and $f\circ g=i_Y$. We denote the inverse of $f$ by $f^{-1}$.
Is this definition correct for the inverse of a function?
Let $f:X\to Y$ be a function. The inverse of $f$ is the function $g:Y\to X$ such that $g\circ f=i_X$ and $f\circ g=i_Y$. We denote the inverse of $f$ by $f^{-1}$.
The formulation of the definition in the OP assumes existence and uniqueness of the inverse, and existence is not there always while uniqueness has to proved. I would reformulate it as: