Let a be a set, and suppose there exists a surjection f : n → a.
Define g : a → n by letting g(a) be the smallest element of the set f⁻¹({a}).
Prove that f ◦ g = ia, and prove that g is an injection.