Proof that the base 10 representation of a positive integer is unique Proposition: Let n $\in$ N. If $n = \sum_{i=0}^{p} x_i10^{i} = \sum_{i=0}^{q}y_i10^{i} $ where $p,q, \in Z_{\geq0}$, each $x_i$ and each $y_i$ is a digit, $x_p\neq0$ and $y_q\neq0$, 
then $p=q$, and $x_i = y_i$ for all i
So far I have:
$n = \sum_{i=0}^{p} x_i10^{i} = \sum_{i=0}^{q}y_i10^{i} $
$\sum_{i=0}^{p} x_i = \sum_{i=0}^{q}y_i $
$\sum_{i=0}^{p} x_i - \sum_{i=0}^{q}y_i = 0$
I feel like I can perform some summation algebra to write this as one summation, but I'm not sure how.
How do I prove that $p=q$ and the sequence $x_i = y_i$ ?
 A: The key issue with the base $10$ representation being unique is that the digits are restricted to being between $0$ and $9$ inclusive (note that without this limitation, the representations may not necessarily be unique). The main reason this is important is that the difference in digits is limited to being between $-9$ and $9$, inclusive. To see why this is important, consider what you've stated, i.e.,
$$n = \sum_{i=0}^{p} x_i 10^{i} = \sum_{i=0}^{q} y_i 10^{i} \tag{1}\label{eq1}$$
where $p,q, \in Z_{\geq 0}$, each $x_i$ & $y_i$ is a digit of $0$ to $9$, $x_p \neq 0$ and $y_q \neq 0$. To make it a bit easier for processing in case $p \neq q$, let $r = \max(p,q)$ and extend $x_i$ to be $0$ for any $i \gt p$ and $y_i$ to be $0$ for any $i \gt q$, so \eqref{eq1} becomes
$$n = \sum_{i=0}^{r} x_i 10^{i} = \sum_{i=0}^{r} y_i 10^{i} \tag{2}\label{eq2}$$
Subtracting the middle & LHS parts of \eqref{eq2} gives
$$0 = \sum_{i = 0}^{r} \left(x_i - y_i\right) 10^i \tag{3}\label{eq3}$$
If $x_i \neq y_i$ for one or more $i$, let $k$ be the smallest one. Thus, for all $i \lt k$, $x_i = y_i$ so $x_i - y_i = 0$, causing those terms to all become $0$. They can therefore be ignored, simplifying \eqref{eq3} to
$$0 = \sum_{i = k}^{r} \left(x_i - y_i\right) 10^i \tag{4}\label{eq4}$$
Next, dividing both sides by $10^k$ gives
$$0 = \sum_{i = k}^{r} \left(x_i - y_i\right) 10^{i - k} \tag{5}\label{eq5}$$
Note that all of the terms on the RHS of \eqref{eq5} have at least one factor of $10$ except for the first one. Since $10$ divides $0$, plus all of the terms on the RHS of \eqref{eq5} after the first term, this means the first term of $\left(x_k - y_k\right)10^0 = x_k - y_k$ must be a multiple of $10$. Since $-9 \le x_k - y_k \le 9$, this means that $x_k - y_k = 0$, i.e., $x_k = y_k$, so they can't be different. This contradicts the assumption that there is at least one digit different, thus showing that all of the digits up to $r$ are the same. This also means the highest non-zero ones must be the same, i.e., $p = q$.
This same basic argument can be used to show that an integer can be uniquely represented in any base $b \ge 2$ as long as the digits used are in the range of $0$ to $b - 1$, inclusive (e.g., binary using $0$ and $1$, or hexadecimal using $0$ to $F$).
A: Rather the proving any two representations on $N$ must be equal, try proving $N$ has exactly one unique representation.
But the division theorem, for any integer $N$ the are are unique integers $M_1$ and $x_0$ so that $N = 10M_1 + x_0; 0 \le x_0 < 10$.  This proves that $x_0$ must be uniquely determined.  
Inductively for each $M_k$ there are unique $M_{k+1}$ and $x_{k}$ so that $M_k = 10M_{k+1} + x_k; 0\le x_k < 10$.
And that's it really.  As $N$ is bounded above by some $10^{p+1}$ this will have a finite number of steps.
