# A User's Guide to Serre's Arithmetic/p-adic Fields
## The ring $\mathbb {Z} _{p}$ and the field $\mathbb {Q} _{p}$

The section introduces one of the main players in arithmetic geometry: the p-acids. This chapter studies a few basic properties of the p-adics including their topological structure, multiplicative structure, and solutions of affine polynomials in them.

### (Optional) Advanced Remarks

For example, if you have an arithmetic scheme $X\in {\textbf {Sch}}/\mathbb {Z}$ (such as ${\text{Spec}}(\mathbb {Z} [x_{1},\ldots ,x_{n}]/(f_{1},\ldots ,f_{k}))$ or ${\text{Proj}}(\mathbb {Z} [x_{1},\ldots ,x_{n}]/(f_{1},\ldots ,f_{k}))$) then you can consider the base change to $X_{p}\in {\textbf {Sch}}/(\mathbb {Z} /p)$. From the inverse system
    $\cdots \to \mathbb {Z} /(p^{3})\to \mathbb {Z} /(p^{2})\to \mathbb {Z} /(p)$
there is an associated direct system of schemes
    $X_{p}\to X_{p^{2}}\to X_{p^{3}}\to \cdots$
which gives ${\mathfrak {X}}_{p}={\text{Spf}}(X_{p^{k}})$. Another example of a system of schemes is in deformation theory. For example, consider a scheme
    ${\begin{matrix}X_{1}\\\downarrow \\\mathbb {Z} /(p)\end{matrix}}$
Deformation theory can be used to ask if there is a scheme $X_{2}\in {\textbf {Sch}}/(\mathbb {Z} /(p^{2}))$ which fits into a cartesian square
    ${\begin{matrix}X_{1}&\to &X_{2}\\\downarrow &&\downarrow \\{\text{Spec}}(\mathbb {Z} /p)&\to &{\text{Spec}}(\mathbb {Z} /p^{2})\end{matrix}}$
This question can be repeatedly asked to get a directed system of schemes
    ${\begin{matrix}X_{1}&\to &X_{2}&\to &X_{3}&\to \cdots \\\downarrow &&\downarrow &&\downarrow &\\{\text{Spec}}(\mathbb {Z} /p)&\to &{\text{Spec}}(\mathbb {Z} /p^{2})&\to &{\text{Spec}}(\mathbb {Z} /p^{3})&\to \cdots \end{matrix}}$
where each square is cartesian. It turns out these questions are cohomological. All deformations depend on the cohomology group $H^{1}(X_{1},T_{X_{1}})$ and all "obstructions" to a deformation live in a group depending on $H^{2}(X_{1},T_{X_{1}})$. If we have an algebraic curve $X/\mathbb {F} _{p}$ then $H^{2}(X,T_{X})=0$ because of dimension reasons. This implies that we can always deform and get a direct system of schemes as above. We can make a minor generalization of this case by considering an arithmetic surface $X/\mathbb {Z}$ which is an algebraic curve over each point $(p)$. Then, the surface can be deformed into such a system. Deformations then give us another example of constructing a formal scheme ${\mathfrak {X}}={\text{Spf}}(X_{i})$.

### Definitions

Set $A_{k}=\mathbb {Z} /p^{k}$. You should think of elements in $A_{k}$ as finite sums
    $a_{0}+a_{1}p+a_{2}p^{2}+\cdots +a_{k-1}p^{k-1}+a_{k}p^{k}$ where each $a_{i}\in \{0,1,2,\ldots ,p-1\}$
There is an obvious morphism $\phi _{k}:A_{k}\to A_{k-1}$ with kernel $p^{k-1}A_{k}$ sending
    $\phi _{k}(a_{0}+a_{1}p+a_{2}p^{2}+\cdots +a_{k-1}p^{k-1}+a_{k}p^{k})=a_{0}+a_{1}p+a_{2}p^{2}+\cdots +a_{k-1}p^{k-1}$
We can use these morphisms to construct an inverse system
    $\cdots \to A_{3}\to A_{2}\to A_{1}$
whose inverse limit is defined as the p-adic integers $\mathbb {Z} _{p}=\lim _{\leftarrow }A_{k}$. Elements in $\mathbb {Z} _{p}$ should be thought of infinite sums
    $a_{0}+a_{1}p+a_{2}p^{2}+\cdots$ such that $a_{i}\in \{0,1,\ldots ,p-1\}$
It is sometimes convenient to write these infinite sums as infinite tuples
    $(a_{0},a_{1},a_{2},\ldots )$
Let's play around with $\mathbb {Z} _{5}$ to try and get a feel for what the $p$-adics are about. Since there is a unique morphism $\mathbb {Z} \to \mathbb {Z} _{p}$ we can ask what the image of elements in $\mathbb {Z}$ look like. If we consider $89$, then
    $89=4+2\cdot 5+3\cdot 5^{2}=(4,2,3,0,0,\ldots )$
So all we did was find the decomposition of the integer in terms of base-$5$. Negative numbers are a little more tricky since we need to figure out what $-1$ "means" in $\mathbb {Z} _{p}$. Notice if we take the sum
    ${\begin{aligned}(1,0,0,0,\ldots )+(4,4,4,4,\ldots )&=(4+1,4,4,4,4,\ldots )\\&=(0,1,0,0,\ldots )+(0,4,4,\ldots )&{\text{ since we carried the }}1\\&=(0,4+1,4,4,\ldots )&\\&=(0,0,4+1,4,\ldots )&\\&=(0,0,0,0,\ldots )&\end{aligned}}$
Then, in $\mathbb {Z} _{p}$ we can see that
    $-1=(p-1,p-1,p-1,\ldots )$
In $\mathbb {Z} _{5}$ we can find that $-7$ is
    $(0,3,4,4,4,\ldots )$
An interesting set of numbers to look at are the $-5^{k}$'s. For example,
    $-125=(0,0,0,1,4,4,4,\ldots )$
We can then look to see what the units in $\mathbb {Z} _{p}$ are like. Observe that for $a,b\in \mathbb {Z} _{p}$
    ${\begin{aligned}a\cdot p&=(a_{0}+a_{1}\cdot p+a_{2}\cdot p^{2}+\cdots )\cdot (b_{0}+b_{1}\cdot p+b_{2}\cdot p^{2}+\cdots )\\&=(a_{0}b_{0})+(a_{0}b_{1}+a_{1}b_{0})\cdot p+(a_{0}b_{2}+a_{1}b_{1}+a_{2}b_{0})\cdot p^{2}+\cdots \end{aligned}}$
If we have $a\cdot b=1$ then
    ${\begin{aligned}a_{0}b_{0}&=1\\a_{0}b_{1}+a_{1}b_{0}&=0\\a_{0}b_{2}+a_{1}b_{1}+a_{2}b_{0}&=0\\\cdots \end{aligned}}$
From this we see a $p$-adic integer $a$ is invertible if and only if the $a_{0}\neq 0$.

### Properties of $\mathbb {Z} _{p}$

The previous observations/computations should make the first two propositions easy to parse.
The last part of this section shows how to topologize the $p$-adics. From proposition 2 we know that any $p$-adic integer is of the form $p^{k}u$ where $u$ is a unit. We define the $p$-adic valuation of this integer as
    $v_{p}:\mathbb {Z} _{p}\to \mathbb {Z}$ by $v_{p}(p^{k}u)=k$ and $v_{p}(0)=+\infty$
For example
    $v_{p}(-25)=v_{p}(0,0,1,4,4,\ldots )=2$ and $v_{p}(-1)=v_{p}(4,4,4,4,4,\ldots )=0$
Notice that
    $v_{p}(xy)=v_{p}(x)+v_{p}(y)$ and $v_{p}(x+y)\geq {\text{inf}}(v_{p}(x),v_{p}(y))$
In particular
    $v_{p}(-x)=v_{p}((-1)\cdot x)=v_{p}(-1)+v_{p}(x)=v_{p}(x)$
The $p$-adic valuation can be used to topologize $\mathbb {Z} _{p}$ by defining the metric
    $d(x,y)=e^{-v_{p}(x,y)}$
From the definition of the $p$-adic valuation and it's properties with respect to negatives we can see that
    $d(x,x)=e^{-\infty }=0$ and $d(x,y)=d(y,x)$
Since
    $v_{p}(x-z)=v_{p}((x-y)+(y-z))\geq {\text{inf}}(v_{p}(x-y),v_{p}(y-z))$
and
    $-v_{p}(x-z)\leq -{\text{inf}}(v_{p}(x-y),v_{p}(y-z))$
we can see that the triangle inequality holds
    $d(x,z)\leq d(x,y)+d(y,z)$
We could have also taken the algebraic approach of defining the topology in terms of the neighborhoods $p^{k}\mathbb {Z} _{p}$ of $0$. There are equal to the set
    $\{a\in \mathbb {Z} _{p}:v_{p}(a)\geq k\}$
Finally, we could have given it the topology from the product of the $\prod A_{k}$ where each $A_{k}$ is equipped with the discrete topology. From Tynchenoff's theorem, we know that this is a compact space. And since $\mathbb {Z} _{p}\subset \prod A_{k}$ is closed it is also compact.
* edit/reorganize
* show density is obvious
* http://www.maths.gla.ac.uk/~ajb/dvi-ps/padicnotes.pdf for hensel's lemma
* Completeness of compact metric space - https://math.stackexchange.com/questions/627667/every-compact-metric-space-is-complete

### The field $\mathbb {Q} _{p}$

From the computation earlier, if we wanted to invert an element $p^{k}u$ we would have to find $v=u^{-1}$ but also invert the $p^{k}$. This should give us the hint that the fraction field $\mathbb {Q} _{p}$ of $\mathbb {Z} _{p}$ is isomorphic to
    $\mathbb {Z} _{p}\left[{\frac {1}{p}}\right]$
This is called the field of $p$-adic numbers. A $p$-adic number should be thought of as an infinite sum of the form
    ${\frac {a_{-k}}{p^{k}}}+{\frac {a_{-k+1}}{p^{k-1}}}+\cdots +{\frac {a_{-1}}{p}}+a_{0}+a_{1}\cdot p+a_{2}\cdot p^{2}+\cdots$
A useful tool for computing inverses is the formal power series
    ${\frac {1}{1+x}}=1-x+x^{2}-x^{3}+x^{4}-\cdots$
For example, setting $x=p$ we find that the inverse of $1+p$ in $\mathbb {Z} _{5}$ is
    $(1,4,1,4,1,4,1,4,\ldots )$
and the inverse of $1-p$ is
    $(1,1,1,1,1,1)$
In general, you have to use iterated long division to find the $p$-adic expansion of a rational number.
We can extend the $p$-adic valuation to $v_{p}:\mathbb {Q} _{p}\to \mathbb {Z} \cup \{\infty \}$ by
    $v_{p}(p^{k}u)=k$ and $v_{p}(0)=+\infty$
The metric constructed previously on $\mathbb {Z} _{p}$ extends to $\mathbb {Q} _{p}$ and defines a locally compact topology. In addition, $\mathbb {Q}$ is dense in $\mathbb {Q} _{p}$ using a similar kind of argument as before.

#### Absolute Values (Extra)

There is an alternative construction of the p-adic numbers using a valuation on $\mathbb {Q}$. Given a rational number $a/b\in \mathbb {Q}$ such that $gcd(a,b)=1$ we can construct the $p$-adic absolute value
    $|\cdot |_{p}:\mathbb {Q} \to \mathbb {R} _{\geq 0}$ defined by $|a/b|_{p}=p^{-v_{p}(a/b)}=p^{v_{p}(b)-v_{p}(a)}$
using the $p$-adic valuation on $\mathbb {Q} _{p}$. This absolute value satisfies the following axioms
* $|x|_{p}=0$ if and only if $x=0$
* $|xy|_{p}=|x|_{p}\cdot |y|_{p}$
* $|x+y|_{p}\leq |x|_{p}+|y|_{p}$
In addition, it satisfies a stronger version of 3. called the non-archimedian property
* $|x+y|_{p}\leq {\text{max}}\{|x|_{p},|y|_{p}\}$
A natural question to ask then is if there exists a classification scheme for absolute values on $\mathbb {Q}$. This turns out to be true and is called Ostrowski's Theorem. These notes give an introduction and proof to this theorem. In addition, there is a generalization to a number field $K/\mathbb {Q}$ (meaning it is a finite field extension of $\mathbb {Q}$) which shows that the isomorphism classes of absolute values on $K$ are classified by the closed points of ${\text{Spec}}({\mathcal {O}}_{K})$. This is discussed in these notes by Keith Conrad.

## p-adic Equations

This section gives us the criterion for finding $p$-adic varieties, or even better, schemes in ${\textbf {Sch}}/\mathbb {Z} _{p}$.
* add section with discussion of Hensel's lemma in both the simple and general cases
* given $a\in \mathbb {Z}$ which is square free, we can show that the vanishing locus of $ay^{2}=f(x)$ has no rational points.

### Solutions

This section starts out with a useful technical lemma: a projective system
    $\cdots \to D_{3}\to D_{2}\to D_{1}$
of finite non-empty sets has a non-empty inverse limit $D=\lim _{\leftarrow }D_{i}$. This is directly applied to the case of considering a finite set of polynomials $f_{1},\ldots ,f_{k}\in \mathbb {Z} _{p}[x_{1},\ldots ,x_{n}]$: they have a non-empty vanishing locus in $(\mathbb {Z} _{p})^{m}$ if and only if their reductions ${\text{mod }}p^{k}$ have a solution in $(\mathbb {Z} /p^{k})^{m}$ for each $k$. This proposition can be considered in the homogeneous case as well.
We should then be asking ourselves: how can we guarantee that there is a solution in each $(\mathbb {Z} /p^{k})^{m}$? This is answered in the next subsection where Serre proves Hensel's lemma.

### =Applications

In the next chapter Serre will be applying the tools here to study the polynomial
    $z^{2}=ax^{2}+by^{2}$ in $\mathbb {Z} _{p}$

## The Multiplicative Group of $\mathbb {Q} _{p}$

The section studies the various multiplicative groups we have encountered so far: $\mathbb {F} _{p}^{*},\mathbb {Z} _{p}^{*},\mathbb {Q} _{p}^{*}$ and the squares of these groups. This tools in this section will be useful in the next chapter when Serre discusses the Hilbert symbol.

### The Filtration of the Group of Units

This subsection determines some of the roots of unity containted in $\mathbb {Z} _{p}$, hence $\mathbb {Q} _{p}$. Serre does this through a filtration on the group of units
    $U=\mathbb {Z} _{p}^{*}=\{a_{0}+a_{1}\cdot p+a_{2}\cdot p^{2}+\cdots |a_{0}\neq 0\}$
given by
    $U\supseteq U_{1}\supseteq U_{2}\supseteq U_{3}\supseteq \cdots$
where
    $U_{n}=1+p^{n}\mathbb {Z} _{p}=\{1+0\cdot p+\cdots +0\cdot p^{n-1}+a_{n}\cdot p^{n}+\cdots \}$
Notice that each $U_{n}$ is the kernel of the morphism
    $\varepsilon _{n}:\mathbb {Z} _{p}^{*}\to (\mathbb {Z} /p^{n})^{*}$ sending $a_{0}+a_{1}\cdot p+a_{2}\cdot p^{2}+\cdots \mapsto a_{0}+a_{1}\cdot p+\cdots +a_{n-1}\cdot p^{n-1}$
We can see that
    $U\cong \lim _{\leftarrow }{\frac {U}{U_{n}}}$ since ${\frac {U}{U_{n}}}=\{a_{0}+a_{1}\cdot p+\cdots +a_{n-1}\cdot p^{n-1}|a_{0}\neq 0\}$
There is a short exact sequence
    $1\to U_{1}\to U\to \mathbb {F} _{p}^{*}\to 1$
since $U_{1}$ contains the $p$-adic integers of the form $1+a_{1}\cdot p+a_{2}\cdot p^{2}+\cdots$ while $U$ can have any $a_{0}\neq 0$. Furthermore, there are short exact sequences of the form
    $1\to U_{n+1}\to U_{n}\to \mathbb {Z} /p\to 0$
This is because if we take two elements $(1+p^{n}x),(1+p^{n}y)\in U_{n}$ we can multiply them together to get
    $(1+p^{n}x)\cdot (1+p^{n}y)=1+p^{n}(x+y)+p^{2n}xy\equiv 1+p^{n}(x+y){\text{ }}({\text{mod }}p^{n+1})$
Serre then introduces a useful auxillary lemma to analyze the following direct system of short exact sequences

### Structure of the Group $U_{1}$

This subsection determines the structure of the group $\mathbb {Q} _{p}^{*}$. It uses the observation that an $x\in \mathbb {Q} _{p}^{*}$ is equal to $p^{n}\cdot u<math>where<math>n\in \mathbb {Z}$ and $u\in U$, hence we can decompose this group as the product $\mathbb {Z} \times U$. Now we are reduced to determining the group structure of $U$ — this is done in proposition 8.

### Squares in $\mathbb {Q} _{p}^{*}$

    ${\frac {\mathbb {Q} _{p}^{*}}{(\mathbb {Q} _{p}^{*})^{2}}}={\begin{cases}(\mathbb {Z} /2)^{3}&p=2\\(\mathbb {Z} /2)^{2}&p{\text{ odd}}\\{\text{ }}\mathbb {Z} /2&p=\infty \end{cases}}$