\documentclass[11pt]{article}
\bibliographystyle{amsalpha}
\usepackage[active]{srcltx}
\usepackage{graphicx}
\usepackage{psfrag}
\usepackage[all]{xy}
\usepackage{fancybox}
\input{macros}
\hoffset=-0.05\textwidth
\textwidth=1.10\textwidth
\voffset=-0.05\textheight
\textheight=1.10\textheight

\title{Math 129: Algebraic Number Theory\\
{\bf Lecture 17: Topology, Completeness}}
\author{William Stein}
\date{Thursday, April 8, 2004}
\begin{document}
\maketitle

Before starting Section 4, I discuss a question from last time...

\setcounter{section}{2}
\begin{remark}
This definition differs from the one on page 46 of [Cassels-Frohlich,
Ch. 2] in two ways.  First, we assume that $c>1$ instead of $c<1$,
since otherwise $\absspc_p$ does not satisfy Axiom 3 of a valuation.
Here's why: Recall that Axiom 3 for a non-archimedean valuation on $K$
asserts that whenever $a\in K$ and $\abs{a}\leq 1$, then
$\abs{a+1}\leq 1$.  Set $a=p-1$, where $p=p(t)\in K[t]$ is an
irreducible polynomial.  Then $\abs{a}=c^0 = 1$, since $\ord_p(p-1) =
0$.  However, $\abs{a+1} = \abs{p-1+1} = \abs{p}=c^1<1$, since
$\ord_p(p) = 1$.  If we take $c>1$ instead of $c<1$, as I propose,
then $\abs{p}=c^1>1$, as required.
\end{remark}

\setcounter{section}{3}
\section{Topology}\label{sec:topology}
A valuation $\absspc$ on a field $K$ induces a topology in which a
basis for the neighborhoods of $a$ are the {\em open balls}
$$
  B(a,d) = \{x\in K : \abs{x-a} < d\}
$$
for $d>0$.
\begin{lemma}
Equivalent valuations induce the same topology.
\end{lemma}
\begin{proof}
If $\absspc_1=\absspc_2^r$, then 
$\abs{x-a}_1 < d$ if and only if
$\abs{x-a}_2^r<d$ if and only if
$\abs{x-a}_2<d^{1/r}$
so $B_1(a,d) = B_2(a,d^{1/r})$.
Thus the basis of open neighborhoods of $a$
for $\absspc_1$ and $\absspc_2$ are identical.
\end{proof}

A valuation satisfying the triangle inequality gives a metric for the
topology on defining the distance from $a$ to $b$ to be $\abs{a-b}$.
Assume for the rest of this section that we only consider valuations
that satisfy the triangle inequality.
\begin{lemma}
A field with the topology induced by a valuation is
a topological field, i.e., the operations sum, product, 
and reciprocal are continuous.
\end{lemma}
\begin{proof}
For example (product) the triangle inequality implies that
$$
  \abs{(a+\eps)(b+\delta) - ab}
   \leq \abs{\eps}\abs{\delta} + \abs{a}\abs{\delta}
     + \abs{b}\abs{\eps}
$$
     is small when $\abs{\eps}$ and $\abs{\delta}$ are
small (for fixed $a, b$).
\end{proof}

\begin{lemma}\label{lem:absvalconv}
Suppose two valuations $\absspc_1$ and $\absspc_2$ on the same
field $K$ induce the same topology. Then
for any sequence $\{x_n\}$ in~$K$ we
have 
$$
  \abs{x_n}_1 \to 0 \iff \abs{x_n}_2 \to 0.
$$
\end{lemma}
\begin{proof}
It suffices to prove that if $\abs{x_n}_1\to 0$
then $\abs{x_n}_2\to 0$, since the proof of the
other implication is the same. 
Let $\eps>0$.  The topologies induced by the two absolute
values are the same, so $B_2(0,\eps)$ can be covered by
open balls $B_1(a_i,r_i)$.  One of these open balls
$B_1(a,r)$ contains~$0$. There is $\eps'>0$ such that
$$
  B_1(0,\eps') \subset B_1(a,r)\subset B_2(0,\eps).
$$
Since $\abs{x_n}_1\to 0$, there exists $N$ such
that for $n\geq N$ we have $\abs{x_n}_1 <\eps'$.
For such~$n$, we have $x_n\in B_1(0,\eps')$, so $x_n\in B_2(0,\eps)$,
so $\abs{x_n}_2<\eps$.  Thus $\abs{x_n}_2\to 0$.
\end{proof}

\begin{proposition}
If two valuations $\absspc_1$ and $\absspc_2$ on the same
field induce the same topology, then they are equivalent in
the sense that there is a positive real $\alpha$ such that 
$\absspc_1 = \absspc_2^{\alpha}$.
\end{proposition}
\begin{proof}
If $x\in K$ and $i=1,2$, then $\abs{x^n}_i \to 0$
if and only if $\abs{x}_i^n\to 0$, which is the
case if and only if $\abs{x}_i<1$.   Thus 
Lemma~\ref{lem:absvalconv} implies that 
$\abs{x}_1<1$ if and only if $\abs{x}_2<1$.
On taking reciprocals we see that $\abs{x}_1>1$
if and only if $\abs{x}_2>1$, so finally
$\abs{x}_1 = 1$ if and only if $\abs{x}_2=1$.

Let now $w,z\in K$ be nonzero elements with $\abs{w}_i \neq 1$ and
$\abs{z}_i\neq 1$.  On
applying the foregoing to
$$
  x = w^m z^n \qquad (m,n\in\Z)
$$
we see that
$$
  m\log\abs{w}_1 + n\log\abs{z}_1 \geq 0
$$
if and only if
$$
  m\log\abs{w}_2 + n\log\abs{z}_2 \geq 0.
$$
Dividing through by $\log\abs{z}_i$, and rearranging,
we see that for every rational number $\alpha=-n/m$, 
$$
  \frac{\log\abs{w}_1}{\log \abs{z}_1} \geq \alpha
\iff
  \frac{\log\abs{w}_2}{\log \abs{z}_2} \geq \alpha.
$$
Thus 
$$
  \frac{\log\abs{w}_1}{\log \abs{z}_1} =  
                \frac{\log\abs{w}_2}{\log \abs{z}_2},
$$
so 
$$
  \frac{\log\abs{w}_1}{\log \abs{w}_2} =  
                \frac{\log\abs{z}_1}{\log \abs{z}_2}.
$$
Since this equality does not depend on the choice of~$z$,
we see that there is a constant $c$ ($=\log\abs{z}_1/\log \abs{z}_2$)
such that $\log\abs{w}_1/\log \abs{w}_2 = c$ for all $w$.
Thus $\log\abs{w}_1 = c\cdot \log\abs{w}_2$, so 
$\abs{w}_1 = \abs{w}_2^c$, which implies that $\absspc_1$
is equivalent to $\absspc_2$.
\end{proof}

\setcounter{section}{4}
\section{Completeness}\label{sec:completeness}
We recall the definition of metric on a set $X$.
\begin{definition}[Metric]\label{defn:metric}\index{metric|nn}
A {\em metric} on a set~$X$ is a map
$$
  d : X \cross X \ra \R
$$
such that for all $x,y,z\in X$,
\begin{enumerate}
\item $d(x,y)\geq 0$ and $d(x,y)=0$ if and only if $x=y$,
\item $d(x,y)=d(y,x)$, and
\item $d(x,z)\leq d(x,y)+d(y,z)$.
\end{enumerate}
\end{definition}
A {\em Cauchy sequence}\index{Cauchy sequence|nn} is a sequence
$(x_n)$ in $X$ such that for all $\eps>0$ there exists~$M$ such that
for all $n,m>M$ we have $d(x_n,x_m)<\eps$.  The {\em completion}
of~$X$ is the set of Cauchy sequences $(x_n)$ in~$X$ modulo the
equivalence relation in which two Cauchy sequences $(x_n)$ and $(y_n)$
are equivalent if $\lim_{n\ra\infty} d(x_n,y_n)=0$.  A metric space is
{\em complete}\index{complete|nn} if every Cauchy sequence converges,
and one can show that the completion of~$X$ with respect to a metric
is complete.

For example, $d(x,y)=|x-y|$ (usual archimedean absolute value) defines
a metric on~$\Q$.  The completion of $\Q$ with respect to this metric
is the field $\R$ of real numbers.  More generally, whenever $\absspc$
is a valuation on a field $K$ that satisfies the triangle inequality,
then $d(x,y)=\abs{x-y}$ defines a metric on $K$.
Consider for the rest of this section only valuations that
satisfy the triangle inequality. 

\begin{definition}[Complete]
A field $K$ is {\em complete} with respect to a valuation $\absspc$
if given any Cauchy sequence $a_n$, ($n=1,2,\ldots$), i.e.,
one for which
$$
\abs{a_m - a_n} \to 0 \qquad(m,n\to \infty,\infty),
$$
there is an $a^*\in K$ such that
$$
  a_n \to a^* \qquad \text{ w.r.t. }\absspc
$$
(i.e., $\abs{a_n-a^*}\to 0$).
\end{definition}

\begin{theorem} Every field $K$ with valuation $v=\absspc$ can be
embedded in a complete field $K_v$ with a valuation $\absspc{}$
extending the original one in such a way that $K_v$ is the closure of
$K$ with respect to $\absspc{}$.  Further $K_v$ is unique up to
a unique isomorphism fixing $K$.
\end{theorem}
\begin{proof}
Define $K_v$ to be the completion of $K$ with respect to the metric
defined by $\absspc$.  Thus $K_v$ is the set of equivalence classes of
Cauchy sequences, and there is a natural injective map from $K$ to
$K_v$ sending an element $a\in K$ to the constant Cauchy sequence
$(a)$.  Because the field operations on $K$ are continuous, they
induce well-defined field operations on equivalence classes of Cauchy
sequences componentwise.   Also, define a valuation on $K_v$ by
$$\abs{(a_n)_{n=1}^{\infty}} = \lim_{n\to\infty} \abs{a_n},$$ and note
that this is well defined and extends the valuation on $K$.

To see that $K_v$ is unique up to a unique isomorphism fixing~$K$, we
observe that there are no nontrivial continuous automorphisms $K_v\to
K_v$ that fix~$K$.  This is because, by denseness, a continuous
automorphism $\sigma: K_v\to K_v$ is determined by what it does
to~$K$, and by assumption~$\sigma$ is the identity map on~$K$.  More
precisely, suppose $a\in K_v$ and~$n$ is a positive integer.  Then by
continuity there is $\delta>0$ (with $\delta<1/n$) such that if
$a_n\in K_v$ and $\abs{a-a_n}<\delta$ then
$\abs{\sigma(a)-\sigma(a_n)}<1/n$.  Since $K$ is dense in $K_v$, we
can choose the $a_n$ above to be an element of~$K$.  Then by
hypothesis $\sigma(a_n)=a_n$, so $\abs{\sigma(a) - a_n} < 1/n$.  Thus
$\sigma(a) = \lim_{n\to\infty} a_n = a$.
\end{proof}

\begin{corollary} The valuation $\absspc$ is non-archimedean
on $K_v$ if and only if it is so on $K$.  If $\absspc$ is
non-archimedean, then the set of values taken by $\absspc{}$ on $K$
and $K_v$ are the same.
\end{corollary}
\begin{proof}
The first part follows from the fact\edit{ref} proved earlier
that a valuation is non-archimedean if and only if $\abs{n}<1$
for all integers $n$.  Since the valuation on $K_v$ extends the
valuation on~$K$, and all $n$ are in $K$, the first statement follows.

For the second, suppose that $\absspc{}$ is non-archimedean (but
not necessarily discrete).
Suppose $b\in K_v$ with $b\neq 0$. 
First I claim that there is $c\in K$ such that $\abs{b-c} < \abs{b}$.
To see this, let $c'=b-\frac{b}{a}$, where~$a$ is some 
element of $K_v$ with $\abs{a}>1$, note that
$\abs{b-c'}=\abs{\frac{b}{a}}<\abs{b}$, and choose $c\in K$ such
that $\abs{c-c'} < \abs{b-c'}$, so 
$$\abs{b-c} = \abs{b-c' - (c-c')}
 \leq \max\left(\abs{b-c'},\abs{c-c'}\right) = \abs{b-c'}<\abs{b}.
$$
Since $\absspc{}$ is non-archimedean,
we have
$$
  \abs{b} = \abs{(b-c)+c} \leq \max\left(\abs{b-c},\abs{c}\right) = \abs{c},
$$
where in the last equality we use that $\abs{b-c}<\abs{b}$.
Also,
$$
  \abs{c} = \abs{b + (c-b)} \leq \max\left(\abs{b},\abs{c-b}\right) = \abs{b},
$$
so $\abs{b} = \abs{c}$, which is in the set of values of $\absspc{}$
on $K$.
\end{proof}

\subsection{$p$-adic Numbers}
This section is about the $p$-adic numbers $\Q_p$, which are the
completion of $\Q$ with respect to the $p$-adic valuation.
Alternatively, to give a $p$-adic {\em integer} in $\Z_p$ is the same
as giving for every prime power $p^r$ an element $a_r\in \Z/p^r\Z$
such that if $s\leq r$ then $a_s$ is the reduction of $a_r$ modulo
$p^s$.  The field $\Q_p$ is then the field of fractions of $\Z_p$.

We begin with the definition of the $N$-adic numbers for any positive
integer~$N$.  Section~\ref{sec:tenadic} is about the $N$-adics in the
special case $N=10$; these are fun because they can be represented as
decimal expansions that go off infinitely far to the left.
Section~\ref{sec:qnweird} is about how the topology of $\Q_N$ is
nothing like the topology of $\R$.  Finally, in
Section~\ref{sec:hasse} we state the Hasse-Minkowski theorem, which
shows how to use $p$-adic numbers to decide whether or not a quadratic
equation in~$n$ variables has a rational zero.

\subsubsection{The $N$-adic Numbers}\index{N@$N$-adic!numbers}
\label{sec:nadic}

\begin{lemma}\label{lem:ord_lemma}
Let $N$ be a positive integer.  Then for any 
nonzero rational number~$\alpha$ there exists a
unique $e\in\Z$ and  integers~$a$,~$b$, with $b$ positive, such that 
$\alpha = N^e \cdot \frac{a}{b}$ with
$N\nmid a$, $\gcd(a,b)=1$, and $\gcd(N,b)=1$.
\end{lemma}
\begin{proof}
Write $\alpha = c/d$ with $c,d\in\Z$ and $d>0$.  
First suppose~$d$ is exactly divisible by a power of~$N$, 
so for some~$r$ we have $N^r\mid d$ but $\gcd(N,d/N^r)=1$.  
Then 
$$
  \frac{c}{d} = N^{-r} \frac{c}{d/N^r}.
$$
If $N^s$ is the largest power of $N$ that divides~$c$, then $e=s-r$,
$a=c/N^s$, $b=d/N^r$ satisfy the conclusion of the lemma.

By unique factorization of integers, there is a smallest multiple~$f$
of~$d$ such that $fd$ is exactly divisible by~$N$.  Now apply the
above argument with~$c$ and~$d$ replaced by $cf$ and $df$.
\end{proof}


\begin{definition}[$N$-adic valuation]\label{def:nadicvaluation}\index{N@$N$-adic!valuation|nn}
Let~$N$ be a positive integer.  For any positive $\alpha\in\Q$, the 
{\em $N$-adic valuation} of~$\alpha$ is~$e$, where~$e$ is as in
Lemma~\ref{lem:ord_lemma}.  The $N$-adic  valuation of~$0$ is~$\infty$.  
\end{definition}
We denote the $N$-adic valuation of $\alpha$ by $\ord_N(\alpha)$.
(Note: Here we are using ``valuation'' in a different way than in the
rest of the text.  This valuation is not an absolute value, but the
logarithm of one.)

\begin{definition}[$N$-adic metric]\label{def:nadicmetric}\index{N@$N$-adic!metric|nn}
For $x,y\in\Q$ the {\em $N$-adic distance} 
between~$x$ and~$y$ is\index{N@$N$-adic!distance|nn}
$$
  d_N(x,y) = N^{-\ord_N(x-y)}.
$$
We let $d_N(x,x) = 0$, since $\ord_N(x-x)=\ord_N(0)=\infty$.
\end{definition}
For example, $x,y\in\Z$ are close  in the $N$-adic metric if their
difference is divisible by a large power of~$N$.   E.g., if $N=10$ then
$93427$ and $13427$ are close because their difference is $80000$, which 
is divisible by a large power of~$10$.

\begin{proposition}\label{prop:ismetric}\index{N@$N$-adic!metric|nn}
The distance $d_N$ on~$\Q$ defined above is a metric.  Moreover, 
for all $x,y,z\in\Q$ we have
$$
 d(x,z) \leq \max(d(x,y),d(y,z)).
$$
(This is the ``nonarchimedean'' triangle inequality.)
\end{proposition}
\begin{proof}
The first two properties of Definition~\ref{defn:metric} are
immediate.  For the third, we first prove that if $\alpha,\beta\in\Q$
then 
$$
 \ord_N(\alpha+\beta)\geq \min(\ord_N(\alpha),\ord_N(\beta)).
$$
Assume, without loss, that $\ord_N(\alpha) \leq \ord_N(\beta)$ and
that both $\alpha$ and $\beta$ are nonzero.
Using Lemma~\ref{lem:ord_lemma} write $\alpha=N^e(a/b)$ and 
$\beta=N^f(c/d)$ with~$a$ or~$c$ possibly negative.  Then
$$
 \alpha + \beta = N^e \left(\frac{a}{b} + N^{f-e}\frac{c}{d}\right)
                = N^e \left(\frac{ad+bcN^{f-e}}{bd}\right).
$$
Since $\gcd(N,bd)=1$ it follows that $\ord_N(\alpha+\beta)\geq e$.
Now suppose $x,y, z\in \Q$.  Then
$$
 x-z = (x-y) + (y-z),
$$
so 
$$
 \ord_N(x-z) \geq \min (\ord_N(x-y), \ord_N(y-z)),
$$
hence $d_N(x,z) \leq \max(d_N(x,y), d_N(y,z))$.
\end{proof}

We can finally define the $N$-adic numbers.
\begin{definition}[The $N$-adic Numbers]\index{N@$N$-adic!numbers|nn}
  The set of {\em $N$-adic numbers}, denoted $\Q_N$, is the
  completion of~$\Q$ with respect to the metric $d_N$.
\end{definition}
The set $\Q_N$ is a ring\index{ring!of $N$-adic numbers|nn}, 
but it need not be a field as you will show in Exercises~\ref{ex:padic4} and 
\ref{ex:padic3}. It is a field if and only if $N$ is prime.
Also, $\Q_N$ has a ``bizarre'' topology,
as we will see in Section~\ref{sec:qnweird}.  

\subsubsection{The $10$-adic Numbers}\index{10!$10$-adic numbers}
\label{sec:tenadic}
It's a familiar fact that every real number can be written in the
form 
$$
d_n\ldots d_1 d_0.d_{-1}d_{-2}\ldots
 = d_n 10^{n} + \cdots + d_1 10 + d_0 
   + d_{-1} 10^{-1} + d_{-2} 10^{-2} + \cdots
$$
where each digit $d_i$ is between~$0$ and~$9$, and the sequence can
continue indefinitely to the right.  

The $10$-adic numbers also have decimal expansions, but everything is backward!
To get a feeling for why this might be the case, we consider Euler's\index{Euler}
nonsensical series
$$
  \sum_{n=1}^{\infty} (-1)^{n+1}n! = 1! - 2! + 3! - 4! + 5! - 6! + \cdots.
$$
You will prove in Exercise~\ref{ex:padic1} that this series converges
in $\Q_{10}$ to some element $\alpha\in\Q_{10}$.  

What is $\alpha$?  How can we write it down?  First note that for all
$M\geq 5$, the terms of the sum are divisible by~$10$, so the difference
between~$\alpha$ and $1! - 2! + 3! - 4!$ is divisible by~$10$.  Thus
we can compute $\alpha$ modulo~$10$ by computing $1! - 2! + 3! - 4!$
modulo~$10$.  Likewise, we can compute~$\alpha$ modulo~$100$
by compute $1! - 2! + \cdots + 9! - 10!$, etc.  
We obtain the following table:
\begin{center}
\begin{tabular}{|rl|}\hline
$\alpha$ & $\mod 10^r$\\\hline
$1$ & $\mod 10$\\
$81$ & $\mod 10^2$\\
$981$ & $\mod 10^3$\\
$2981$ & $\mod 10^4$\\
$22981$ & $\mod 10^5$\\
$422981$ & $\mod 10^6$\\\hline
\end{tabular}
\end{center}
Continuing we see that
$$
 1! - 2! + 3! - 4! + \cdots = 
  \ldots 637838364422981\qquad\text{in $\Q_{10}$ !}
$$

Here's another example.  Reducing $1/7$ modulo larger and larger powers of~$10$ we
see that 
$$
 \frac{1}{7} = \ldots857142857143\qquad\text{in $\Q_{10}$}.
$$

Here's another example, but with a decimal point.
$$
\frac{1}{70} = \frac{1}{10}\cdot \frac{1}{7} = \ldots85714285714.3
$$
We have 
$$\frac{1}{3} + \frac{1}{7} = 
   \ldots66667 + \ldots57143 = \frac{10}{21} = \ldots 23810,
$$
which illustrates that addition with carrying works as usual.

\subsubsection{Fermat's Last Theorem in $\Z_{10}$}
An amusing observation, which people often argued about 
on USENET\index{USENET} news back 
in the 1990s, is that Fermat's last theorem\index{Fermat's last theorem} 
is false in $\Z_{10}$. For example, $x^3 + y^3 = z^3$ has a nontrivial solution, namely 
$x = 1$, $y=2$, and $z=\ldots60569$.   Here~$z$ is a cube
root of $9$ in $\Z_{10}$.  Note that it takes some work to prove that there
is a cube root of $9$ in $\Z_{10}$ (see Exercise~\ref{ex:padic2}).

\subsection{The Field of $p$-adic Numbers}\index{field!of $p$-adic numbers}
The ring $\Q_{10}$ of $10$-adic numbers is isomorphic to
$\Q_{\hspace{.2ex}2}\cross\Q_{\hspace{.2ex}5}$ (see Exercise~\ref{ex:padic3}), so it is not a
field.  For example, the element $\ldots8212890625$ corresponding to
$(1,0)$ under this isomorphism has no inverse.  (To compute~$n$ digits
of $(1,0)$ use the Chinese remainder theorem to find a number that
is~$1$ modulo~$2^{n}$ and~$0$ modulo $5^n$.)  

If~$p$ is prime then $\Q_p$ is a field (see Exercise~\ref{ex:padic4}). 
Since $p\neq 10$ it is a little more
complicated to write $p$-adic numbers down.  People typically write
$p$-adic numbers in the form
$$
  \frac{a_{-\!d}}{p^{d}} + \cdots + \frac{a_{-1}}{p} + a_0 + a_1 p + a_2 p^2 + a_3 p^3 + \cdots
$$
where $0\leq a_i < p$ for each~$i$.     

\subsection{The Topology of $\Q_N$ (is Weird)}\label{sec:qnweird}
\index{N@$N$-adic!topology is weird}
\begin{definition}[Connected]\label{def:connected}\index{connected|nn}
Let $X$ be a topological space.  A subset~$S$ of~$X$ is {\em disconnected}\index{disconnected|nn} 
if there exist open subsets $U_1, U_2\subset X$ with $U_1\intersect U_2\intersect S=\emptyset$
and $S=(S\intersect U_1)\union (S\intersect U_2)$ with 
$S\intersect U_1$ and $S\intersect U_2$ nonempty.
If~$S$ is not disconnected it is {\em connected}.
\end{definition}

The topology on $\Q_N$ is induced by $d_N$, so every open set is a union 
of open balls 
$$
  B(x,r) = \{y \in \Q_N : d_N(x,y) < r\}.
$$
Recall Proposition~\ref{prop:ismetric}, which asserts that for
all $x,y,z$, 
$$
 d(x,z) \leq \max(d(x,y), d(y,z)).
$$
This translates into the following shocking and bizarre lemma:
\begin{lemma}\label{lem:balls}
Suppose $x\in \Q_N$ and $r>0$.  If $y\in\Q_N$ and $d_N(x,y)\geq r$, then
$B(x,r)\intersect B(y,r) = \emptyset$.
\end{lemma}
\begin{proof}
Suppose $z\in B(x,r)$ and $z\in B(y,r)$.  Then 
$$
 r\leq d_N(x,y) \leq \max(d_N(x,z), d_N(z,y)) < r,
$$
a contradiction.
\end{proof}
You should draw a picture to illustrates Lemma~\ref{lem:balls}.
\begin{lemma}\label{lem:opencomplement}
The open ball $B(x,r)$ is also closed.
\end{lemma}
\begin{proof} 
Suppose $y\not\in B(x,r)$.  Then $r\leq d(x,y)$ so
$$ 
 B(y,d(x,y)) \intersect B(x,r)
\subset 
 B(y,d(x,y)) \intersect B(x,d(x,y))
 = \emptyset.
$$
Thus the complement of $B(x,r)$ is a union of open balls.
\end{proof}

The lemmas imply that $\Q_N$ is {\em totally disconnected},\index{totally disconnected} 
\index{N@$N$-adic!totally disconnected}
in the following sense.
\begin{proposition}
The only connected subsets of $\Q_N$ are the singleton sets
$\{x\}$ for $x\in\Q_N$ and the empty set.
\end{proposition}
\begin{proof}
Suppose $S\subset \Q_N$ is a nonempty connected set and $x, y$ are distinct
elements of~$S$.  Let $r=d_N(x,y)>0$.  Let $U_1=B(x,r)$ and $U_2$ be
the complement of $U_1$, which is open by Lemma~\ref{lem:opencomplement}.
Then $U_1$ and $U_2$ satisfies the conditions of Definition~\ref{def:connected},
so~$S$ is not connected, a contradiction.
\end{proof}


\subsection{The Local-to-Global Principle of Hasse and Minkowski}\label{sec:hasse}
\index{Hasse}\index{Minkowski}\index{local-to-global principal}
Section~\ref{sec:qnweird} might have convinced you that $\Q_N$ is a
bizarre pathology.  In fact, $\Q_N$ is omnipresent in number theory,
as the following two fundamental examples illustrate.

In the statement of the following theorem, a {\em nontrivial solution}
to a homogeneous polynomial equation is a solution where not all
indeterminates are~$0$.
\begin{theorem}[Hasse-Minkowski]\label{thm:hasse_minkowski}\index{Hasse-Minkowski theorem|nn}
The quadratic equation 
\begin{equation}\label{eqn:quad}
a_1x_1^2 + a_2 x_2^2 + \cdots + a_n x_n^2 = 0,
\end{equation}
with $a_i\in\Q^{\star}$,
has a nontrivial solution with $x_1,\ldots, x_n$ in $\Q$ if and only 
if  (\ref{eqn:quad}) has a solution in $\R$ and in $\Q_p$ for
all primes~$p$.
\end{theorem}
This theorem is very useful in practice because the 
$p$-adic condition turns out to be easy to check.  For more details,
including a complete proof, see [Serre, {\em A Course in Arithmetic},
IV.3.2]].

The analogue of Theorem~\ref{thm:hasse_minkowski}
for cubic equations is false.
For example, Selmer\index{Selmer}\index{Selmer curve}\index{curve!Selmer} proved that the cubic 
$$
 3x^3 + 4y^3 + 5z^3 = 0
$$
has a solution other than $(0,0,0)$ in $\R$ and in $\Q_p$ for all primes~$p$
but has no solution other than $(0,0,0)$ in~$\Q$ (for a proof 
see [Cassels, {\em Lectures on Elliptic Curves}, \S 18]).

\vspace{1ex}
\noindent{\bf Open Problem. }\index{open problem!solvability of plane cubics}
Give an algorithm that decides whether or not a cubic $$ax^3 + by^3 + cz^3=0$$
has a nontrivial solution in~$\Q$.
\vspace{1ex}

This open problem is closely related to the Birch and Swinnerton-Dyer
Conjecture\index{Birch and Swinnerton-Dyer conjecture} 
for elliptic curves\index{elliptic curve}. 
The truth of the conjecture would
follow if we knew that ``Shafarevich-Tate Groups''\index{Shafarevich-Tate group} 
of elliptic  curves were finite.

\subsection{Exercises}
The following are {\em optional exercises}, which you may want to do
if you would like to familiarize yourself further with $p$-adic
numbers.  They are not part of the formal homework sets and you
do not need to hand them in.
\begin{enumerate}
\item\label{ex:padic0}
Compute the first~$5$ digits of the $10$-adic expansions of the following
rational numbers:
$$ 
 \frac{13}{2}, \quad \frac{1}{389}, \quad \frac{17}{19}, 
 \quad \text{ the 4 square roots of $41$}.
$$

\item\label{ex:padic1}
Let $N>1$ be an integer.  Prove that the series
$$
  \sum_{n=1}^{\infty} (-1)^{n+1}n! = 1! - 2! + 3! - 4! + 5! - 6! + \cdots.
$$
converges in $\Q_N$.

\item\label{ex:padic2}
Prove that $-9$ has a cube root in $\Q_{10}$ using the following strategy (this
is a special case of ``Hensel's Lemma''\index{Hensel's lemma}).

\begin{enumerate}
\item Show that there is $\alpha\in\Z$ such that $\alpha^3\con 9\pmod{10^3}$. 
\item Suppose $n\geq 3$. 
Use induction to show that if $\alpha_1\in\Z$ and 
$\alpha^3\con 9\pmod{10^n}$,  then there exists $\alpha_2\in\Z$ such 
that $\alpha_2^3\con 9\pmod{10^{n+1}}$.
(Hint: Show that there is an integer~$b$ such that
$(\alpha_1 + b10^{n})^3 \con 9\pmod{10^{n+1}}$.)
\item Conclude that $9$ has a cube root in $\Q_{10}$.
\end{enumerate}

\item\label{ex:padic4}
Let $N>1$ be an integer.  
\begin{enumerate}
\item Prove that $\Q_N$ is equipped with a natural ring structure.
\item If $N$ is prime, prove that $\Q_N$ is a field.
\end{enumerate}


\item\label{ex:padic3}
\begin{enumerate}
\item Let $p$ and $q$ be distinct primes.  Prove that 
$\Q_{pq} \isom \Q_p \cross \Q_q$.
\item Is $\Q_{p^2}$ isomorphic to either of $\Q_p\cross \Q_p$ or $\Q_p$?
\end{enumerate}

\end{enumerate}

%\bibliography{biblio}
\end{document}
