Please critique my attempt at this proof below: if there is an alternative approach that is better or if there are gaps in the logic of my method, please point them out - thanks!
"Prove every subset of N is either finite or countable":
Proof : Consider a nonempty set of nonnegative integers such that . Then there exists an injective function by definition. More specifically, define as:
This allows us to use to enumerate the elements of by their size: letting be the smallest element of , be the smallest element of and so forth inductively until we exhaust all the elements of . Using , we would have paired up with , with and so forth.
If there exists an element of where is undefined, as in, no element of maps to , then and , implying that is finite. More specifically, would have a finite cardinality of
Otherwise, if such an element does not exist, will not only be an injection but also a surjection, since for all elements , there exists an such that . Since is both injective and surjective, it is a bijection, implying that . So by definition, if there exists a bijection between a set and the natural numbers, that set is countably infinite in cardinality.