Any injection $f: A \to A$ is surjective if $A$ is finite I am trying to prove that if $A$ is a finite set, then any injective function $f: A \to A$ is surjective. I have a few alternative proofs of this written. I'm not sure if any of these contain errors or are preferable to another, so I was hoping someone could take a look.
Proof 1.

As $f$ is injective, then there exists a bijection $A \stackrel{\sim}{\to} \mathrm{Im}(f)$, so $|A| = |\mathrm{Im}(f)|$. But since $\mathrm{Im}(f) \subset A$ and $A$ is finite, we must have $\mathrm{Im}(f) = A$.

Proof 2

Let $f$ be injective. As $A$ is finite, there are only $|A|!$ injective maps $A \to A$, so there exists $n \in \mathbb{N}$ such that $f^n = f$. If $n = 2$, then $f^2 = f$. As $f$ is injective, it has a left inverse, so $f = \mathrm{id}_A$, which is surjective, so we can suppose $n > 2$. Composing on the left with $g: A \to A$, the left inverse of $f$, we obtain $f^{n-1} = \mathrm{id}_A$. In particular, given $a \in A$, we have $f(f^{n-1} (a)) = \mathrm{id}_A (a) = a$. So given $a \in A$, there exists $x := f^{n-1} (a) \in A$ such that $f(x) = a$, so $f$ is surjective.

 A: For proof 1, you haven’t proved why $Im(A) = A$. You’ve asserted that because there is a bijection between $Im(A)$ and $A$, they must be the same, but you haven’t proved it.
You could prove it by noting that because $A - Im(A)$ and $Im(A)$ are disjoint sets with union $A$, we must have $|A - Im(A)| + |Im(A)| = |A|$, and therefore $|A - Im(A)| = 0$ and thus $A - Im(A) = \emptyset$. From there, it follows that $Im(A) = A$.
For proof 2, your proof is almost right. Formally, you can conclude that there are $m > n$ such that $f^m = f^n$. You then apply the fact that $f^n$ is injective to show that $f^{m - n} = id_A$. You can then state that since $f \circ f^{m - n - 1} = id_A$, it follows that $f$ is surjective.
However, both proofs may be subtly circular in that they rely on cardinality arguments. But much of the theory of finite cardinalities actually depends on certain elementary principles, one of which being that an injection between a finite set and itself must be a surjection. So the exact way the proof goes will depend on what theorems you are permitted to take for granted.
Here's an example of a proof which relies on only the most basic foundational principles. Let $[n]$ denote the set $\{m \in \mathbb{N} \mid m < n\}$.

Theorem: for all natural numbers $n$, for all functions $f : [n] \to [n]$, if $f$ is injective, then $f$ is surjective.

Proof: we proceed by induction on $n$.
In the case $n = 0$, we see that $[n] = \emptyset$. The only function $f : \emptyset \to \emptyset$ is the identity function $id_\emptyset$, which is surjective.
Now, suppose that every $f : [k] \to [k]$ which is injective is also surjective. Consider some $f : [k + 1] \to [k + 1]$ which is injective.
Suppose that there is some $j < k + 1$ which is not in the range of $f$. Then consider the function $swap : [k + 1] \to [k + 1]$ defined by
$$swap(x) = \begin{cases} 
   k & x = j \\
   j & x = k \\
   x & otherwise
\end{cases}$$
It's easy to verify that $swap$ is injective by simply looking at all 9 possible cases.
Define $g = swap \circ f$. Note that since $g$ is the composition of two injections, $g$ itself is injective.
I further claim that $k$ is not in the range of $g$. For note that $swap(x) = k$ if and only if $x = j$. Therefore, we see that if $g(x) = k$, then $swap(f(x)) = k$, and thus $f(x) = j$. But we have just asserted that this is not possible.
Now since $[k + 1] = \{k\} \cup [k]$, we see that $Im(g) \subseteq [k]$. That is, $g : [k + 1] \to [k]$.
We can restrict the domain and codomain of $g$ to get a function $h : [k] \to [k]$, defined by $h(x) = g(x)$. Clearly, $h$ is also injective.
By the inductive hypothesis, $h$ is surjective. Then there is some $x \in [k]$ such that $h(x) = g(k)$. That is, $g(x) = g(k)$. But since $x \in [k]$, we have $x < k$ and therefore $x \neq k$. This contradicts the fact that $g$ is injective.
Thus, we see that $j$ is in fact in the range of $f$. So the range of $f$ is all of $[k + 1]$, and $f$ is indeed surjective.
This proves our theorem.

Corollary 1: if $f : A \to A$ is injective and $A$ is finite, then $f$ is surjective.

Proof: if $A$ is finite, take some $n$ and a bijection $g : [n] \to A$. Then we see that $g^{-1} \circ f \circ g : [n] \to [n]$ is the composition of 3 injective functions, hence injective, hence surjective. Then $f = g \circ (g^{-1} \circ f \circ g) \circ g^{-1}$ is the composition of 3 surjective functions, hence surjective.

Corollary 2: if $f : [m] \to [n]$ where $m > n$, then $f$ is not injective.

Proof: suppose $f$ were injective. Then consider $g : [n] \to [n]$ defined by $g(x) = f(x)$. Then $g$ is injective. Then $g$ is surjective. Then there is some $x \in [n]$ such that $g(x) = f(n)$. Then $f(x) = f(n)$. But $x < n$, so $x \neq n$. This contradictions the claim that $f$ is injective.

Corollary 3: there is at most one $n \in \mathbb{N}$ such that $[n]$ and $A$ can be put in bijection.

Proof: Suppose we had bijections $f : [m] \to A$, $g : [n] \to A$, with $m \neq n$. Without loss of generality, suppose $m > n$. Then consider that $g^{-1} \circ f$ is a function $[m] \to [n]$, hence not injective. But $g^{-1} \circ f$ is the composition of two injections, hence injective. Contradiction.
Note that corollary 3 is absolutely necessary to make cardinalities work. When we say that $|A| = n$, we mean that there is some bijection $[n] \to A$. But if there were more than one value of $n$ such that there is a bijection $[n] \to A$, then the notation $|A|$ would not necessarily refer to a unique value. Thus, arguments that invoke finite cardinality theory would usually not be valid.
This is what I meant when I said that your original proofs might be subtly circular. The fact that the notion of finite cardinality makes sense depends on Corollary 3, and one common way to prove Corollary 3 is to prove the very theorem that you're seeking to prove.
Interestingly, we also have

Corollary 4: if $f : [n] \to [n]$ is surjective, then it is injective.

Proof: the principle of finite choice states that if for all $m < n$, there is some $x$ such that $P(m, x)$, then there is a sequence $\{x_m\}_{m < n}$ such that for all $m$, $P(m, x)$. This can be proved easily by induction.
In particular, if $f : [n] \to [n]$ is surjective, then for all $m < n$, there is some $x < n$ such that $f(x) = m$. So we can take a sequence $\{x_m\}_{m < n}$ such that for all $m < n$, we have $f(x_m) = m$.
We can view $x$ as a function $x : [n] \to [n]$ sending $m$ to $x_m$. We therefore have $f \circ x = id_{[n]}$. This proves that $x$ is injective, hence surjective, hence bijective. But then $f$ is the inverse of a bijection, and thus must be a bijection itself, hence must be surjective.
We can easily extend this result to the claim that if $f : A \to A$ is surjective and $A$ is finite, then $f$ is an injection. We do this by following the same sort of logic as Corollary 1.
A: If $f:A \rightarrow A$ is injective but not surjective, then pick $a\in A$ that is not in the image of $f$, we show that $a, f(a), f(f(a)), \cdots$ are pairwise distinct, therefore $A$ is not finite.
We show $f^{(n)}(a)\not=f^{(m)}(a), \forall m>n$ by indution on $n$.
When $n=0$, as $a$ is not in the image of $f$, $a\not=f^{(m)}(a)$ for any $m>0$. In general for $n\ge 1$, if $f^{(n)}(a)=f^{(m)}(a)$, then $f^{(n-1)}(a) = f^{(m-1)}(a)$ by injectivity, but this contradicts the induction hypothesis.
