I use the idea of a partition of the domain of F ( that is, of the set A) in classes of elements having the same image. I call P this partition. I want to show that the cardinal of this partition defines a maximum for the cardinal of the codomain of F. And without injectivity, this maximum is necessarily less than the cardinal of A. Which makes surjectivity impossible.
Rk. I use Card(S) to denote : the cardinal number of the set S.
First part : If F is surjective, then F is 1-1.
What is to be proved is equivalent ( by contraposition) to :
if F is not 1-1, then F is not surjective.
(1) since F is a function from A to A, F is surjective iff Card ( Codomain) = Card (A).
(2) Define an equivalence relation on the set A by the following formula : the element x has same image under F as the element y
This equivalence relation partitions A into a collection of sets. Call P this collection . Card(P) is the number of classes of A-elements ( pre-images) such that all elements in each class have the same image ( under F) .
(3) Card (P) = Card A iff F is injective ( it means that injectivity guarantees that there is one and only one element in each cell of the partition).
But if F in not injective ( not 1-1) , Card(P) is less than Card A ( there is at least a cell of the partition that contains 2 elements of the domain, that is, 2 elements of A)
(4) Now Card ( Codomain) is, in any case, at most as great as Card (P) ( the number of images under F cannot be greater that the number of classes of preimages having the same image).
So we have :
By (4) Card (Codomain) is less or equal than Card (P)
By (3) If F is not injective Card (P) is less than Card(A)
Therefore : if F is not injective, Card ( Codomain) is less than Card(A)
But , by (1) if Card ( Codomain) is not equal to Card (A) then F is not surjective.
Therefore, if F is not injective, F is not surjective.
Therefore ( by contraposition) if F is surjective, F is injective.
Second part of the prooF: If F is 1-1, then F is surjective.
(1) we said earlier that Card(P ) is a maximum for Card ( Codomain). We can add that it is also a minimum. Suppose that the number of images is less that the number of cells of equivalent preimages. That would imply that there is at least an image corresponding to 2 different cells. But this leads to a contradiction : if 2 cells are diffferent, their elements cannot have the same image under F ( being given that cells are determined by the equuivalence relation " having the same image under f)
(2) Since we have both Card (Codomain) is at most as great as Card(P) and Card( Codomain) is at least as great as P, we must conclude that
Cardinal(Codomain)=Card (P)
(3) But, if ( by hypothesis) F is 1-1, it means that card (P) = card (A)
( as we said in part 1 of the proof).
(3) So Card (Codomain) = Card (A)
(4) Since F is from A to A, the codomain is a subset of A. Since the only subset of A having the same cardinal as A is A itself, we have
Codomain of F = A
which means that F ( from A to A) is surjective.
(5) Conclusion : If F (from A to A) is injective, then it is also surjective.