I have been attempting to prove that the following map $f$ is one-to-one.
$f:A\rightarrow B$
where
$A$ is the set of all all infinite binary sequences (for example, $(0,1,0,0,0,1,...)\in A$) with the exception of sequences that end with an infinite trail of zeros and contain at least one "$1$."
$B = [0,1]$
and $f(a_1,a_2,a_3,...) = \sum_{i=0}^{\infty}(\frac{a_i}{2^i})$ (where $a_i = 0$ or $1$).
However, I have only been able to show that $1 - \sum_{i=0}^{n} = \frac{1} {2^n}$ implies that, for instance, ordered pairs $(0,1,0,0,0,0,...)\notin A$ and $(0,0,1,1,1,1,1,...)\in A$ produce the same value when input to $\sum_{i=0}^{\infty}(\frac{a_i}{2^i})$.
How can one complete this proof? Any recommendations or tips would be greatly appreciated.