I'm practicing my proof-writing and was hoping you could let me know if this proof looks good. I would like to know if the proof is incorrect, if there are parts that are overly wordy/complicated, or if I'm missing some element of a proof that is helpful to see, if not strictly necessary. This particular proof of mine seems very wordy, so let me know if there is some simpler way that I could have proved the prompt.
The Prompt:
Let $D$ denote the set of all sequences of zeros and ones that are eventually all ones. Show that $D$ is countable.
My Proof:
Define a mapping $f: D \rightarrow N$ such that for any element of $D$, $f$ treats the sequence as binary code (read left-to-right, with the zeros and ones flipped), so that for a $d∈D$:
$f(d) = \sum_{k=1}^∞ 2^{k-1}*|x_k-1|$ where $d_k$ = the $k$'th digit of $d$ (the left-most digit is $d_1$)
Suppose $f(y) = f(z)$. Both $f(y)$ and $f(z)$ are sums of powers of two, and both $y$ and $z$ are strings of $1$s and $0$s. Suppose $y$ and $z$ are different, and then let $j$ be the digit such that $y$ and $z$ are identical for all digits to the right of $j$, and where $y$ has $0$ and $z$ has $1$ (we could just have easily picked $z$ to have the $0$). The value that $f(y)$ gets from the $y_j$ alone ($2^{j-1} * |0-1| = 2^{j-1}$) cannot be equalled by any sum of lesser powers of 2 ($\sum_{k=1}^{j-1} 2^{k-1} * |z_k-1|$) as shown in this short proof by induction:
Base Case: $n=1$
$2^n = 2^1 = 2 > 1 = 2^0$
Induction Step: Suppose $2^n > \sum_{k=0}^{n-1}2^k$
$2^{n+1} = 2 * 2^n > 2^n + \sum_{k=0}^{n-1}2^k = \sum_{k=0}^{n} 2^k$
Since $2^{j-1} > \sum_{k=1}^{j-1} 2^{k-1} * |z_k - 1|$, if $y$ has a zero at $y_j$, then $f(y)>f(z)$ even if every digit in $z$ to the left of $z_j$ is zero, and none of the digits in $y$ to the left of $y_j$ are. Therefore, if $f(y)=f(z)$ then $y$ cannot have a zero anywhere that $z$ does not, so $f(y) = f(z)$ implies $y=z$, and $f$ is injective. Therefore, we have an injection from $D$ to a countable set ($N$), so $D$ is countable.