In number theory, for a given prime number
p
, the
p
-adic order or
p
-adic valuation of a non-zero integer
n
is the highest exponent
ν
such that
p
ν
divides
n
. The
p
-adic valuation of
0
is defined to be
∞
. It is commonly denoted
ν
p
(
n
)
. If
n
/
d
is a rational number in lowest terms, so that
n
and
d
are relatively prime, then
ν
p
(
n
/
d
)
is equal to
ν
p
(
n
)
if
p
divides
n
, or
−
ν
p
(
d
)
if
p
divides
d
, or to
0
if it divides neither. The most important application of the
p
-adic order is in constructing the field of
p
-adic numbers. It is also applied toward various more elementary topics, such as the distinction between singly and doubly even numbers.
Let
p
be a prime in
Z
. The
p
-adic order or
p
-adic valuation for
Z
is defined as
ν
p
:
Z
→
N
ν
p
(
n
)
=
{
m
a
x
{
v
∈
N
:
p
v
∣
n
}
if
n
≠
0
∞
if
n
=
0
The
p
-adic order can be extended into the rational numbers. We can define
ν
p
:
Q
→
Z
ν
p
(
a
b
)
=
ν
p
(
a
)
−
ν
p
(
b
)
.
Some properties are:
ν
p
(
m
⋅
n
)
=
ν
p
(
m
)
+
ν
p
(
n
)
.
ν
p
(
m
+
n
)
≥
inf
{
ν
p
(
m
)
,
ν
p
(
n
)
}
.
Moreover, if
ν
p
(
m
)
≠
ν
p
(
n
)
, then
ν
p
(
m
+
n
)
=
inf
{
ν
p
(
m
)
,
ν
p
(
n
)
}
.
where
inf
is the infimum (i.e. the smaller of the two).
The
p
-adic absolute value on
Q
is defined as
|
⋅
|
p
:
Q
→
R
|
x
|
p
=
{
p
−
ν
p
(
x
)
if
x
≠
0
0
if
x
=
0
The
p
-adic absolute value satisfies the following properties.
|
a
|
p
≥
0
Non-negativity
|
a
|
p
=
0
⟺
a
=
0
Positive-definiteness
|
a
b
|
p
=
|
a
|
p
|
b
|
p
Multiplicativeness
|
a
+
b
|
p
≤
|
a
|
p
+
|
b
|
p
Subadditivity
|
a
+
b
|
p
≤
max
(
|
a
|
p
,
|
b
|
p
)
it is non-archimedean
|
−
a
|
p
=
|
a
|
p
Symmetry
A metric space can be formed on the set
Q
with a (non-archimedean, translation invariant) metric defined by
d
:
Q
×
Q
→
R
d
(
x
,
y
)
=
|
x
−
y
|
p
.
The
p
-adic absolute value is sometimes referred to as the "
p
-adic norm", although it is not actually a norm because it does not satisfy the requirement of homogeneity.