Prove that Baire space $\omega^\omega$ is completely metrizable?
When I tried to prove that Baire space $\omega^\omega$ is completely metrizable, I defined a metric $d$ on $\omega^\omega$ as: If $g,h \in \omega^\omega$ then let $d(g,h)=1/(n+1)$ where $n$ is the smallest element in $\omega$ so that $g(n) \ne h(n)$ is such $n$ exists, and $d(g,h)=0$ otherwise.
I am stuck trying to prove this metric is complete. Can you help me please? Thanks in Advance.
The point here is that two functions are close iff they agree on an initial segment, that is, $d(f,g)\le 1/(n+1)$ iff $f(0)=g(0),f(1)=g(1),\dots,f(n-1)=g(n-1)$. Now, if $(f_n)_n$ is a Cauchy sequence, then, for each $n$, there is $N_n$ such that for all $m,k>N_n$ we have $d(f_m,f_k)\le1/(n+1)$. That is, all functions $f_m$ with $m>N_n$ agree on their first $n$ values.
This suggests naturally what the limit of the sequence $(f_n)_n$ should be: Define $f:\omega\to\omega$ simply by setting $f(k)$ to be the common value $f_m(k)$ for all $m$ large enough (say, for all $m>N_{k+1}$). To verify that $f$ is indeed the limit of the $f_n$, note that, by construction, for any $k$, $d(f_m,f)<1/(k+1)$ as long as $m>N_{k+1}$. But this is precisely what $\lim_m f_m=f$ means.
One of the many things that make $\omega^\omega$ with this metric interesting is that, as a topological space, this is just the irrationals. (Of course, the metric is not the Euclidean metric restricted to the irrationals, since the irrationals are clearly not a complete metric space under the standard metric.) A nice proof of this is at the very beginning of Arnie Miller's monograph on descriptive set theory and forcing.
Let $x_n$ be a Cauchy sequence. Then $d(x_n, x_{n+1}) \rightarrow 0$. In particular, for every $\epsilon > 0$, there exists an $N$ such that $n > N$ implies $d(x_n, x_{n+1}) < \epsilon$.
Exercise: translate that statement into one relating $\omega^n$ and $\omega^{n+1}$ (or equivalently, prefixes in finite trees).
Exercise: what happens when $n \rightarrow \omega$?
A different metric might make this easier. In fact, I'd say that the only thing keeping this problem from being "trivial" is picking a metric that makes the argument trivial.