From wiki, I got every injection $f$ with a non-empty domain has a left inverse $g$. I know how to prove the proposition but just curious why we need to stress the non-empty domain.

If the domain or codomain (or the domain and the codomain) is empty, then the only choice for $f$ is $\emptyset$, then all the statements for $f$ are vacuously true, not alone $f$ has a left inverse, I can even say it has an inverse?

The statement I want to prove is: Let $f$ is a function from $A$ to $B$,

$\forall x,y \in A, f(x)=f(y) \longrightarrow x=y$ $\Leftrightarrow$ $\exists f^{-1} \subset B \times A, f^{-1} f=Id_{A}$

Suppose $X$ and $Y$ are not empty, I have three special cases


Case 1: $f:X \rightarrow \emptyset$

Vacuously True

Case 2: $f:\emptyset \rightarrow \emptyset$

$\exists f^{-1} \subset \emptyset, f^{-1} f=\emptyset=Id_{\emptyset}$

Case 3: $f:\emptyset \rightarrow Y$

$\exists f^{-1} \subset \emptyset, f^{-1} f=\emptyset=Id_{\emptyset}$


1 Answer 1


Only "for all" statements are vacuously true. You ask about a "there exists" statement:

$f$ has a left inverse


There exists $g$ from the codomain (target) of $f$ back to the empty set such that $g \circ f = \operatorname{id}_{\varnothing}$.

Write $X$ for the codomain of $f$ so that $f\colon \varnothing \to X$. Assuming $X$ is nonempty, there are no functions at all $X\to \varnothing$, so no $g$ can exist.

  • $\begingroup$ Then why $X$ is empty, the statement is true? $\endgroup$
    – Andrew_Ren
    Oct 15, 2023 at 23:35
  • $\begingroup$ I don't know which statement you mean. The empty function $g\colon \varnothing \to \varnothing$ is an inverse of the empty function $f\colon \varnothing \to \varnothing$, since their composition $g\circ f$ is the also the empty function, which is equal to $\operatorname{id}_{\varnothing}$ $\endgroup$
    – Dennis
    Oct 15, 2023 at 23:38
  • $\begingroup$ Never mind. I got your point. Thank you. $\endgroup$
    – Andrew_Ren
    Oct 15, 2023 at 23:48
  • $\begingroup$ Sorry, I am lost again. I edited my question, can you explain my wrongness? $\endgroup$
    – Andrew_Ren
    Oct 16, 2023 at 10:17
  • $\begingroup$ The statement with quantifiers as you wrote is incorrect, assuming you want $f^{-1}\colon B \to A$ to be a function (not just a relation). It fails in your Case 3: there are no functions $Y\to\varnothing$, so you have not successfully produced a left-inverse. $\endgroup$
    – Dennis
    Oct 16, 2023 at 18:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .