Suppose we have a finite set $E$. Is it true that $E^n$ is compact? The metric on $E^n$ is : $$d(\omega,\omega\prime)=\begin{cases}2^{-\inf \{ n \in \mathbf N:\omega _n \ne \omega'_n\} }&{\omega \ne \omega '}\\ 0&{\omega = \omega '} \end{cases}$$
My idea is as below:
For an arbitrary sequence, projection on the first element will give a one dimensional sequence which has a repetitive subsequence. Considering this subsequence in the main infinite dimensional sequence one can continue this process to find for each $n$, a subsequence which has fixed $n$ elements in its first $n$ places. Unfortunately I cannot convince myself this solution can be extended for the infinite case(the whole sequence). Can someone give me a reason why this is correct for the whole sequence or do I need something else rather than this reasoning?
Thank you.
Note that $d(\omega,\omega')<2^{-n}$ iff $\omega_k=\omega_k'$ for all $k\le n$. It follows immediately that the topology generated by $d$ is the product topology on $E^{\Bbb N}$, considered as a product of discrete $|E|$-point spaces. As such it is compact by the Tikhonov's product theorem.
Your argument is doing it the hard way, but it does work. Suppose that $\sigma=\langle\omega^n:n\in\Bbb N\rangle$ is a sequence in $E^{\Bbb N}$, where $\omega^n=\langle\omega_k^n:k\in\Bbb N\rangle$. As you say, there is an $e_0\in E$ such that $$A_0=\{n\in\Bbb N:\omega_0^n=e_0\}$$ is infinite. Suppose that for some $m>0$ we have already chosen $e_k\in E$ and infinite sets $A_k\subseteq\Bbb N$ for each $k<m$ in such a way that $A_{k+1}\subseteq A_k$ for $k=0,\dots,m-1$, and $\omega_k^n=e_k$ for all $n\in A_k$. Then there is an $e_m\in E$ such that $$A_m=\{n\in A_{m-1}:\omega_m^k=e_m\}$$ is infinite, and the recursive construction goes through to yield a sequence $\omega=\langle e_n:n\in\Bbb N\rangle\in E^{\Bbb N}$. It’s straightforward to check that $\omega$ is a cluster point of $\sigma$.
(By the way, this argument is essentially that used to prove König’s lemma, of which this is an immediate consequence.)