Proof verification: For any function $f:A\rightarrow B$ there exists a function $g:B \rightarrow A$ so that $g \circ f=I_A$

46 Views Asked by At

Statement: For any function $f:A\rightarrow B$ there exists a function $g:B \rightarrow A$ so that $g \circ f=I_A$

My proof:

Negation: There exists a function $f: A \rightarrow B$ so that for all functions $g: B \rightarrow A$, $g \circ f \neq I_A$

Choose $A=\{1,2\}$ and $B=\{3\}$. Choose $f: A \rightarrow B$ defined as $f(1)=3$, $f(2)=3$.

$$g \circ f(1)=g(f(1))=g(3)=g(3)=g(f(2))=g \circ f(2)$$

so $g \circ f(1)= g \circ f(2)$

This is where i'm not sure how to finish the proof. Is it valid to state that $I_A(1) \neq I_A(2)$ so therefore $g \circ f \neq I_A$? Do I use contradiction? or is there a better way of proving this?