While I was working on proofs of functions, the following claim occurred to me that I think it is correct but I could not prove it. Please note that the claim may not be correct since it is just my hypothesis. So my hypothesis is:
Let $A$ be a finite set and $F$, a function $F:A\rightarrow A$. $F$ is surjective if and only if $F$ is injective.
Here is how I tried to prove it:
- $\rightarrow$ Let $X$, $Y$, $Z$ and assume $F(X)=F(Y)$. We need to show that $X=Y$ to prove that $F$ is $1-1$. $F(X)$ and $F(Y)\in A$ and $F$ is surjective then $\text{Img}(F)=A$. $A$ is a finite set then $\text{Img}(F)$ is a finite set.
how can I continue the proof?
- $\leftarrow$ We need to show that $A=\text{Img}(F)$ to show that $F$ is surjective but we know that $\text{Img}(F)\subseteq A$ so we need to show $A\subseteq \text{Img}(F)$. Let $x\in A$. We need to show $x\in\text{Img}(F)$. $A=\text{Dom}(F)$ and $x\in\text{Dom}(F)$ and $F$ is function so there exists $y$ such that $F(x)=y$.
And here also I got stuck. Any ideas how to continue the proof if it is right.. I know that I did not use that $A$ is a finite set and $F$ is injective in one way because I do not see where I can use in my proof.
In general, one has the following
To prove this, we need the following
Proof of the Lemma:
a) Since $f:A\to B$ is injective, $f:A\to \text{im}(f)$ is bijective, and its image set $\text{im}(f)$ is a subset of the finite set $B$, therefore it is finite, and $|A|=|\text{im}(f)|\le|B|$
b) Let $n=|A|$ and let $g:A\to n$ be a bijective function. We would like to define an injective function from $B$ to $n$ and apply a) . Since $f:A\to B$ is surjective, for each $b\in B$ there is at leat one $a\in A$ so that $f(a)=b$, and although there might be more than one element $a$ in $A$ like that, the images via $g$ of those $a$ are natural numbers less than $n$, so we can choose the smallest of them, that is we choose $k$ the smallest natural number from those natural numbers $i$ that verify $i<n$ and $g(a)=i$. We define the function $h:B\to n$ like:
$$h(b)=\text{the smallest}\;k<n\;\text{such that}\;f(g^{-1}(k))=b$$
The function $h$ is injective: if $b,b'\in B$ are so that $h(b)=h(b')=k$, then $b=f(g^{-1}(k))=b'$. From a) , for the injective function $h:B\to n$ with $n\in\mathbb{N}$ - thus $n$ is finite - we can conclude that $B$ is finite and $|B|\le n=A$
Proof of he proposition
$a)\implies b)$: Suppose that $f:A\to B$ is injective, but not surjective: $\text{im}(f)\subset B$. Let $b\in B\text{\im}(f)$. Then $f:A\to B \text{ \ }\{b\}$ and $B \text{ \ }\{b\}$ is a subset of the finite set $B$, so it is a finite set and from a) of the previous lemma, $|B|=|A|\le |B \text{ \ }\{b\}|<|B|$, which is a contradiction.
$b)\implies c)$: We only have to prove that $f$ is injective. Suppose that $f$ is surjective but not injective. Then there exist $a,a'\in A$ so that $a\not=a'$ and $f(a)=f(a')$. The restriction $f\restriction (A \text{ \ }\{a\}):A\to B$ is also surjective. From b) of the previous lemma, $|B|\le |A \text{ \ }\{a\}|<|A|=|B|$, which is a contradiction.
$c)\implies a)$ There is nothing to prove.