Proof verification: If f is injective, f has a left inverse

functionsinverse

I would appreciate verification of the following proof attempt, please. I suspect it is faulty at step 3, as I don't know whether I can use the existence of g as defined below as a premise.

Statement: If a map f is injective, f has a left inverse.

Proof:

  1. Let $f : A \rightarrow B$ be injective.
  2. Then, if $a_{1} \neq a_{2}$, $f(a_{1}) \neq f(a_{2})$. It follows that if $f(a_{1}) = f(a_{2})$, then $a_{1} = a_{2}$.
  3. Let the map g be defined as $g : B \rightarrow A$; $g(f(a)) = a$, $\forall a \in A$.
  4. As $f(a_{1}) = f(a_{2})$, $g(f(a_{1})) = g(f(a_{2})) = a_{1} = a_{2}$, and therefore $g \circ f : A \rightarrow A$ is an identity map on A. As such, f has a left inverse.

Thanks all.

Best Answer

Indeed, you need to define $g$ in order to show that a left inverse exists. What lacks in your definition of $g$ is how an element of $B \diagdown f(A)$ is mapped to $A$. Of course, $B \diagdown f(A)$ could be the empty set, but for the general case, we don't know.

Since $A \neq \emptyset$, let $k \in A$. Since $f$ is injective, it follows that $h: f(A) \to A, b \mapsto f^{-1}(b)$ is bijective. Then we define $g(y)=\begin{cases} k & y \in B\diagdown f(A) \\ h(y) & y \in f(A)\end{cases}$

Now we get for all $a\in A$ that $g(f(a))=a$, so $g \circ f = id_{A}$.

Related Question