While the \(p\)-adic integers \(\mathbb{Z}_p\) consist of power series starting at \(i=0\), the full field of \(p\)-adic numbers, denoted by \(\mathbb{Q}_p\), allows for a finitary fractional part: the “fractional” part (the negative powers) must be finite. If we allowed an infinite number of negative powers, the series would not converge under the \(p\)-adic metric. In \(p\)-adic analysis, \(p^n\) gets smaller as \(n\) gets larger. Therefore, \(p^{-n}\) gets larger as \(n\) gets larger. An infinite sum of increasingly huge terms cannot converge.
A general element \(\gamma \in \mathbb{Q}_p\) is expressed as a formal Laurent series in \(p\):
\[\gamma = \underbrace{\frac{a_{-k}}{p^k} + \dots + \frac{a_{-1}}{p^1}}_{\substack{\text{Fractional Part} \\ \text{(Finite Terms)}}} + \underbrace{a_0 + a_1 p^1 + a_2 p^2 + \dots}_{\substack{\text{Integer Part } (\mathbb{Z}_p) \\ \text{(Infinite Series)}}}\]
\(\mathbb{Q}_p\) can be viewed as the field of fractions of \(\mathbb{Z}_p\). There is resemblance to Laurent series, in which the variable is \(x\) or \((z - z_0)\), while in \(p\)-adics, the prime \(p\) plays the role of the variable. In both cases, the coefficients \(a_i\) come from a specific set (a field or \(\{0, \dots, p-1\}\)). Just as a Laurent series converges when the variable is small, \(p\)-adic series converge because, under the \(p\)-adic metric, higher powers of \(p\) are “smaller” (closer to zero).
In standard base-\(p\) arithmetic, digits to the right of the point represent \(p^{-1}, p^{-2}, \dots\) and get smaller as you move right. In \(p\)-adics, these negative powers are actually the large components. If \(k \to \infty\) in the denominator as in the sequence:
\[\frac{1}{p}, \frac{1}{p^2}, \frac{1}{p^3}, \dots, \frac{1}{p^n}\]
In the \(p\)-adic metric, this sequence diverges to infinity. Just as in the real numbers the sequence \(10^1, 10^2, 10^3 \dots\) “blows up” and cannot be represented as a single real number, in \(p\)-adics, the sequence \(p^{-1}, p^{-2}, p^{-3} \dots\) “blows up.”
For positive integers the digits expressed in in \(p\)-adics or in base \(p\) are identical, but the direction in which you read or sum them is different.
Writing a positive integer \(n\) in base \(p\) is expressing it as a finite sum of powers of \(p\):
\[n = a_k p^k + a_{k-1} p^{k-1} + \dots + a_1 p^1 + a_0 p^0\]
where each digit \(a_i \in \{0, 1, \dots, p-1\}\). We usually write this as \((a_k a_{k-1} \dots a_1 a_0)_p.\) The sequence of digits terminates to the left (it is finite), and the powers of \(p\) increase as you move to the left. The “size” of the number is determined by the highest power of \(p\).
An element of the \(p\)-adic integers \(\mathbb{Z}_p\) is an infinite formal power series:
\[\alpha = \sum_{i=0}^{\infty} a_i p^i = a_0 + a_1 p^1 + a_2 p^2 + \dots\]
For a standard positive integer \(n\), the \(p\)-adic expansion is simply the base-\(p\) expansion where all digits beyond the highest power \(p^k\) are zero.
\[n = a_0 + a_1 p + \dots + a_k p^k + 0 \cdot p^{k+1} + 0 \cdot p^{k+2} + \dots\]
Example: \(128\) in \(5\)-adics:
Divide \(128\) by \(5:\)
\(128 \div 5 = 25 \small\text{ (quotient)}\) with a remainder of \(\text{Re }=3.\) Keep the remainder.
Divide the quotient \((25)\) by \(5:\)
\(25 \div 5 = 5 \small \text{ (quotient)}\) with a remainder of \(\text{Re }=0.\) keep the remainder.
Divide the quotient \((5)\) by \(5:\)
\(5 \div 5 = 1 \small\text{ (quotient)}\) with a remainder of \(\text{Re }=0.\) Keep the remainder.
Divide the quotient \((1)\) by \(5:\)
\(1 \div 5 = 0 \small \text{ (quotient)}\) with a remainder of \(\text{Re }=1.\)
The remainders we found \((3, 0, 0, 1)\) are the coefficients for the powers of \(5.\) In \(5\)-adic notation, \(128\) is expressed as:
\[128 = 3 \cdot 5^0 + 0 \cdot 5^1 + 0 \cdot 5^2 + 1 \cdot 5^3\]
In standard base-\(5\) notation, we write this as \(1003_5\).
In the \(p\)-adic system \(\mathbb{Q}_p\), we view numbers as infinite series of powers of \(p\):
\[\dots + a_3 5^3 + a_2 5^2 + a_1 5^1 + a_0 5^0\]
For a positive integer like \(128,\) all the higher digits (\(a_4, a_5\), etc.) are simply \(0.\) So, the \(5\)-adic expansion of \(128\) is: \[\dots 00001003\]
For negative integers, in \(p\)-adics, we don’t use minus signs; we use the geometric series. For example, in \(2\)-adics, what is the representation of \(-1\)? Since \(\frac{1}{1-r} = 1 + r + r^2 + \dots\), we set \(r=2\):
\[-1 = \frac{1}{1-2} = 1 + 2^1 + 2^2 + 2^3 + \dots\]
In \(p\)-adic notation, \(-1\) is written as an infinite string of the highest possible digit: \((\dots 11111)_2\) or \((\dots (p-1)(p-1)(p-1))_p\).
Another example: \(-1\) in base \(3\) (\(p=3\)): In standard base \(3\): \(-1_3\). But in \(3\)-adic expansion: \(\dots 22222_3\). Because if you add \(1\) to \(\dots 22222_3\), you trigger an infinite carry:
\[(2+1) \to 0 \text{ carry } 1 \to (2+1) \to 0 \dots\]
The result is \(\dots 00000\), which is \(0\). Therefore, \(\dots 22222_3\) must be \(-1\).
Fractions in base \(p\):
To calculate the base-\(3\) expansion of \(1/2\) (a “ternary” fraction), you use the same method you’d use to find the decimal expansion of \(1/2\) in base \(10,\) i.e. long division.
Since we are working in base \(3,\) the only digits we can use are \(0, 1,\) and \(2\).
First Step:
How many times does \(2\) go into \(1\)? It goes in \(0\) times. We write down \(0.\) and add a “ternary” zero to the \(1\), making it \(10_3\). Note: In base \(3,\) the number \(10_3\) is equal to \(3\) in decimal.
Second Step:
How many times does \(2\) go into \(10_3\) (decimal \(3\))? \(2\) goes into \(3\) \(1\) time with a remainder of \(1\). Write down \(1.\) Our expansion is now \(0.1.\)
Third Step:
Bring down another \(0\), making the remainder \(10_3\) again. How many times does \(2\) go into \(10_3\)? Again, it goes in \(1\) time with a remainder of \(1\). Write down \(1\). Our expansion is now \(0.11.\)
Repeat: Since the remainder is always \(1\), the process repeats infinitely. Result: \(1/2 = 0.1111\dots_3\)
You can double-check this using the sum of a geometric series. In base \(3,\) the place values to the right of the point are \(3^{-1}, 3^{-2}, 3^{-3}\), and so on. The expansion \(0.111\dots_3\) represents:
\[\frac{1}{3^1} + \frac{1}{3^2} + \frac{1}{3^3} + \dots\] This is a geometric series with first term \(a = 1/3\) and common ratio \(r = 1/3\). The formula for the sum is:
\[S = \frac{a}{1 - r}\]
Substituting our values:
\[S = \frac{1/3}{1 - 1/3} = \frac{1/3}{2/3} = \frac{1}{2}\]
\(\color{red}{1/2 \text{ in } 3\text{-adics}}\)
We solve \(2x = 1\):
We need \(2 \cdot (a_0 + a_1 \cdot 3 + a_2 \cdot 9 + \dots) = 1\). Since we are operating mod \(3\) the expression simplifies to:
\(2a_0 \equiv 1 \pmod 3 \implies a_0 = \color{red}2\) (because \(2 \cdot 2 = 4 \equiv 1\)).
Now we have a carry. Subtracting \(2 \cdot 2 = 4\) from \(1\) gives \(-3\)
\(2 \cdot \color{red}2 + 2(a_1 \cdot 3 + a_2 \cdot 9 + \dots) = 1\)
\(2(a_1 \cdot 3 + a_2 \cdot 9 + \dots) = 1 - 4\)
Dividing by 3:
\(2(a_1 + a_2 \cdot 3 + \dots) = \frac{1 - 4}3=-1\)
and mod \(3\):
\(2a_1=-1\pmod 3\)
we now need
\(2a_1 \equiv -1 \pmod 3 \implies 2a_1 \equiv 2 \pmod 3 \implies a_1 = 1\).
Continuing this, you get a unique, infinite string of digits extending to the left: \(\dots 11112_3\).
It’s a perfect symmetry: the digits for \(1/2\) are all \(1\)s in both systems, except for that very first digit in the \(p\)-adic version.
As what follows may help clarify, this is not surprising, looking at it from the perspective of a geometric series. It stems from the fact that both systems are trying to represent the same algebraic relationship — the inverse of \(2\) — using the same building blocks: the powers of \(3.\)
To express a number as a string of digits in the \(3\)-adic system, we are essentially looking for an initial value (\(a\)) and a ratio (\(r\)) such that the number is the sum of a geometric series:
\[\frac{1}{2} = a(1 + r + r^2 + r^3 + \dots)\]
In the \(3\)-adic world, this sum only converges if the ratio \(r\) is small. Since \(3\) is small (closer to zero than \(1\) is in the \(3\)-adic norm (\(\|3\|_3 = 1/3\))), we choose \(r = 3\) (or a power of \(3\)). If this expansion were finite, it would simply be a standard integer (a polynomial in \(3\)). But \(1/2\) is not an integer. Therefore, the error or remainder after any finite number of steps will never be zero. To neutralize this remainder, the series must be infinite. In \(p\)-adics, an infinite sum of increasing powers doesn’t explode to infinity; it wraps around the number line to hit fractional targets.
In standard analysis, we are taught that a geometric series \(\sum r^n\) only converges if \(|r| < 1\). But the \(p\)-adics redefine distance: by declaring that a number is “small” if it is divisible by a high power of \(p\) we “force” the geometric series to converge for ratios like \(r=3\), \(r=5\), or \(r=p\). From an algebraic perspective, the “excuse” is even more formal. The \(p\)-adic integers \(\mathbb{Z}_p\) are the completion of the integers \(\mathbb{Z}\) with respect to this \(p\)-adic metric. In the integers, you cannot solve the equation \(2x = 1\). To fix this, we usually invent the rational number \(1/2\). But \(p\)-adics offer a different fix: We know that \((1 - 3)\) is \(-2\). We know the geometric series for \(\frac{1}{1-r}\) is \(1 + r + r^2 + \dots\) If we simply declare that \(3^n \to 0\), then \(1 + 3 + 3^2 + \dots\) is a perfectly valid “number” that acts exactly like \(1/(1-3) = -1/2\). We can think of \(p\)-adics as a form of arithmetic analytic continuation. In complex analysis, if a power series doesn’t converge in one region, you can sometimes “reach” that value by moving to a different domain. \(p\)-adics do this for the number line itself. They allow us to evaluate expressions like \(\sum p^n\) that are “illegal” in the real numbers. If it were just a trick to sum divergent series, it might be a curiosity. But the \(p\)-adic “edifice” is essential because many problems in number theory (like finding integer solutions to equations) are impossible to solve globally. However, if you check them “locally” (in the real numbers and in every \(p\)-adic field \(\mathbb{Q}_p\)), and they work in all of them, they often work in the original problem. Just as \(\mathbb{R}\) completes the rationals by filling in the gaps between points, \(\mathbb{Q}_p\) completes the rationals by filling in the gaps in divisibility. In standard math, an odometer that hits \(...999\) and clicks over to \(...000\) is just a reset. In \(p\)-adics, we treat that infinite carry as a rigorous mathematical limit. We are essentially saying: If we carry forever, we eventually reach zero, therefore the infinite string of \((p-1)\)s must be \(-1\): when we add \(1\) to it we get a carry all the way to infinity, and since the farther to the left a digit is, the less important, we can consider the result equal to \(...0000\).
It is a massive, logically consistent framework built entirely on the premise that multiples of \(p\) are the new ‘small’.
To guarantee that any fraction \(a/b\) can be forced into this geometric shape Fermat’s Little Theorem acts as the architect: for any denominator \(b\) (co-prime to \(p\)), there is a power \(p^n\) that is \(1\) more than a multiple of \(b\).
\[p^n \equiv 1 \pmod{b} \implies p^n - 1 = b \cdot k\]
This allows us to rewrite any denominator \(b\) into the form \(p^n - 1\).
Fermat’s Little Theorem (FLT) specifically states \(p^{b-1} \equiv 1 \pmod{b}\) when \(b\) is prime. However, in the case of any denominator \(b\) (even composite ones like \(b=10\)), we use the Euler-Fermat Theorem (a generalization of FLT). It says that as long as \(p\) and \(b\) share no common factors (\(gcd(p, b) = 1\)), then:
\[p^{\phi(b)} \equiv 1 \pmod{b}\] Where \(\phi(b)\) is the count of numbers less than \(b\) that are coprime to it. Whether \(b\) is prime or composite, there is always some power \(n\) that lands you at \(1 \pmod{b}\). This ensures \(b \cdot k = p^n - 1\) always has an integer solution for \(k\).
Because we must use the form \(1 - r\) for our series to work, and Fermat gives us \(p^n - 1\), we are forced to introduce a negative sign to flip the denominator:
\[\frac{1}{b} = \frac{k}{p^n - 1} = \frac{k}{-(1 - p^n)} = -k \left( \frac{1}{1 - p^n} \right)\]
Therefore we really start in the negatives. To represent a positive fraction as an infinite string of \(p\)-adic integers, we are actually expanding a negative integer and shifting it across the origin. This creates the symmetry. In Base \(p,\) we approach the fraction by adding smaller and smaller pieces (\(p^{-n}\)) starting from zero. In \(p\)-adics, we approach the fraction by adding \(p\)-adically smaller pieces (\(p^n\)).
The negative first term matches perfectly the idea that \(\dots (p-1)(p-1)(p-1)=-1\) for any p-adic system, and this is in fact also the “end of the odometer” given that we are operating with \(\{0,1, \dots,p-1\}\). In the real numbers, \(0.999\dots\) reaches up to \(1\). In \(p\)-adics, \(\dots(p-1)\) reaches up to \(-1\). It is effectively the “largest” possible representation (using all available digits) that, through the magic of \(p\)-adic carries, lands on the additive inverse of the multiplicative identity.
Because both systems use the same geometric ratio (\(p\)) to close the same gap, they generate the same digits. The \(p\)-adic version is simply the arithmetic shadow or complement of the real-world expansion. The first digit differs because the \(p\)-adic tree has to make one final carry to jump from the negative side of the origin to the positive side where \(1/2\) actually lives.
If we want to represent \(1/2\) in \(3\)-adics (\(p=3, b=2\)), we find the Fermat power (\(n\)): We need
\[3^n \equiv 1 \pmod{2}\]
\(3^1 = 3 \equiv 1 \pmod{2}\). So, \(n = 1\). Next, we find the multiple (\(k\))
\[3^1 - 1 = 2 \cdot k \implies 2 = 2 \cdot 1\]
So, \(k = 1\). Therefore, the geometric series setup is
\[\frac{1}{2} = \frac{1}{3-1}\]
To get our \(p\)-adic series, we need the denominator to be \((1-3)\), so we factor out a \(-1\):
\[\frac{1}{2} = \frac{1}{-(1-3)} = -1 \cdot \left( \frac{1}{1-3} \right)\]
Now we replace the fraction with the geometric series \(1 + r + r^2 \dots\):
\[\frac{1}{2} = -1 \cdot (1 + 3^1 + 3^2 + 3^3 + \dots)\]
Since \(-1 = \dots 2222_3\),
\[(\dots 2222_3) \times (1 + 3 + 9 + 27 + \dots)\]
we’ll show a pattern if we find the first few digits of the result, we multiply the “infinite” \(-1\):
Term 1: \((\dots 2222) \times 1 = \dots 2222\)
Term 2: \((\dots 2222) \times 3 = \dots 2220\) (The string shifts left, adding a zero)
Term 3: \((\dots 2222) \times 9 = \dots 2200\)
Term 4: \((\dots 2222) \times 27 = \dots 2000\)
The digits “collapse” into a repeating pattern of \(1\)s, and the final result i
\[\dots 11112_3\]
Notice that the \(p\)-adic representation of \(-1/2\) is
\[-1/2 = \dots 11111_3\]
and in effect adding \(1/2 + (-1/2) = 0.\)
In the real numbers, we reach \(1/2\) by adding smaller and smaller pieces to zero (\(0.111\dots\)). In the \(p\)-adics, we reach \(1/2\) by starting from the negative universe of the geometric series and shifting it by exactly one unit. Because both systems rely on the same ratio dictated by Euler’s generalization of Fermat’s Theorem they produce the same digits. The only difference is the direction of the expansion and that single first-digit adjustment (\(1 \to 2\)) required to jump the gap from the negative infinite representation back into the positive world.
In the \(3\)-adic representation of \(1/2\) above we run into \(-1 = \dots 2222_3\), which can immediately be generalized as \(-1 = \dots (p-1)(p-1)(p-1)(p-1)_p.\) This is effectively the mile \(999999\) in an odometer: a natural barrier in itself.
In this system, one more negative click would land us at
\[-2 = \dots2221_3\] followed by
\[-3 = \dots2220_3\] While adding \(+1\) lands us at
\[0=\cdots 0000_3\]
and one more
\[1 = \dots 0001_3\] This is wrap around between \(0\) and \(-1\) without using the minus sign is only possible in the setting of an infinite series and a new metric that allows convergence. But given these premises, there is an effective inversion at the end of the odometer.
So what would be the p-adic equivalent of an odometer at \(999991\)? In base \(10\), it would have to be assigned to \(-9:\) counting backward looks like: \(-1 = \dots 999999_{10}\), \(-2 = \dots 999998_{10}\), \(-3 = \dots 999997_{10}\) and so on until \(-9 = \dots 999991_{10}\).
In a standard car odometer with only \(6\) digits, 999991 is both the
positive number \(+999,991\) and the
negative number \(-9\). They are
physically the same state of the gears. But in \(p\)-adics, because the odometer is
infinite, they are two completely different settings.
In a finite \(6\)-digit odometer (base \(10\)):
Positive 999,991: 999991
Negative 9: 999991 (Because \(999991 + 9 = 1,000,000\), which rolls over
to \(000000\)).
In the \(p\)-adic odometer (infinite digits):
Positive 999,991: ...000000000999991 (It
has an infinite string of zeros to the left. It never hits the wall)
Negative 9: ...999999999999991
It is a “two-way odometer”:
A positive Integer is a finite string of digits that eventually turns into infinite zeros.
A Negative Integer is a finite string of digits that eventually turns into infinite \((p-1)\)s.
They occupy different “neighborhoods” of the \(p\)-adic universe. In the real number line, \(+999,991\) is huge and \(-9\) is small. It would be tempting to falsely state that the \(p\)-adic metric, \(-9\) is closer to the “wall” (\(\dots 999\)), while \(+999,991\) is “closer” to zero (\(\dots 000\)).
To be close to zero, a number must end in many zeros. To be close to \(-1\), a number must end in many nines. However, \(+999,991\), corresponding to \(\dots 0000000999991\) doesn’t even share one trailing zero with the zero-wall. It is technically far from zero (distance = \(1\)). On the same odometer, the expansion of \(-9\) is \(\dots 999999999999991\): It matches the “9”s of the wall for almost the entire infinite string, except for the very last digit (\(1\) vs \(9\)). It is also technically far from the wall (distance = \(1\)). So perhaps the best term would be ‘anchored’: Positive integers are anchored to the zero-wall. Even if \(+999,991\) is far from zero, its tail is made of infinite zeros. It belongs to the zero neighborhood. Negative integers are anchored to the negative wall. Even if \(-9\) is far from \(-1\), its “tail” is made of infinite nines. It belongs to the “wall” neighborhood.” To be truly close to an anchor in \(p\)-adics, you need a high power of the base: The number \(1,000,000\) (\(\dots 0001000000\)) shares six zeros with the anchor, so it’s close to \(0\). On the other hand, the number \(-1,000,001\) (\(\dots 9998999999\)) shares six nines with the anchor. In the \(p\)-adic metric, \(1,000,000\) is small and \(1\) is large.
A number like \(1/2\) (\(\dots 1112_3\)) is the ultimate nomad. It is not anchored to the zero-wall of infinite zeros, nor is it anchored to the negative-wall of infinite twos. Because its tail is periodic and never settles into a single repeating digit of \(0\) or \((p-1)\), it belongs to neither neighborhood. It is a ‘fractional’ state that can only exist because the odometer is infinite, allowing it to stay in a permanent state of ‘rolling over’ without ever arriving at a final destination.”
\(\dots (p-1)(p-1)(p-1)_p\) is the unique element that maps to the highest possible value in every single finite modular system simultaneously in \(\mathbb{Z}_p\) as the inverse limit of the rings \(\mathbb{Z}/p^n\mathbb{Z}\).
In computer science, this is exactly what is known as Two’s Complement representation. If you look at a signed integer in a 64-bit system, the number \(-1\) is represented as a solid string of \(1\)s:
Binary:
11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111
Hexadecimal: 0xFFFFFFFFFFFFFFFF
The \(p\)-adics are simply the mathematical generalization of this, where the number of bits is infinite.
In the real line \(0\) is the Origin, but for \(p\)-adics \(-1\) is the complementary origin. The symmetry we found between \(1/2 = 0.111\dots_3\) (fractional real line system) and \(1/2 = \dots 1112_p\) (\(3\)-adics) is the mathematical proof that the distance from the Real Origin \((0)\) and the \(p\)-adic origin \((-1)\) to the value \(1/2\) is governed by the exact same geometric laws.
The standard Two’s Complement is designed for integers only. A 64-bit integer register to cannot deal with \(1/2\); it doesn’t have a built-in way to do it because \(1/2\) isn’t a whole number.
In the \(3\)-adic example, we found that \(1/2 = \dots 1112_3\). However, if we apply that same odometer logic to base \(2\) (binary), the “wall” is \(-1 =...111111\) (An infinite string of \(1\)’s). And \(-1/2\)) cannot be worked out as in base \(3,\) where it was \(...1111\) because \(1+1=2\) without a carry. In base \(2,\) to get to \(1/2,\) we need a number that, when added to itself, equals \(...1111.\) In binary, adding a number to itself is the same as shifting it one bit to the left (adding a zero at the end), so we can never output a sum that ends in \(1.\) The system fails!
To find \(1/2\) in \(2\)-adics, we use the Radix Point (the \(p\)-adic version of a decimal point). Since \(1/2 = 2^{-1}\), its representation is actually finite but below the units place: \(1/2 = 0.1_2.\) In base \(3,\) \(2\) does not divide \(3\), so \(1/2\) becomes an infinite periodic expansion. In base \(2,\) \(2\) does divide the base, so it becomes a simple terminating fractional digit.
For the case of \(1/3\) in \(2\)-adic, since \(3\) doesn’t divide \(2\), it must be an infinite string to the left:
We want to represent \(1/3\) as a \(2\)-adic power series. The \(p\)-adic representation only accepts denominators of the form \((1 - r)\), where \(r\) is a power of \(p\). To find that power, we use Fermat’s Little Theorem (or Euler’s generalization). What power of \(2\) is exactly \(1\) more than a multiple of \(3\)?
\(2^1 = 2\) (Not \(1 \pmod 3\)) \(2^2 = 4\) (This is \(1 \pmod 3\), because \(4 = 3 \times 1 + 1\))
So, our power is \(n=2\). This tells us that \(2^2 - 1\) is a multiple of \(3\). Now we force \(1/3\) into the geometric serie:
\[\frac{1}{3} = \frac{1}{2^2 - 1}\]
To make it a \(2\)-adic series, the denominator must be \(1 - r\). We factor out a \(-1\):
\[\frac{1}{3} = \frac{1}{-(1 - 2^2)} = -1 \cdot \left( \frac{1}{1 - 2^2} \right)\]
Now, we apply the standard geometric series identity: \[\frac{1}{1-r} = 1 + r + r^2 + r^3 + \dots\]
Since our \(r\) is \(2^2\) (which is \(4\)), the fraction becomes:
\[-1 \cdot (1 + 2^2 + (2^2)^2 + (2^2)^3 + \dots)\]\[-1 \cdot (1 + 2^2 + 2^4 + 2^6 + \dots)\]
If we expand this, we get the repeating pattern:\[\dots 010101011_2\]
In binary \(p=2\), \(-1\) is an infinite string of \(1\)s: \(\dots 111111_2\). The series \((1 + 2^2 + 2^4 + 2^6 + \dots)\) are powers of \(4\) (\(1, 100, 10000, 1000000 \dots\)) in binary. In binary, \(2^2\) is \(100_2\), \(2^4\) is \(10000_2\), and so on. This series looks like a “comb” of \(1\)s:
\[(1 + 4 + 16 + 64 + \dots) = \dots 01010101_2\]
The multiplication results in
\[\frac{1}{3} = \dots 010101011_2\]
Comparing this \(2\)-adic odometer to the standard binary expansion of \(1/3\) that a computer scientist would use for decimals:
Real Binary: \(1/3 = 0.01010101\dots_2\)
\(2\)-adic Binary: \(1/3 = \dots 010101011_2\)
The pattern of \(01\) is identical in both. The only break in the symmetry is that very last bit (the \(1\) on the far right), which is the adjustment needed because the \(p\)-adic version is approaching \(1/3\) from the wall of \(-1\), while the real version is approaching from \(0\).
In the real number line, \(+5\) and \(-5\) are on opposite sides of zero. In the \(p\)-adic odometer, \(+5\) is a “0-tail” number: \(...000005\), while \(-5\) is a “9-tail” number: \(...999995\). They are not “collapsed” together; they are polarized. Every integer chooses a side: it either settles into the “Zero-Wall” or the “Negative-Wall.”
If all the integers are either “All Zeros” or “All Nines,” what is left? The Fractions. A fraction like \(1/3\) in \(2\)-adics (\(\dots 0101011_2\)) never settles. It doesn’t have a tail of all zeros, and it doesn’t have a tail of all ones. It is perpetually oscillating.
Positive Integers: Tail of ...000 Negative Integers:
Tail of ...111 Fractions: Tail of ...010101
(or some other repeating pattern).
An irrational number in \(p\) - adics—like the \(5\)-adic square root of \(-1\) — has an expansion that never repeats.The gears of the odometer are constantly turning, but they never fall into a predictable loop. Each new digit to the left is a “surprise” generated by the algebraic equation you are trying to solve. We find these digits one by one using Hensel’s Lemma (the \(p\)-adic version of Newton’s Method). On the odometer, an irrational number looks like “static” or a random sequence of numbers that goes on forever to the left without a pattern.
The p-adic expression of a number is akin to placing a filter on the number: the filter of the prime \(p\). In the case of \(5\)-adics for example, the valuation and the size of the \(5\)-adic expression of a number could be seen as an attempt at extracting the “five-ness” out of the number in question.
Consider a monetary system in which there were coins representing fractions of \(5,\) as well as bills with values multiples of \(5\). The p-adic twist would dictate that these coins had much larger value than the bills - the inverse of the actual monetary value, as if the coins were made of precious metals. Imagine that at a shop an attendant is returning \(\$450\). The \(5\)-adic expression is:
\[450 = 0\cdot 5^0 + 0\cdot 5^1 + 3\cdot 5^{\text{(val) }2} + 3\cdot 5^3\]
Yes, the cashier could hand over to the customer \(90\) \(\$5\) bills, but this would be bulky. In fact, the most efficient way of giving out this quantity is with \(3\) bills of \(\$25\) and \(3\) bills of \(\$125.\) This is exactly what the expression is telling us.
The valuation is \(2\), because this measures the “five-ness” of \(450\). If the coefficient for \(5^2\) had been \(0\), and the expression had started with a non-zero coefficient at \(5^3\), the number would have a valuation of \(3\) — a higher “five-ness.” In \(p\)-adic terms, this higher valuation means the number is actually smaller (closer to zero), as \(|x|_p = 1/p^{v(x)}\).
On the flip side, the distance to zero would be smaller the higher the valuation:
\[|450|_5=\frac1{5^{v(x)}}=\frac 1{5^2}\]
where \(v(x)=2\) is the valuation of \(450\) in this case.
This distance formula \(|x|_p = 1/p^v\) reveals that the \(5\)-adic world is not a continuous line, but a hierarchy. The higher the valuation, the deeper the number is nested within ‘folders’ of \(5\). This creates a tree-like topology where two numbers are close only if they share a long path of common digits. The \(p\)-adics are a Cantor set. If you try to plot them on a 2D plane, they look like dust. Every “point” is actually the tip of an infinite branch. The reason we don’t see this in real math is that in real math, we carry. If you add \(1\) to \(0.444_5\), it rolls over and changes everything to the left. In \(p\)-adics, the “folders” are rigid. Addition happens “deep” in the tree and only affects the branches above it. If you add \(1\) to the \(5\)-adic number \(4\) (\(...0004\)), you get \(5\), which is written as \(...0010\). So it would be incorrect to say that we only carry in real numbers. The carry happens exactly as it does in base \(5.\) The difference isn’t that we don’t carry; it’s where the carry goes and how it affects the closeness of the numbers. In \(p\)-adic math, a carry moves toward higher powers of \(p\) (\(5, 25, 125\)), which are smaller and closer to zero. On the other hand real carry pushes the number away from where you started, as opposed to pushing the number deeper into the tree.
If the employee had had to return \(\$\frac15\), the expansion would have been:
\[ 1\cdot 5^{-1}+0\cdot 5^{0}+0\cdot 5^{1}+\dots \]
with a valuation of \(-1\) and a distance to zero of \(5.\) This change is return in some giant coin. In this system, \(1/5\) is actually larger (further from zero) than \(1\), which has an expansion of
\[1 = \mathbf{1} \cdot 5^0 + 0 \cdot 5^1 + 0 \cdot 5^2 + \dots\]
And hence a valuation of \(0,\) and a distance to zero of \(1.\) In the \(5\)-adic world, \(5\)
\[5 = 0 \cdot 5^0 + \mathbf{1} \cdot 5^1 + 0 \cdot 5^2 + \dots\]
has a valuation of \(1,\) and a distance to \(0\) of \(1/5.\)
\(25\) is smaller, and \(1/5\) is a giant.
If you only look at a number through the “\(5\)-adic prism,” you only see its relationship to the prime \(5.\) To truly “know” the number in its entirety — its “global” identity—you have to look at it through every single prime prism (\(2, 3, 5, 7, 11 \dots\)) plus the “standard” prism of the real numbers (\(\mathbb{R}\)).
It is important to point out that the digits in the \(5\)-adic expansion of a real number like \(450\) is identical to the expression in base \(5\):
Mathematically, both systems are trying to write 450 as a polynomial in powers of \(5\):
\[450 = d_k(5^k) + \dots + d_2(5^2) + d_1(5^1) + d_0(5^0)\]
The only difference is the “direction of travel” for the algorithm.
Nomenclature:
\[a_0 = b_0 (5^0) + b_1 (5^1) + b_2 (5^2) + b_3 (5^3) + b_4 (5^4) + b_5 (5^5)\]
Coefficients or p-adic digits: these are the d’s, which are the result of solving a congruence - they are the remainders. They indicate which coset of the ideal \(p^n \mathbb{Z}_p\) we are in.
\(p\)-adic quotients: these are the a’s. Since you are performing the operation \(a_{i+1} = (a_i - d_i) / p\), you are essentially finding the integer quotient of the previous value.
The formula for finding the digit \(d_0\) for a \(\frac a b \in \mathbb Q\) is:
\[b \cdot d \equiv a \pmod p\]
When you are dealing with an integer like \(450\), you are implicitly treating it as the fraction: \(\frac{450}{1}\) with \(a = 450\) (the numerator) and \(b = 1\) (the denominator). So, the equation \(b \cdot d \equiv a \pmod p\) becomes:\[1 \cdot d_0 \equiv 450 \pmod 5\]
since in \(\mod 5\) all the terms except \(d_0\) get nullified in the expression \(\frac {450}1 = d_k(5^k) + \dots + d_2(5^2) + d_1(5^1) + d_0(5^0)\). Therefore
\[\frac {450}1 \equiv d_0 \pmod 5\] - Level \(5^0\):
How much does the initial number in base 5?
If we chip away this difference (subtract the remainder) to make it fit, will how close will it fit to a multiple of 5?
Notice that \(\text{old }a-\text{remainder}\) will always be divisible by the “mod”.
\((450 - 0) / 5 = \mathbf{90}\).
Level \(5^1\):
If we chip away this difference from the multiple of 5 in the previous step, how close will 25 fit into it?
New \(a\): \((90 - 0) / 5 = \mathbf{18}\).
Level \(5^2\):
If we chip away this difference from the multiple of 25 in the previous step, how close will 125 fit into it?
New \(a\): \((18 - 3) / 5 = \mathbf{3}\).
Level \(5^3\):
Et cetera.
Result: (Digits \(d_0, d_1, d_2, d_3\)) \(\rightarrow \boxed{0, 0, 3, 3}\).
Written in the same order as base \(5\) (highest power first), this is \(3300\).
In standard base conversion, you start with the largest possible power of \(5\) and work your way down to the units.
Step 1: What is the largest power of \(5\) in \(450\)? \(5^3 = 125\).
Step 2: How many \(125\)s? \(450 \div 125 = \mathbf{3}\) with a remainder of \(75\).
Step 3: How many \(5^2\) (\(25\)s) in \(75\)? \(75 \div 25 = \mathbf{3}\) with a remainder of \(0\).
Step 4: How many \(5^1\) (\(5\)s) in \(0\)? \(0\).
Step 5: How many \(5^0\) (\(1\)s) in \(0\)? \(0\).
Result: \(\boxed{3300_5}\).
The reason they “coincide” for integers is that both methods — the quotient-based one and the remainder-based one — are actually doing the exact same thing to the number’s structure, just from opposite directions.
They are equivalent because they both seek to satisfy the same fundamental polynomial representation of the number.
As a more involved example, take the number \(4357\). Whether you use the “telescope” (base \(5\)) or “microscope” (\(5\)-adic) method, you are solving for the unique set of coefficients \(\{b_i\}\) in this identity:
\[\bbox[5px, border: 1px solid black]{\color{red}{4357 = b_0 (5^0) + b_1 (5^1) + b_2 (5^2) + b_3 (5^3) + b_4 (5^4) + b_5 (5^5)}}\]
Base \(5\) starts by solving for the largest \(i\) first (\(b_5\)). It asks: “What is the most significant part of this number?” It effectively “strips away” the biggest chunks (\(1 \cdot 5^5\), then \(1 \cdot 5^4\), etc.) until nothing is left.
Step-by-Step quotient reasoning:
First, let’s identify the powers of 5: \(5^1 = 5\), \(5^2 = 25\), \(5^3 = 125\), \(5^4 = 625\), \(5^5 = 3,125\), \(5^6 = 15,625\). Since \(5^5\) is the largest power that fits in \(4,357,\) we start there.
| Power (Pw) | Operation | Quotient (Quo) | \(\small \text{prior Re}-\text{Quo}\times\text{Pw}\) | Remainder (Re) | |
|---|---|---|---|---|---|
| \(5^5\) (3,125) | \(4357 \div 3125\) | \(\color{red}1\) | \(= b_5\) | \(4357-1 \cdot 5^5\) | \(1,232\) |
| \(5^4\) (625) | \(1232 \div 625\) | \(\color{red}1\) | \(= b_4\) | \(1232-1\cdot 5^4\) | \(607\) |
| \(5^3\) (125) | \(607 \div 125\) | \(\color{red}4\) | \(= b_3\) | \(607 - 4 \cdot 5^3\) | \(107\) |
| \(5^2\) (25) | \(107 \div 25\) | \(\color{red}4\) | \(=b_2\) | \(107 - 4\cdot 5^2\) | \(7\) |
| \(5^1\) (5) | \(7 \div 5\) | \(\color{red}1\) | \(=b_1\) | \(7- 1\cdot 5^1\) | \(2\) |
| \(5^0\) (1) | \(2 \div 1\) | \(\color{red}2\) | \(=b_0\) | \(2 - 2\cdot 5^0\) | \(0\) |
By gathering the quotients from top to bottom, we get the digits: \(1, 1, 4, 4, 1, 2.\) In standard mathematical notation: \[4357_{10} = 114412_5\]
The process of converting an integer to a base \(p\) is essentially a recursive division algorithm. Specifically, it is the Euclidean Division algorithm applied repeatedly. In regular division, you are “shifting” values across powers of \(10.\) In base conversion, you are doing the exact same thing across powers of \(p\).
The \(5\)-adic method starts by solving for the smallest \(i\) first (\(b_0\)). It asks: “What is this number equivalent to, modulo \(5\)?” It uses the “subtract and divide” logic to clear out the units, then the fives, then the twenty-fives, moving from the inside out:
To find the \(5\)-adic expansion of \(4,357\), we’ll use that “microscope” method: extracting the digits from the smallest power of \(5\) \((5^0)\) up to the largest. Since \(4,357\) is a positive integer, the process will eventually terminate (resulting in infinite zeros to the left), and the coefficients will be the same as the base-\(5\) digits, just found in reverse order.
We represent \(4,357\) as \(a/c\) where \(a = 4357\) and \(c = 1\). We solve for \(b_i\)
\[\boxed{b_i \equiv a_i \pmod 5}\]
at each level.
How to think of these \(a_i\) and \(b_i\)? Well, \(a_0\) is the actual number we start with, in this case \(4,357\). But at each step we chisel away the remainder, which is the \(b_i\) in the modular congruence that we are solving. But here is the key point: this modular operation starts off at \(\mod 5\), which neutralizes the whole tail of the RHS of the expression:
\[4357 = b_0 (5^0) + b_1 (5^1) + b_2 (5^2) + b_3 (5^3) + b_4 (5^4) + b_5 (5^5)\]
leaving only \(b_0\). In the next
step we subtract \(4357 - b_0\) to
produce the \(\text{new } a\): so the
new \(a\) is just the
number we started with modified in such manner that it is now congrouous
to \(5.\) We save the remnant the \(b_0\). This new \(a\) is divisible by \(5,\) but now we want to test the modularity
at base \(5^2\). We divide again by
\(5\) for the second time, but only
after having subtracted the modular result base \(5,\) i.e. \(\frac{a - b_0}5\) Again we will find the
remnant at that base in \(b_1,\) save
this remnant as the modular expression of the number at base \(25,\) and again subtract. So it is as
though we are withering away at the initial integer, always dividing by
higher powers of \(5,\) and never
keeping record of the quotients at all.
In regular division the quotient is saved at each step, while the
remainder is augmented by appending the next (smaller order) digit (or
in decimals, simply adding a zero, or multiplying \(\times 10\)). In \(5\)-adic it is the remainders that are
saved to reconstitute the number, and it is the initial number (the
\(a\)) that keeps getting chipped away
by the remainder (\(b_i\))
and divided by \(5\)
at each step.
| Power | Current \(a\) | Digit \(b_i\) | Subtraction \((a - b_i)\) | New \(a\) (\(a/5\)) | \(x_n = 4357 \pmod{5^n}\) | Consistency \(x_n \equiv x_{n-1} \pmod{5^{n-1}}\) |
|---|---|---|---|---|---|---|
| \(5^0=1\) | \(4357\) | \(\color{red}2\) (\(b_0\)) | \(4357 - 2 = 4355\) | \(871\) | \(x_0 = 0\) | — |
| \(5^1=5\) | \(871\) | \(\color{red}1\) (\(b_1\)) | \(871 - 1 = 870\) | \(174\) | \(x_1 = 2\) | \(2 \equiv 2 \pmod{1}\) |
| \(5^2=25\) | \(174\) | \(\color{red}4\) (\(b_2\)) | \(174 - 4 = 170\) | \(34\) | \(x_2 = 7\) | \(7 \equiv 2 \pmod{5}\) |
| \(5^3=125\) | \(34\) | \(\color{red}4\) (\(b_3\)) | \(34 - 4 = 30\) | \(6\) | \(x_3 = 107\) | \(107 \equiv 7 \pmod{25}\) |
| \(5^4=625\) | \(6\) | \(\color{red}1\) (\(b_4\)) | \(6 - 1 = 5\) | \(1\) | \(x_4 = 607\) | \(607 \equiv 107 \pmod{125}\) |
| \(5^5=3125\) | \(1\) | \(\color{red}1\) (\(b_5\)) | \(1 - 1 = 0\) | \(0\) | \(x_5 = 1232\) | \(1232 \equiv 607 \pmod{625}\) |
| \(5^6=15625\) | \(0\) | \(\color{red}0\) (\(b_6\)) | \(0 - 0 = 0\) | \(0\) | \(x_6 = 4357\) | \(4357 \equiv 1232 \pmod{3125}\) |
The digits we found \((b_0, b_1, b_2, b_3, b_4, b_5)\) are the coefficients for the powers of \(5\):
\[4357 = (\mathbf{2} \cdot 5^0) + (\mathbf{1} \cdot 5^1) + (\mathbf{4} \cdot 5^2) + (\mathbf{4} \cdot 5^3) + (\mathbf{1} \cdot 5^4) + (\mathbf{1} \cdot 5^5)\]
Checking the math: \(2 \times 1 + 1 \times 5 + 4 \times 25 +4 \times 125 + 1 \times 625 + 1 \times 3125 = 4,357\)
In \(5\)-adic notation, written from the lowest power to the highest, the expansion is \(2, 1, 4, 4, 1, 1.\) In standard \(p\)-adic form (infinite zeros to the left), it is written as: \(...000114412\). In base \(5\) notation: Written from the highest power to the lowest, it is \(114412_5\).
In the study of \(p\)-adic numbers, the values \(x_n\) are called partial sums (or sometimes congruential approximations). They represent the \(p\)-adic integer as a sequence of integers that “nest” inside one another. Mathematically, a \(p\)-adic integer is often defined exactly as this sequence \(\{x_1, x_2, x_3, \dots\}\). The relationship between \(x_n\) and the digits \(b_i\) is additive. While the digits \(b_i\) are the individual coefficients of the power series, the \(x_n\) values are the cumulative totals of that series up to a certain point.
If the 5-adic representation of \(4357\) is written as:
\[\dots + b_n 5^n + \dots + b_2 5^2 + b_1 5^1 + b_0 5^0\] Then \(x_n\) is the sum of the first \(n\) terms:
\[x_n = \sum_{i=0}^{n-1} b_i 5^i\]
Let’s see how the \(b_i\) build your \(x_n\) values:\(x_1\):
\(x_1: b_0 = \mathbf{2}\)
\(x_2: b_0 + b_1(5) \implies 2 + 1(5) = \mathbf{7}\)
\(x_3: b_0 + b_1(5) + b_2(25) \implies 2 + 5 + 4(25) = \mathbf{107}\)
\(x_4: b_0 + b_1(5) + b_2(25) + b_3(125) \implies 107 + 4(125) = \mathbf{607}\)
\(x_5: b_0 + \dots + b_4(625) \implies 607 + 1(625) = \mathbf{1232}\)
\(x_6: b_0 + \dots + b_5(3125) \implies 1232 + 1(3125) = \mathbf{4357}\)
These are the approximations. They show the value of the number in the ring \(\mathbb{Z} / 5^n \mathbb{Z}\). In \(p\)-adic analysis, we don’t think of “closeness” in terms of distance on a number line, but rather in terms of divisibility. The partial sums \(x_n\) above are the bridge between standard integers and the \(p\)-adic world. When we say \(x_n\) is the value in the ring \(\mathbb{Z} / 5^n \mathbb{Z}\), we mean that \(x_n\) is the unique representative (usually chosen from \(0\) to \(5^n - 1\)) of the number \(4357\) when you ignore everything divisible by \(5^n\). As \(n\) increases, the modulus \(5^n\) gets larger, and \(x_n\) carries more “information” about the number. In \(\mathbb{Z}/5^1\mathbb{Z}\), you only know the last digit: \(2.\) In \(\mathbb{Z}/5^2\mathbb{Z}\), you know the last two digits (\(2 + 1 \cdot 5\)): \(7.\) By the time you reach \(x_6\), you have captured the entire value of \(4357.\)
The condition \(x_{n+1} \equiv x_n \pmod{p^n}\) is just the mathematical way of saying: “To be on a branch at level \(n+1\), you must have come from the branch directly below it at level \(n\).”You can’t teleport from the “remainder \(2\)” branch at level \(1\) to the “remainder \(18\)” branch at level \(2\) if \(18 \not\equiv 2 \pmod 5\).
The “Inverse Limit” is a category theory name for this “compatibility” requirement.
The Components:
The Sets: \(A_n = \mathbb{Z}/p^n\mathbb{Z}\). These are our “levels” of resolution.
The Maps: \(\phi_n: A_n \to A_{n-1}\). This map takes a remainder modulo \(p^n\) and “forgets” the highest power of \(p\), reducing it to a remainder modulo \(p^{n-1}\).
The Definition: The inverse limit \(\varprojlim A_n\) is the set of all sequences \((x_1, x_2, x_3, \dots)\) such that applying the “forgetful map” to \(x_n\) always gives you \(x_{n-1}\).
\[\phi_n(x_n) = x_{n-1}\]
This is why we call it a “limit.” We aren’t looking at a single level; we are looking at the infinite sequence of all levels simultaneously.
In the \(p\)-adic sequence \((x_1, x_2, x_3, \dots)\), once \(p^n\) becomes larger than the integer itself (for \(4357\) and \(p=5\), this happens at \(5^6 = 15625\)), the remainder \(x_n\) simply becomes the number itself. \(x_6 = 4357 \pmod{15625} = 4357,\) \(x_7 = 4357 \pmod{78125} = 4357,\) \(x_n = 4357\) for all \(n \ge 6\). So, while the sequence is an infinite object \((2, 7, 107, 607, 1232, 4357, 4357, 4357, \dots)\), it stabilizes. This is why we say the natural integers \(\mathbb{Z}\) are “embedded” inside the \(p\)-adic integers \(\mathbb{Z}_p\).
The \(p\)-adic integers, denoted as \(\mathbb{Z}_p\), are formally defined as the inverse limit (or projective limit) of these rings. \[\mathbb{Z}_p = \varprojlim (\mathbb{Z} / p^n \mathbb{Z})\]
In \(p\)-adics, the “limit” is a
sequence of partial sums \((x_1, x_2, x_3,
\dots)\) that satisfy a compatibility condition: \(x_n \equiv x_{n-1} \pmod{p^{n-1}}\). The
inverse limit for a terminating integer is clearly seen in the
New \(a\) (\(a/5\)) column. Notice how \(a\) decreases: \(4357 \to 871 \to 174 \to 34 \to 6 \to 1 \to
0\). Once \(a\) hits \(0\), it stays \(0\) forever. This means for all \(n > 6\), the digit \(b_n\) will be \(0\). In the context of the inverse limit,
the sequence becomes: \((x_1, x_2, x_3, x_4,
x_5, x_6, x_6, x_6, \dots)\) The sequence stabilizes. In the ring
\(\mathbb{Z}_5\), an integer is simply
a sequence that eventually becomes constant (all zeros) as you move to
higher powers.
The consistency column is the mathematical proof that the sequence is an element of the inverse limit. We consider the sequence to “converge” because the difference between consecutive terms, \(x_n - x_{n-1}\), is \(b_{n-1} 5^{n-1}\). In the \(p\)-adic metric, as the power of \(p\) increases, the value actually becomes smaller. The distance between \(x_1\) and \(x_2\) is \(5^{-1}\).The distance between \(x_5\) and \(x_6\) is \(5^{-5}\) (very tiny!). So, while the integers \(x_n\) look like they are getting bigger in the “normal” sense \((7, 107, 607...),\) they are actually narrowing down (converging) to a specific \(p\)-adic point because the “corrections” we add at each step are getting \(p\)-adically smaller.
The arrow points left because of the direction of the mapping. In the table, we have values in \(x_n\) (like \(107\)) that exist in “larger” rings (\(\mathbb{Z}/125\mathbb{Z}\)). To ensure consistency, there is a projection map \(\phi\) that carries information from the “more complex” ring to the “simpler” ring:\[\mathbb{Z}/5^3\mathbb{Z} \xrightarrow{\phi} \mathbb{Z}/5^2\mathbb{Z} \xrightarrow{\phi} \mathbb{Z}/5^1\mathbb{Z}\]
The arrow points to the left because the “limit” is formed by following these maps back to the core. You are essentially saying: “The \(p\)-adic number is the object that is compatible with all these maps pointing toward the simpler versions of itself.”
In algebra, “simpler” usually means smaller or having fewer elements, and the arrow in the inverse limit reflects this: \(\mathbb Z/5\mathbb Z\) is “simpler” from the point of view of resolution: the cardinality \(\mathbb Z/5\mathbb Z\) is \(5\), i.e. \(\{0,1,2,3,4\}.\) \(\mathbb Z/125\mathbb Z\) has \(125\) elements. It is objectively “easier” to understand or navigate a set of \(5\) things than a set of \(125.\) Arithmetically, in \(\mathbb Z/5\mathbb Z\), we lose a lot of detail. For example, in the table, the numbers \(7,\) \(107,\) and \(607\) all “collapse” into the same single value: \(2\). \(\mathbb Z/5\mathbb Z\) is a coarse view. \(\mathbb Z/125\mathbb Z\)is a fine view.
| Step | Division | Quotient (Next a) | Remainder (Digit d) | Meaning |
|---|---|---|---|---|
| 1 | \(4357 \div 5\) | 871 | 2 | \(d_0\): Units leftover |
| 2 | \(871 \div 5\) | 174 | 1 | \(d_1\): Fives leftover |
| 3 | \(174 \div 5\) | 34 | 4 | \(d_2\): Twenty-fives leftover |
| 4 | \(34 \div 5\) | 6 | 4 | \(d_3\): One-hundred-twenty-fives leftover |
| 5 | \(6 \div 5\) | 1 | 1 | \(d_4\): Six-hundred-twenty-fives leftover |
| 6 | \(1 \div 5\) | 0 | 1 | \(d_5\): Three-thousand-one-hundred-twenty-fives |
In the true geometric construction of the \(5\)-adic tree, the cylinders are eccentric (offset - not concentric) because each one must fit entirely inside the specific sub-region of its “parent” cylinder. In the \(4357\) example, the cylinders “shift” as you go up the levels because you are picking a specific branch that isn’t the central one (\(b_i=0\)). The base cylinder represents all numbers in \(\mathbb{Z}_5\). This large cylinder is partitioned into \(p\) (in this case, \(5\)) smaller, non-overlapping cylinders. If you pick \(x_1 = 2\), you move into the second “shifted” cylinder. From there, to find \(x_2 = 7\) (which is \(2 + 1 \cdot 5\)), you must move into a further offset sub-cylinder inside the first one. Instead of a straight vertical tower, the path for \(4357\) looks like a spiraling or leaning staircase: Level \(1\) (\(b_0=2\)): You step away from the center of the base. Level \(2\) (\(b_1=1\)): You step again in a new direction within that first step. Level \(3\) (\(b_2=4\)): You step toward the edge of that sub-region. The infinite limit point is the unique point at the very top where all these offset cylinders eventually converge to a single vertical line. In the \(p\)-adic metric, the fact that they are offset doesn’t change the “distance,” but it perfectly illustrates the inverse limit: you are narrowing down your location in the \(p\)-adic “map” by choosing smaller and smaller offset neighborhoods.
In \(\mathbb{R}\), the “tail” of a decimal expansion can fundamentally change the “head” because of the Archimedean property. In a decimal expansion, there is no “safe zone.” If you have a number like \(\pi\) or any irrational: \(3.14159265...\) and you change a digit \(1,000\) places to the right, in the real numbers, that change is “small.” But if you are performing arithmetic, a carry generated at the \(1,000^{th}\) place can propagate all the way back to the \(3\). This is the instability. The “far away” digits are not truly isolated from the “important” digits. The \(p\)-adic metric is Non-Archimedean (or an Ultrametric).
The real numbers and the “\(p\)-adic” numbers are essentially two different philosophies of precision. The problem isn’t that carries exist — it’s that in the real numbers, the direction of importance and the direction of arithmetic flow are in direct conflict. In decimal (real) numbers the importance is on the left (the \(3\) in \(\pi\) is more “important” than the \(4\) in the hundredths place). However, the arithmetic flow (the carries) moves from right to left. This means that to be absolutely sure about the most important part of your number (the \(3\)), you technically need to know every single digit to the infinite right, just in case a “\(999...\)” chain is sitting there waiting to be triggered by a carry. In \(p\)-adics, the directions are aligned the importance is on the right (the units/remainder \(b_0\)) - remember that p-adics are written right to left. Likewise, the arithmetic flow (carries) moves from right to left (toward higher powers of \(p\)). Because higher powers are “smaller” in \(p\)-adic space, a carry rippling “to the left” is a carry rippling into oblivion. It moves toward the part of the number that matters less.
Mathematically, a \(p\)-adic open ball is defined by the \(p\)-adic absolute value (or norm), denoted as \(| \cdot |_p\). Because the \(p\)-adic metric is “non-Archimedean” (it follows the ultrametric inequality), these balls behave very differently from the intervals we see on a real number line. The formal definition of an open ball \(B_r(a)\) centered at \(a \in \mathbb{Q}_p\) with radius \(r > 0\) is the set:
\[B_r(a) = \{ x \in \mathbb{Q}_p : |x - a|_p < r \}\]
In \(p\)-adic analysis, we typically choose the radius to be a power of \(p\), such as \(r = p^{-n}\). In that case, the expression becomes:
\[B_{p^{-n}}(a) = \{ x \in \mathbb{Q}_p : |x - a|_p < p^{-n} \} = \{ x \in \mathbb{Q}_p : |x - a|_p \leq p^{-(n+1)} \}\]
For \(p\)-adic integers (\(\mathbb{Z}_p\)), an open ball has a very intuitive algebraic meaning. If we set the radius to \(p^{-n}\), the ball consists of all numbers that share the same first \(n\) digits as \(a\). Mathematically, this is expressed as a coset of the ideal \(p^n\mathbb{Z}_p\):
\[B_{p^{-n}}(a) = a + p^n\mathbb{Z}_p = \{ a + k \cdot p^n : k \in \mathbb{Z}_p \}\]
In terms of modular arithmetic, this means:\[x \equiv a \pmod{p^n}\]
The use of \(-(n+1)\) in the exponent is a way to bridge the gap between an “open ball” (\(<\)) and a “closed ball” (\(\leq\)) in a space where distances only exist in discrete steps. In the \(p\)-adic world, distances are always powers of \(p\) (e.g., \(1, 1/5, 1/25, \dots\)). There is no distance “in between” \(1/5\) and \(1/25\). If you define an open ball with radius \(r = 5^{-n}\):
\[|x - a|_5 < 5^{-n}\]
the “next smallest” possible distance is \(5^{-(n+1)}\). Therefore, saying a distance is strictly less than \(5^{-n}\) is mathematically identical to saying it is less than or equal to \(5^{-(n+1)}\).
\[B_{5^{-n}}(a) = \{ x \in \mathbb{Q}_5 : |x - a|_5 \leq 5^{-(n+1)} \}\]
This makes more sense if we think about the digits of the number \(4357\). If \(x\) is in the ball of radius \(5^{-n}\), it means \(x\) matches \(a\) for at least \(n\) digits. To be strictly closer than \(5^{-n}\), \(x\) must match \(a\) for at least \(n+1\) digits.
It is worth noting that in \(p\)-adic topology, every ball is both open and closed (clopen). Because distances are discrete (only powers of \(p\)), there is no “edge” to a ball. If you are in the ball, you are the center of the ball.
The relationship is also extended to fractions. For instance, in the case of \(1/3\):
\[\boxed{\begin{align}&\text{Reals base } 5: &0.\mathbf{131313...}\\ &5-\text{adics: }&...\mathbf{31313132}\end{align}}\]
only the first digit is different.
The connection between the first digit of the base \(5\) expansion (\(1\)) and the first digit of the \(5\)-adic expansion (\(2\)) is hidden in a simple piece of arithmetic: \(1 + 2 = 3\) (the denominator). This isn’t a coincidence. In many cases, the \(p\)-adic expansion and the standard fractional expansion act like “partners” trying to reach the same target from different directions. In base \(5\) this \(1\) tells you that \(1/3\) is at least \(1/5\). It is a floor or an estimate from below. In \(5\)-adic this \(2\) is the solution to \(3x \equiv 1 \pmod 5\). It is the unique integer that, when multiplied by the denominator, gets you as close as possible to a “reset” (a multiple of \(5\)). The base \(5\) version is trying to build \(0.333...\) (in decimal). The \(5\)-adic version is trying to “undo” the \(3.\) Because \(3 \times 2 = 6\), and \(6\) is one more than \(5,\) that \(2\) is the perfect starting piece to begin the \(p\)-adic cancellation process.
There is a famous \(p\)-adic identity that explains why the digits look like reflections. If you look at the \(5\)-adic expansion of \(-1\), it is an infinite string of \(4\)s: \[-1 = 4 + 4(5) + 4(25) + 4(125) + \dots\]
When you calculate a positive fraction like \(1/3\) in \(p\)-adics, the math often forces the digits to be the “complements” (relative to \(p-1\)) of the standard base expansion.
Notice the math in the calculation:
In base \(5,\) the number \(1/3\) is written as:
\[\frac{1}{3} = (d_1 \times 5^{-1}) + (d_2 \times 5^{-2}) + (d_3 \times 5^{-3}) + \dots\]
We want to find \(d_1\) (the first digit).
To isolate \(d_1\), we multiply the entire equation by \(5\):
\[\left(\frac{1}{3}\right) \times 5 = \left(d_1 \times 5^{-1} + d_2 \times 5^{-2} + \dots\right) \times 5\]
\[\frac{5}{3} = 1 + \frac 2 3 = d_1 + (d_2 \times 5^{-1} + d_3 \times 5^{-2} + \dots)\]
Now, look at the left side: \(5/3\) is \(1\) plus a remainder (\(2/3\)). On the right side, everything in the parentheses is now less than \(1.\) Therefore, \(d_1\) must be \(1\).
For the next step, we take the remainder, \(\frac 5 3 - d_1 = \frac 2 3,\) which is equivalent to moving the newly calculated \(d_1\) to the LHS:
\[\frac{5}{3} - 1 = \frac 2 3 = d_2 \times 5^{-1} + d_3 \times 5^{-2} + \dots\]
and multiply by \(5\) both sides to isolate \(d_2\):
\[\frac{10}{3} =3 + \frac 1 3 = d_2 + d_3 \times 5^{-1} + \dots\implies d_2 = 3\] and so on. In summary:
Now let’s compare it to the calculation of \(1/3\) in \(5\)-adics:
\[\frac{1}{3} = d_0 + d_1(5^1) + d_2(5^2) + d_3(5^3) + \dots\]
In modular arithmetic, any multiple of \(5\) becomes zero:
\(d_1(5)\) is a multiple of \(5 \rightarrow 0\); \(d_2(25)\) is a multiple of \(25 \rightarrow 0\). The entire “tail” is made of multiples of \(5,\) so it all vanishes. So, the equation \(\frac{1}{3} = d_0 + d_1(5) + \dots\) simplifies to:
\[\frac{1}{3} \equiv d_0 \pmod 5\]
Multiplying by \(3\) to get rid of the fraction: \(1 \equiv 3d_0 \pmod 5\) we get to solve \(3d_0 \equiv 1 \pmod 5\), and \(3 \times \mathbf{2} = 6 \equiv 1\). So \(d_0 = 2\).
Next to calculate (\(d_1\)), we subtract from the LHS \(d_0\) and divide by \(5:\)
\[\frac{1}{3} = 2 + d_1(5^1) + d_2(5^2) + d_3(5^3) + \dots\]
\[\frac{\frac 13 - 2 } 5 =\frac{-1}3 = d_1 + d_2(5^1) + d_3(5^2) + \dots\]
Solve \[3x \equiv -1 \pmod 5\].
\(3 \times \mathbf{3} = 9 \equiv -1\). So \(d_1 = 3\).
Next
\[\frac {-\frac 1 3 - 3} 5 = \frac{-\frac{10}3} 5 = -\frac 2 3= d_2 + d_3(5^1) + \dots\] Solve \(3x \equiv -2 \pmod 5\).\(3 \times \mathbf{1} = 3 \equiv -2\). So \(d_2 = 1\).
Result: \(...132_5\)
An alternative motivation would be an archiving system of folders like MS Windows Explorer. Let’s consider that each folder can contain \(5\) items (other folders or documents). We have a structure such as
Hierarchy:
Level \(0\) (root): sys.pdf is here.
Level \(1\): pics (beach, lake) and docs (appl.doc) are here.
Level \(2\): ref (camera) and legal (roof, budget) are here.
Even though roof.pdf is technically inside
contracts (Level \(3\))
and budget.xlsx is inside fees (Level \(3\)), they meet at legal
(Level \(2\)). In p-adic math, we only
care about that meeting point (“inverted U”).
In \(p\)-adic notation, we write the address “backwards” (from specific to general), but for this analogy, we’ll build the value from the top down:
\[\text{Address} = (\text{Level}_1 \times 5^0) + (\text{Level}_2 \times 5^1) + (\text{Level}_3 \times 5^2) + (\text{File}\_{\text{ID}} \times 5^3)\]
Imagine you have a big integer representing a file’s ID. To find its
“Windows Explorer” path, you divide it by \(5\) over and over: Step \(1\): \(\text{ID}
\div 5\) The remainder is \(\text{Level}_1\) (Which folder under
root). Step 2: Take the quotient from Step \(1,\) divide by \(5\) again. The remainder is \(\text{Level}_2\) (Which sub-folder under
docs). Step \(3\): Take
the quotient from Step \(2,\) divide by
\(5\) again. The remainder is \(\text{Level}_3\) (Which sub-sub-folder
under legal)… In the address equation above \(\text{Level}_1\) is the first remainder. It
tells you the “broadest” location. \(\text{Level}_2 \times 5\) is the second
remainder. It shifts you into a deeper sub-folder. \(\text{Level}_3 \times 25\) is the third
remainder. It shifts you even deeper. The further “right” you go in the
expansion (higher powers of \(5\)), the
deeper you are in the Windows Explorer tree.3.
If two files have the same first three remainders (\(L_1, L_2, L_3\)), their addresses will look like this:
File A: \(\small (L_1 \cdot 5^0 + L_2 \cdot 5^1 + L_3 \cdot 5^2) + (\mathbf{\text{ID}_A} \cdot 5^3)\)
File B: \(\small (L_1 \cdot 5^0 + L_2 \cdot 5^1 + L_3 \cdot 5^2) + (\mathbf{\text{ID}_B} \cdot 5^3)\)
When you subtract them, the shared remainders (the shared folder path) cancel out completely:
\[\text{Difference} = (\text{ID}_A - \text{ID}_B) \times 5^3\]
Because the difference is a multiple of \(5^3\) (125), the p-adic metric says: “These files share \(3\) levels of history.”
We choose a \(5\)-adic metric in this example because in this tree system every folder has capacity for exactly \(5\) slots (files or sub-folders). Think of \(p\) as the scaling constant. It defines how much the world “shrinks” every time you double-click into a folder: At \(p=2\), files in the same folder are \(1/2\) as far apart as strangers. At \(p=5\), files in the same folder are \(1/5\) as far apart as strangers. If you choose a larger \(p\), you are essentially saying that siblings are much closer to each other than they are to anyone else. Using \(p=5\) makes the math very clear:
Shared Root (\(n=0\)) \(\rightarrow\) Distance = \(1\)
Shared Sub-folder (\(n=1\)) \(\rightarrow\) Distance = \(0.2\)
Shared Sub-sub-folder (\(n=2\)) \(\rightarrow\) Distance = \(0.04\)
For instance, the distance between just.doc and
budget.xlsx would be \(0.008.\) Both just.doc and
budget.xlsx live inside the fees folder. To
find their distance, we look at the depth (\(n\)) of that shared folder from
root:
Level \(0\): root
Level \(1\): docs
Level \(2\): legal
Level \(3\): fees (This
is where they meet).
The distance formula is \(d(A, B) = p^{-n}\).
With \(p = 5\) and \(n = 3\):
\[d(\text{just.doc}, \text{budget.xlsx}) = 5^{-3}\]\[d(\text{just.doc}, \text{budget.xlsx}) = \frac{1}{5 \times 5 \times 5} = \frac{1}{125}\] Distance \(= 0.008\).
The more embedded in the tree structure the files are, the closer they lie:
Files shared at C:\: Distance = \(p^{0} = 1\). (Very far).
Files shared in C:\Users: Distance = \(p^{-1} = 1/p\). (Closer).
Files shared in C:\Users\Admin\Photos\2024\Summer\Beach
(Depth 6): Distance = \(p^{-6}\).
(Extremely close).
In the Windows Explorer toy example in the picture:
| File Pair | Deepest Shared Folder | Depth (\(n\)) | Calculation (\(5^{-n}\)) | Distance |
|---|---|---|---|---|
| budget \(\leftrightarrow\) just | fees |
3 | \(5^{-3}\) | 0.008 |
| roof \(\leftrightarrow\) budget | legal |
2 | \(5^{-2}\) | 0.04 |
| just \(\leftrightarrow\) roof | legal |
2 | \(5^{-2}\) | 0.044 |
| beach \(\leftrightarrow\) lake | pics |
1 | \(5^{-1}\) | 0.2 |
| camera \(\leftrightarrow\) roof | docs |
1 | \(5^{-1}\) | 0.2 |
| appl \(\leftrightarrow\) camera | docs |
1 | \(5^{-1}\) | 0.2 |
| appl \(\leftrightarrow\) roof | docs |
1 | \(5^{-1}\) | 0.2 |
| beach \(\leftrightarrow\) roof | root |
0 | \(5^{0}\) | 1.0 |
| sys \(\leftrightarrow\) beach | root |
0 | \(5^{0}\) | 1.0 |
| sys \(\leftrightarrow\) roof | root |
0 | \(5^{0}\) | 1.0 |
The distance between files depend on how many bifurcations we have to climb up to find a common node: the closer to root, the farther apart:
Notice the isosceles triangle principle of the p-adic metric in two examples:
| Side | Files | Distance |
|---|---|---|
| Pair \(1\): | roof.pdf \(\leftrightarrow\) budget.xlsx | (\(0.04\)) |
| Pair \(2\): | roof.pdf \(\leftrightarrow\) camera.pdf | (\(0.2\)) |
| Pair \(3\): | budget.xlsx \(\leftrightarrow\) camera.pdf | (\(0.2\)) |
Result: Sides are \(\{0.04, 0.2, 0.2\}\). Isosceles.
Likewise,
| Side | Files | Distance |
|---|---|---|
| Pair \(1\): | beach.jpg \(\leftrightarrow\) lake.jpg | (\(0.2\)) |
| Pair \(2\): | beach.jpg \(\leftrightarrow\) roof.pdf | (\(1.0\)) |
| Pair \(3\): | lake.jpg \(\leftrightarrow\) roof.pdf | (\(1.0\)) |
Result: Sides are \(\{0.2, 1.0, 1.0\}\). Isosceles.
The Isosceles Principle is the geometric manifestation of the Ultrametric Inequality.cvIn a standard metric, the triangle inequality says the third side can’t be longer than the sum of the other two: \(d(x, z) \leq d(x, y) + d(y, z)\). But in an ultrametric (your folder system), the rule is much “stricter.” The third side cannot be longer than the maximum of the other two:\[d(x, z) \leq \max(d(x, y), d(y, z))\]
This can be visualized in the topology of \(p\)-adics using cylinders:
The illustration shows three points, \(x, y,\) and \(z\), in a \(5\)-adic tree. The distance between any two points is defined by the formula: \(d(a, b) = 5^{-n},\) where \(n\) is the level of the highest (most specific) cylinder that contains both points. Distance \(d(x, y):\) Points \(x\) and \(y\) both live inside the same blue cylinder (\(d_0 = 1\)) and the same Level \(2\) sub-cylinder (\(d_1 = 1\)). They only diverge at level \(3.\) Because they share a path up to \(n=2\), their distance is: \(d(x, y) = 5^{-2} = \frac{1}{25} = 0.04.\) On the other hand, the distances \(d(x, z)\) and \(d(y, z)\) revolve around the fact that point \(z\) is in the red branch (\(d_0 = 0\)), while \(x\) and \(y\) are in the blue branch (\(d_0 = 1\)). To find a cylinder that contains both red and blue points, you have to go all the way down to the Silver base (\(n=0\)). Because they only share the \(n=0\) level, their distance is: \(d(x, z) = 5^0 = 1\) and \(d(y, z) = 5^0 = 1\). This illustrates the “strong triangle inequality.” In standard geometry, \(y\) looks physically closer to \(z\) than \(x\) does. But in \(p\)-adic geometry, \(d(x, z) = d(y, z)\). Since both \(x\) and \(y\) are “trapped” in the same \(1/25\)-radius ball, they are both exactly \(1\) unit away from anything outside that ball. In this world, every triangle is isosceles, and the distance is always determined by the “height of the fork in the road.
The standard triangle inequality in Euclidean space is \(|x + z| \le |x| + |z|\). In \(p\)-adic space, this is replaced by the strong triangle inequality: \[|x + z|_p \le \max(|x|_p, |z|_p)\]
The most striking feature of \(p\)-adic geometry is that the inequality becomes a strict equality whenever the two values have different \(p\)-adic magnitudes. If \(|x|_p \neq |z|_p\), then \(|x + z|_p = \max(|x|_p, |z|_p)\). In terms of the cylinder diagram, if you are adding a point in a “high” (tiny) cylinder to a point in a “low” (large) cylinder, the result stays in the large cylinder. This is why every triangle in \(p\)-adic space has at least two equal sides (it is isosceles). The only timeth the distance can be strictly less than the maximum is when the two values have the exact same magnitude and their leading digits cancel out. If \(|x|_p = |z|_p\), then \(|x + z|_p \le |x|_p\). Example: Let \(x = 1 \cdot 5^1\) (Magnitude \(|x|_5 = 1/5\)). Let \(z = 4 \cdot 5^1\) (Magnitude \(|z|_5 = 1/5\)). Their maximum magnitude is \(1/5\). However, \(x + z = 1(5) + 4(5) = 5 = 1 \cdot 5^2\). The new magnitude is \(|5|_5 = 1/25\).
The folder hierarchy isn’t just a metaphor; it’s a direct visualization of how modular arithmetic (remainders) works. In standard division, we care about the quotient (how many times a number fits). In \(p\)-adic math, we throw away the quotient and keep only the remainder, because the remainder tells us which “folder” a number lives in. The remainder is the folder address Think of the prime number \(p=5\) as a filing rule. Every time you divide by 5, the remainder tells you which sub-folder to enter:
Level \(1\) (root): You look at \(x \pmod 5\). There are \(5\) possible folders: \(0, 1, 2, 3, 4.\)
Level \(2\) (sub-folder): You look at \(x \pmod{25}\).
This tells you which specific drawer inside the folder you belong to. In the Windows Explorer analogy, distance is determined by how many levels of remainders two numbers share. In the case of a large distance (\(1\)). the numbers have different remainders when divided by \(5.\) They don’t even share the first-level folder. (e.g., \(1\) and \(2\)). For small distance (\(1/25\)), the numbers have the same remainder when divided by \(5\) and the same remainder when divided by \(25.\) They share two levels of folders. Two numbers are “close” if their difference is divisible by a high power of \(p\): If \(x - y\) is divisible by \(5^3\) (\(125\)), it means they share the same remainder all the way down to the third folder level (Depth \(n=3\)).
Let’s assign numbers to the folders based on their position (\(0\) through \(4\)):
Level \(1\) (under
root): pics = \(0\), docs = \(1\), tasks = \(2\), video = \(3\)
Level \(2\) (under
docs): letters = \(0\), legal = \(1\), ref = \(2\), drafts = \(3\)
Level \(3\) (under
legal): project = \(0\), contracts = \(1\), other = \(2\), fees = \(3\), account = \(4\)
Now, let’s look at just.doc and
budget.xlsx: Both are in root (1st digit =
\(1\)) \(\rightarrow\) docs (2nd digit
= \(1\)) \(\rightarrow\) legal (3rd digit
= \(1\)) \(\rightarrow\) fees (4th digit
= \(3\)). Their “p-adic addresses” both
start with the sequence \(...311\).
In \(p\)-adic notation, we write the address backwards (from specific to general), but for this analogy, we’ll build the value from the top down:
\[\text{Address} = (\text{Level}_1 \times 5^0) + (\text{Level}_2 \times 5^1) + (\text{Level}_3 \times 5^2) + (\text{File}\_{\text{ID}} \times 5^3)\]
Both files start with \(1(1) + 1(5) + 3(25) = \mathbf{81}\).
Inside the fees folder, we give each file a unique ID. Let’s say just.doc = \(0\) and budget.xlsx = \(1\). So the final addresses are for just.doc: \(81 + (0 \times 125) = \mathbf{81}\) and for budget.xlsx: \(81 + (1 \times 125) = \mathbf{206}\)
What is the difference?\[206 - 81 = \mathbf{125}\]
Because \(125\) is exactly \(5^3\), we can prove they share \(3\) levels of folders. Is \(125\) divisible by \(5^1\)? Yes. (Shared Level \(1\): docs). Is \(125\) divisible by \(5^2\)? Yes. (Shared Level \(2\): legal). Is \(125\) divisible by \(5^3\)? Yes. (Shared Level \(3\): fees). Is \(125\) divisible by \(5^4\)? No. (The files themselves are
different).
The \(p\)-adic integers (\(\mathbb{Z}_p\)) are best visualized as a toroidal solenoid — an infinite “torus-within-a-torus” construction:
From THE DYADIC SOLENOID by JAMES KEESLING
This geometry represents the product of a continuous 1D line (the Wire) and the discrete, self-similar structure of the \(p\)-adic gears. A cross-section of this solenoid reveals a series of nested circles (tori) corresponding to progressively higher powers of \(p^k\). The Fat Torus \(T_0\) represents the first digit (\(a_0\)). It contains \(p\) primary “petals.” The smaller, nested tori (\(T_k\)) wind \(p\) times inside the one before it. At each level \(k\), the number of possible “stops” or addresses is \(p^k\). As \(k \to \infty\), these petals decrease in size until they become a Cantor Set — a “fuzz” of points indistinguishable to the eye, yet each uniquely defined.
A specific \(p\)-adic number is tantamount to threading a wire of zero diameter through exactly one petal at every level of nesting. The wire’s journey is dictated by the digits relative to the Radix Point: To the left of the point (\(p^0, p^1, p^2 \dots\)), these digits represent the wire diving deeper into smaller tori. They define the number’s identity or location in the Cantor set. To the Right of the point (\(p^{-1}, p^{-2}, p^{-3} \dots\)), these digits represent the wire’s winding around the center hole of the tori. These are the “remainders” that generate color. The “skin” of the wire is colored by the Pontryagin Character \(\chi_x(q)\). For a number \(x\) at a specific petal (test point) \(q\), the color is determined by the fractional part of their product:
\[\chi_x(q) = e^{2\pi i \{x \cdot q\}_p}\]
The value \(\{x \cdot q\}_p\) is always between \(0\) and \(1\), acting as a coordinate on the color wheel:
\(0\) (Red): No fractional winding (\(0^\circ\)).
\(1/3\) (Green): One-third of a rotation (\(120^\circ\)).
\(2/3\) (Blue): Two-thirds of a rotation (\(240^\circ\)).
To make this concrete, let’s use the formula \(\chi_x(q) = e^{2\pi i \{x \cdot q\}_3}\) and calculate the color angle for a few specific numbers. We can think of \(q\) as the “microscope level” (the petal size):
\(q = 1/3\): Looking at the fattest torus (\(3\) big petals).
\(q = 1/9\): Looking at the medium torus (\(9\) petals).
\(q = 1/27\): Looking at the slenderest torus (\(27\) petals).
The zero Case (\(x = 0\)):
\(q = 1/3\): \(\{0 \cdot 1/3\}_3 = 0 \to \mathbf{0^\circ}\) (Red)
\(q = 1/9\): \(\{0 \cdot 1/9\}_3 = 0 \to \mathbf{0^\circ}\) (Red)
No matter how deep you zoom, zero stays red. This is why the “zero branch” at 4:00 is a solid red stripe in the graphic below.
The “wall” Case (\(x = -1\)):
In 3-adics, \(-1\) is the infinite string \(\dots 222_3\).
\(q = 1/3\): \(\{-1 \cdot 1/3\}_3 = 2/3 \to \mathbf{240^\circ}\) (Blue)
\(q = 1/9\): \(\{-1 \cdot 1/9\}_3 = 8/9 \to \mathbf{320^\circ}\) (Purple/Red)
\(q = 1/27\): \(\{-1 \cdot 1/27\}_3 = 26/27 \to \mathbf{346^\circ}\) (Deep Red)
Notice the angle getting closer and closer to \(360^\circ\) (which is \(0^\circ\) / Red). This is why the “wall” at -1 seems to “bend back” toward the origin. It is the odometer almost rolling over to zero.
The fraction Case (\(x = 1/2\)):
In \(3\)-adics, \(1/2\) is the repeating string \(\dots 11112_3\).
\(q = 1/3\): \(\{1/2 \cdot 1/3\}_3 = 2/3 \to \mathbf{240^\circ}\) (Blue)
\(q = 1/9\): \(\{1/2 \cdot 1/9\}_3 = 5/9 \to \mathbf{200^\circ}\) (Teal/Blue)
\(q = 1/27\): \(\{1/2 \cdot 1/27\}_3 = 14/27 \to \mathbf{186^\circ}\) (Cyan/Green)
The color for \(1/2\) is “vibrating.” It doesn’t settle into a single color like an integer; it dances around the wheel as we zoom in.
To translate the \(p\)-adic fractional part into degrees, you are essentially mapping a fraction of a circle to a position on the color wheel. Since a full circle is \(360°\), you simply multiply the \(p\)-adic fractional part by \(360.\)
The Conversion Formula:
\[\text{Angle} = \{x \cdot q\}_p \times 360^\circ\]
Where \(\{x \cdot q\}_p\) is always a number between \(0\) and \(1\) - this is because the notation \(\{ \cdot \}_p\) represents the \(p\)-adic fractional part:
To calculate \(\chi_x(q)\) for a value like \(2.3\) in a \(3\)-adic system, we first convert \(2.3\) into a fraction: \(2.3 = \frac{23}{10}\). We want to find the color of this number at the first torus level (\(q = \frac{1}{3}\)). First, we multiply \(x\) by \(q\):
\[x \cdot q = \frac{23}{10} \cdot \frac{1}{3} = \frac{23}{30}\]
To find the fractional part \(\{\frac{23}{30}\}_3\), we perform partial fraction decomposition. We split it into a “Pure 3-part” and a “Non-3 part” to see how each contributes to the winding:
\[\frac{23}{30} = \frac{A}{3} + \frac{B}{10}\]
Solving for \(A\) and \(B\), we find that \(\frac{23}{30} = \frac{2}{3} + \frac{1}{10}\).
Now, we look at the two pieces: The \(\frac{2}{3}\): This is a pure \(p\)-adic fraction (one power of \(3\) - to the right of the radix period, which is where negative powers of \(3\) are located). In \(3\)-adic notation, this is \(.2_3\). While \(\frac{1}{10}\) looks like a fraction in base \(10,\) in the \(3\)-adic system, its denominator \((10)\) is not divisible by \(3.\) This means it has zero digits to the right of the radix point. It is technically a \(3\)-adic integer (\(\dots 202021_3\)). Identifying the Remainder is the act of filtering out everything that doesn’t sit to the right of the radix point. We keep the \(\frac{2}{3}\) and discard the \(\frac{1}{10}\) because it contributes zero to the winding of the first gear.
\[\{2.3 \cdot \frac{1}{3}\}_3 = \frac{2}{3}\]
Finally, we take that identified remainder and map it to a physical position on the torus. Because the solenoid is a geometric representation of the number line wrapped into a circle, we convert the \(3\)-adic fractional part (which is the part to the right of the radix \(\dots abcd.\text{here}_p\)) into an angular measurement:
Degrees: \(2/3 \times 360^\circ = \mathbf{240^\circ}\)
Color: On the standard RGB color wheel used in these visualizations, \(240^\circ\) corresponds to blue. In the context of the “threading the wire” analogy, this means that for the number \(2.3,\) the wire doesn’t pass through the red circle \((0)\) or the “Green” petal \((1/3)\); it is pulled by the \(p\)-adic remainder into the blue petal (\(2/3\)) at the first level of the solenoid.
For \(101\) as a standard decimal integer, the math becomes very “clean” because it has no denominator to worry about. To find the \(\chi\) (color) of \(101,\) we look at how many times it winds around the hole at different levels (\(q\)):
The outer torus level (\(q = 1/3\)): We multiply the number by the first gear of the odometer:
\[101 \cdot \frac{1}{3} = \frac{101}{3}\]
To find the fractional part \(\{ \dots \}_3\), we divide 101 by \(3\) and look at the remainder:
\[101 \div 3 = 33 \text{ with a remainder of } \mathbf{2}\]
So, \(\{101/3\}_3 = \mathbf{2/3}\).
Degrees: \(2/3 \times 360^\circ = \mathbf{240^\circ}\) Color: Blue
The medium torus level (\(q = 1/9\)):
Now we look deeper into the next nested tube:
\[101 \cdot \frac{1}{9} = \frac{101}{9}\]
Divide \(101\) by \(9\):
\[101 \div 9 = 11 \text{ with a remainder of } \mathbf{2}\]
So, \(\{101/9\}_3 = \mathbf{2/9}\).
Degrees: \(2/9 \times 360^\circ = \mathbf{80^\circ}\) Color: Yellow/Lime Green (between Red and Green)
For the slender torus level (\(q = 1/27\)):
\[101 \cdot \frac{1}{27} = \frac{101}{27}\]
Divide \(101\) by \(27\):
\[101 \div 27 = 3 \text{ with a remainder of } \mathbf{20}\]
So, \(\{101/27\}_3 = \mathbf{20/27}\).
Degrees: \(20/27 \times 360^\circ \approx \mathbf{266.6^\circ}\) Color: Violet/Indigo (leaning toward Blue)
Let’s look at \(1/27\) in the \(3\)-adic system (\(p=3\)): it is perfectly aligned with the third level of the nested tori. Because \(27 = 3^3\), the number \(1/27\) is a pure power of the base. This makes its behavior in the solenoid very specific and easy to track:
The “fat torus” level (\(q = 1/3\)): We multiply by the first gear:
\[\frac{1}{27} \cdot \frac{1}{3} = \frac{1}{81}\]
Fractional part: \(\{1/81\}_3\). Since \(81\) is a power of \(3\), this number has no digits to the left of the \(p\)-adic decimal point in the way an integer does. In \(p\)-adic analysis, if the denominator is a higher power than the multiplier, the “winding” hasn’t started yet.
Angle: \(0^\circ\) Color: Red
The “medium torus” level (\(q = 1/9\)):
\[\frac{1}{27} \cdot \frac{1}{9} = \frac{1}{243}\]
Fractional Part: \(\{1/243\}_3 = 0\). Color: Red
The “infinite” level (\(q = 1\)) Now, let’s look at the “natural” state of \(1/27\). In the \(3\)-adic expansion, \(1/27\) is written as:
\[x = 3^{-3} = 0.001_3\]
It has three zeros before the first digit appears.
The “Wire” for \(1/27\) stays in the absolute red center of the first few tori. It only starts to “wind” and show color when the “microscope” (\(q\)) gets powerful enough to see the \(3^{-3}\) level.
At \(q = 27\): \(\{ \frac{1}{27} \cdot 27 \}_3 = \{1\}_3 = \mathbf{0}\) (Red)
At \(q = 81\): \(\{ \frac{1}{27} \cdot 81 \}_3 = \{3\}_3 = \mathbf{0}\) (Red)
From Wikipedia:
The big picture: When you collect all \(p\)-adic “local” views and stitch them together into one massive mathematical object, you get the Adeles (short for “additive ideles”).If each \(p\)-adic field is a single prism, the Adele Ring (\(\mathbb{A}\)) is the entire crystal chandelier.1. What is an Adele, intuitively?Think of an Adele as an infinite string or a “vector” where every slot corresponds to a different way of measuring a number. If you were to represent the number \(10\) as an Adele, it would look like this:
\[\text{Adele}(10) = (10_{\mathbb{R}}, 10_2, 10_3, 10_5, 10_7, 10_{11}, \dots)\]
P-adic numbers are power series:
\[s =\sum_{i=k}^\infty a_ip^i= a_kp^k + a_{k+1}p^{k+1} +a_{k+2}p^{k+2} + \cdots\] where \(k\) is an integer and \(0\leq a_i < p.\) These coefficients are the residue field (see below).
From this YouTube video:
The definition of the absolute value of the elements in a field determines the metric, which maps two elements of the field to a positive value.
The p-adic absolute value is defined as (for \(\alpha \in \mathbb Q\))
\[\left| \alpha \right|_p = \left| p^n \, \frac g h \right|_p = p^{-n}\] This takes only discrete values \(\left|\cdot\right|\in\{p^n:n\in\mathbb Z\}\cup\{0\}\), since \(|0|_p=0\).
For a p-adic number represented as a power series, the absolute value is determined by the lowest exponent term with a non-zero coefficient. The term with the lowest exponent of \(p\) signifies the highest power of \(p\) that divides the number.
Examples:
For \(p=11\) and \(\alpha =968/9,\)
\[\left| 968/9\right|_{11} = \left| 11^2 \, \frac{8}{9} \right|_{11} = 11^{-2}\]
In SageMath,
x = Qp(11)(968/9)
print(abs(x))
1/121 = 11^2
This results in puzzling results for the metric. For instance, with \(p=7\) the distance between \(2\) and \(3\) is greater than between \(28814\) and \(2\):
\[\left| 28814-2\right|_{7}= \left| 28812\right|_{7}= \left| 7^4 \, 13 \right|_{7} = 7^{-4}=1/2401\]
whereas
\[\left| 3-2\right|_{7}= \left| 1\right|_{7}= \left| 7^0 \right|_{7} = 7^{0}=1\]
Or in 3-adic distance:
\(1\) and \(3\): Their difference \((2)\) is not divisible by \(3\), so their \(3\)-adic distance is relatively large. \(1\) and \(10\): Their difference \((9)\) is divisible by \(3^2\), making them closer in the \(3\)-adic sense.
This metric determines other seemingly puzzling results, such as the fact that in the \(2\)-adic sense
\[1 + 2 + 2^2 + 2^3 + 2^4 + \cdots=\frac{1}{1-2}=-1\]
makes sense, based on the fact that the added values (in \(2\)-adic) are getting smaller and smaller. This is presented by 3B1B in here.
The p-adic norm \(\left|x \right|_p = p^{-\nu}\) has power law behavior. Because the norm is defined as a power of \(p\), the addition of two p-adic numbers cannot result in a norm larger than the larger of the two individual norms. This is a characteristic feature of non-Archimedean spaces, where the usual additive properties of norms are replaced by the strong form of the triangle inequality, \(\left|x+y \right|_p \leq \max(\left|x \right|_p, \left|y \right|_p)\).
Visualization of the p-adic norm as an infinity tree, corresponding to the power series. Each branch represents an element of the residue field: This is the set of numbers that remain after dividing all integers by \(p\). For example, if \(p=3\), the residue field would be \(\{0, 1, 2\}\) because any integer divided by \(3\) leaves a remainder of \(0, 1, or 2\). The p-adic numbers are down at the boundary of this infinite tree. The p-adic norm can be interpreted as geodesic distances on this tree.
Here is a similar representation as a tree from here:
A p-adic integer is a walk up the tree from root to leaf, although one would never get to the leaf since p-adics are infinite expressions.
Examples of p-adic numbers in \(\mathbb Q_5\) (from here):
\[ \begin{align} (1)_{\mathbb Q_5} &=1\\ (5)_{\mathbb Q_5} &= (0+ 1\times 5)_{\mathbb Q_5}=10\\ (-1)_{\mathbb Q_5} &=(4 + 4 \cdot 5 + 4 \cdot5^2+\cdots)_{\mathbb Q_5}=...4444 \end{align} \] because adding \(...4444\) to \(1\), which is \(...000001\) will result in \(0\) (additive inverse of one).
Simple algorithm compared to long division based on a couple of examples:
Based on this YT presentation, let’s look first at the decimal expansion of \(1/3\):
\[\frac 1 3 = \frac {c_0}{10^0} + \frac {c_1}{10^1} + \frac {c_2}{10^2} + \frac {c_3}{10^3}+ \dots \]
Multiplying \(\times 3\)
\[1= 3\left(\frac {c_0}{10^0} + \frac {c_1}{10^1} + \frac {c_2}{10^2} + \frac {c_3}{10^3}+ \dots \right) \]
\(c_0\), in \(\frac{c_0}{10^0}\), multitplied times \(3\) doesn’t fit into \(1\), and hence \(c_0\) is \(0.\cdots\), and this gets us to the point when we have to add a zero \(0\) to the right of \(1\) to find \(c_1\) (i.e. multiply \(\times 10\)). Naturally,
\[10 = 3\left( c_1 + \frac {c_2}{10^1} + \frac {c_3}{10^2}+ \dots \right) \]
Now \(3 c_1=10 \implies c_1 = 3\) and
\[1=10 - 9 = 3\left( \frac {c_2}{10^1} + \frac {c_3}{10^2}+ \dots \right) \]
Again we have to multiply by ten:
\[10 = 3\left(c_2 + \frac{c_3}{10^1}+ \dots \right)\]
and we see that \(C_2=3.\) Et cetera.
This is mirrored in the p-adics as follows.
Example: calculate what \(1/3\) is in \(\mathbb Q_5:\)
We want to express \(1/3\) as a power series:
\[\frac 1 3 = a_0 + a_1\, p + a_2 \, p^2+ \dots \]
Rearranging:
\[1 = 3\left(a_0 + a_1\, p + a_2 \, p^2+ \dots \right) \]
If we express it \(\mod 5\) the only term that will survive is the first
\[1 = 3\,a_0\]
and
\[a_0= 2\]
because
\[3\times 2 = 6 \equiv 1 \mod(5)\]
But we want finer refinement (inverse limit). Since the calculated \(6\) is congruent to the LHS (i.e. \(1\)), the difference will be a multiple of \(5\):
\[1 - 6=-5= 3\left(a_1\, p + a_2 \, p^2+ \dots \right) \] Now dividing by \(5\) on both sides, and since \(p=5\):
\[ -1 = 3\left(a_1 + a_2 \, p^1+ \dots \right)\]
Given that \(-1 \equiv 4 \mod(5)\), if we look at that equation \(\mod 5\), all the powers of \(p\) will be zero, allowing us to calculate that \[a_1 = 3\]
since \(3 \times 3 = 9\equiv 4 \mod(5).\) Note that the fact that the terms containing powers of \(p\) go to zero doesn’t imply that the coefficients are zero.
Rinse and repeat:
\[-1 - 9= -10 = 3\left(a_2\, p + a_3 \, p^2+ \dots \right)\]
Divide by \(5\):
\[3 \mod(5) \equiv -2 = 3\left(a_2 + a_3 \, p+ \dots \right)\]
yielding
\[a_2=1\]
Rinse and repeat:
\[-2-3=-5 = 3\left( a_3\,p+ a_4\,p^2\dots \right)\]
Divide by \(5\):
\[4 \mod(5)\equiv -1 = 3\left( a_3+ a_4\,p\dots \right)\]
so \[a_3=3\]
Et cetera.
\[ \require{enclose} \begin{array}{rll} & \color{blue}{2}\,\color{aqua}{3}\,\color{magenta}{1}\,\color{lime}{3}\dots \\[3pt] 3 &\enclose{longdiv}{\phantom{0}\color{brown}{\bf 1\equiv 1}}\kern-.2ex \\[3pt] & \underline{-\,\color{orange}{\bf 6\equiv 1}} && \hbox{($\color{blue}{2} \times 3 =\color{orange}{\bf{6}}\equiv \color{brown}{\bf{ 1}}\mod(5)$)}\quad\hbox{$\color{brown}{\bf 1}=3\,(\color{blue}2\,p^0 +x_1 \,p^1 + x_2 \,p^2+ x_3 \,p^3+\cdots)$} \\[3pt] &\color{red}{\bf{-5}}\phantom{0}\to \color{brown}{\bf{-1\equiv 4}} && \hbox{($\frac{\color{red}{\bf{-5}}}{p} = \color{brown}{\bf{-1}}\equiv 4\mod(5)$)}\quad\hbox{$\frac{\color{red}{\bf{-5}}}{p}=3\,(x_1 + x_2\,p^1+ x_3\,p^2+\cdots)$} \\[3pt] &\phantom{0000000}\underline{-\,\color{orange}{\bf 9\equiv 4}\phantom{0}} && \hbox{($\color{aqua}{3} \times 3 =\color{orange}{\bf 9} \equiv 4 \mod(5)$)} \quad\hbox{$\color{brown}{\bf{-1}}=3\,(\color{aqua}3\,p^0 + x_2\,p^1+ x_3\,p^2+\cdots)$}\\[3pt] &\phantom{000000}\color{red}{\bf{-10}} \phantom{0}\to \color{brown}{\bf{-2\equiv 3}} && \hbox{($\frac{\color{red}{\bf{-10}}}{p} = \color{brown}{\bf{-2}}\equiv 3\mod(5)$)}\quad\hbox{$\frac{\color{red}{\bf{-10}}}{p}=3\,(x_2+ x_3\,p+\cdots)$} \\[3pt] &\phantom{00000000000000}\underline{-\,\color{orange}{\bf{3\equiv 3}}} && \hbox{($\color{magenta}{1} \times 3 = \color{orange}{\bf{3}}\equiv 3\mod(5)$)}\quad\hbox{$\color{brown}{\bf{-2}}=3\,(\color{magenta}1\,p^0 + x_3\,p^1+\cdots)$} \\[3pt] &\phantom{00000000000000}\color{red}{\bf{-5}} \to \color{brown}{\bf{-1\equiv 4}} && \hbox{($\frac{\color{red}{\bf{-5}}}{p} = \color{brown}{\bf{-1}}\equiv 4\mod(5)$)}\quad\hbox{$\frac{\color{red}{\bf{-5}}}{p}=3\,(x_3+\cdots)$} \\[3pt] &\phantom{00000000000000000000}\underline{-\,\color{orange}{\bf{9\equiv 4}}} && \hbox{($\color{lime}{3} \times 3 = \color{orange}{\bf{9}}\equiv 4\mod(5)$)}\quad\hbox{$\color{brown}{\bf{-1}}=3\,(\color{lime}3\,p^0 +\cdots)$}\\[2pt] &\phantom{00000000000000000000}\color{red}{\bf{-10}}\\[2pt] &&\phantom{000000000}\vdots \end{array} \]
\[\left(1/3 \right)_{\mathbb Q_5}= 2 + 3 \cdot 5 + 1 \cdot 5^2 + 3 \cdot 5^3 + \cdots\] Notice that the algorithm keeps reducing the remainder modulo \(5\), as we get the coefficients for higher and higher \(p^n\) values. This is akin to adding a \(0\) to the remainder to keep dividing \(1\) into \(3\) in the process of getting the decimal expression of \(1/3,\) with each \(0\) added to the remainder equivalently contributing to higher and higher \(10^{-n}\) values in the decimal expression.
In SageMath:
padic_printing.mode('digits')
print(Qp(5)(1/3))
...31313131313131313132
padic_printing.mode('series')
print(Qp(5)(1/3))
2 + 3*5 + 5^2 + 3*5^3 + 5^4 + 3*5^5 + 5^6 + 3*5^7 + 5^8 + 3*5^9 + 5^10 + 3*5^11 + 5^12 + 3*5^13 + 5^14 + 3*5^15 + 5^16 + 3*5^17 + 5^18 + 3*5^19 + O(5^20)
\[...31313131313131313132 = 2 + 3\cdot 5 + 5^2 + 3\cdot 5^3 + 5^4 + 3\cdot 5^5 + 5^6 + 3\cdot 5^7 + 5^8 + 3\cdot 5^9 + 5^{10} + 3\cdot 5^{11} + O(5^{12})\]
Another example: \(2/3\) in \(5\)-adic:
In Sagemath:
padic_printing.mode('digits')
print(Qp(5)(2/3))
...13131313131313131314
padic_printing.mode('series')
print(Qp(5)(2/3))
4 + 5 + 3*5^2 + 5^3 + 3*5^4 + 5^5 + 3*5^6 + 5^7 + 3*5^8 + 5^9 + 3*5^10 + 5^11 + 3*5^12 + 5^13 + 3*5^14 + 5^15 + 3*5^16 + 5^17 + 3*5^18 + 5^19 + O(5^20)
\[2 = 3\left(a_0 + a_1\, p + a_2 \, p^2+ \dots \right) \]
\[a_0=4\]
because \(3 \times 4 = 12\equiv2 \mod(5)\)
Now
\[2-3 \times 4= -10 = 3\left(a_1\, p + a_2 \, p^2+ \dots \right) \]
Divide by \(5\)
\[3 \mod(5)\equiv -2 = 3\left(a_1 + a_2 \, p+ \dots \right) \]
yields
\[a_1 = 1\]
and therefore
\[-2 -3=-5= 3\left(a_1 + a_2 \, p+ \dots \right) \]
divide by \(5\)
\[4 \mod(5)\equiv -1 = 3\left( a_2 + a_3\, p+ \dots \right) \]
and
\[a_2=3\]
Subtract
\[-1 - 9=-10= 3\left(a_3\, p+ \dots \right) \]
Divide by \(5\)
\[3\mod(5)\equiv-2= 3\left(a_3\, p+ \dots \right) \]
yielding
\[a_3=1\]
And so on.
Notice that this would break if we tried \(1/24\) in \(2\)-adics:
\[1=24\, (a_0+ a_1 \,p + a_2 \,p^2+\dots)\]
because there is no number \(n\) such that \(24 \, n\equiv 1\mod(2).\) There is no integer solution to this congruence, since any even number is congruent to \(0\quad (\mod 2).\) This is the difference between \(\mathbb{Z}_p\) and \(\mathbb{Q}_p:\) \(1/24\) is not a \(2\)-adic integer because its \(2\)-adic norm is \(|1/24|_2 = 2^3 = 8\), which is \(>1\). \(1/3 \cdot 2^{-3}\), it exists in the field. The “period” (radix point) in \(...101.011\) is exactly the tool that handles the fact that the denominator was divisible by \(p\).
Hence we we’ll need the factorization trick explained below with \(1/24= 1/3\times 2^{-3}.\)
Wikipedia example of \(1/5\) in \(3\)-adics:
\[ \require{enclose} \begin{array}{rll} & \color{blue}{2}\,\color{red}{0}\,\color{magenta}{1}\,\color{lime}{2}\dots \\[-3pt] 5 &\enclose{longdiv}{\phantom{0}1}\kern-.2ex \\[-3pt] & \underline{-10} && \hbox{($\color{blue}{2} \times 5 = 10\equiv 1\mod(3)$)} \\[-3pt] &-9\phantom{0}\to -3 && \hbox{($-9/p = -3\equiv 0\mod(3)$)}\,\hbox{($-9/p=5(x_1 + x_2p^1+ x_3p^2+\cdots)$)} \\[-3pt] &\phantom{0000000}\underline{-0\phantom{0}} && \hbox{($\color{red}{0} \times 5 =0 \equiv 0 \mod(3)$)} \\[-3pt] &\phantom{000000}-3 &\to -1 & \hbox{($-3/p = -1\equiv 2\mod(3)$)}\,\hbox{($-3/p=5(x_2+ x_3p+\cdots)$)} \\[-3pt] &&\phantom{000}\underline{-5} & \hbox{($\color{magenta}{1} \times 5 = 5\equiv 2\mod(3)$)} \\[-3pt] &&\phantom{00}-6 \to -2 & \hbox{($-6/p = -2\equiv 1\mod(3)$)}\,\hbox{($-6/p=5(x_3+\cdots)$)} \\[-3pt] &&\phantom{00000000}-10 & \hbox{($\color{lime}{2} \times 5 = 10\equiv 1\mod(3)$)}\\[-3pt] &&&\vdots \end{array} \]
In SageMath the \(3\)-adic expansion is:
padic_printing.mode('series')
print(Qp(3)(1/5))
2 + 3^2 + 2*3^3 + 3^4 + 3^6 + 2*3^7 + 3^8 + 3^10 + 2*3^11 + 3^12 + 3^14 + 2*3^15 + 3^16 + 3^18 + 2*3^19 + O(3^20)
padic_printing.mode('digits')
print(Qp(3)(1/5))
...21012101210121012102
whereas base \(3\) base expression is
\[0.012101210121\dots_3\]
Notice that the expansion of \(5\) in \(3\)-adic may look similar in structure:
padic_printing.mode('series')
print(Qp(3)(5))
2\cdot 3^0 + 1\cdot 3^1 + O(3^20)
but it ends: after a certain coefficient, the rest are all zeros:
padic_printing.mode('digits')
print(Qp(3)(5))
...00000000000000000012
This is the difference between the p-adic expression of an integer and a fraction: The p-adic representation of a fraction that is not an integer always requires an infinite number of non-zero terms in its expansion in powers of p. It cannot be represented by a finite sum of powers of p. This is equivalent to saying that the p-adic expansion will never terminate with zeros to the left.
P-adics expand to infinity on to the left as in \(\mathbb Z_3,\) corresponding to the \(3\)-adics. For example, in this system the number \(3\) is
\[...00000000000000000010 = 0 \cdot 3^0 + 1 \cdot 3^1 \]
In Sage
padic_printing.mode('digits')
print(Zp(3)(3))
...000000000000000000010
padic_printing.mode('series')
print(Zp(3)(3))
3 + O(3^21)
For natural numbers, the p-adic representation and the base-p representation are essentially the same. For natural numbers, the p-adic representation will have only a finite number of non-zero terms, effectively reducing to the base-p representation.
For example, compare the \(5\)-adic expansion of \(233\)
\[...00000000000000001413 = 3 \cdot 3^0 + 1 \cdot 5^1 + 4\cdot 5^2 + 1\cdot 5^3+\cdots\]
padic_printing.mode('series')
print(Qp(5)(233))
3 + 5 + 4*5^2 + 5^3 + O(5^20)
padic_printing.mode('digits')
print(Qp(5)(233))
...00000000000000001413
to the expression mod \(5\):
\[233 \mod(5)= 3 + 1 \cdot 5^1 + 4 \cdot 5^2 + 1\cdot 5^3 \]
a = 233
base = 5
print(" + ".join([f"{digit}*{base}^{i}" if i > 0 else str(digit) for i, digit in enumerate(a.digits(base)) if digit]))
3 + 1*5^1 + 4*5^2 + 1*5^3
The negative reals are simply the additive inverses of their positive counterparts, so \(-1 = ...11111111\)
Because
\[...11111111 + ...00000001 = ...000000\]
since in base \(2\) and summing from right to left, \(1 + 1 = 0\) and we carry \(1\) to the left to add it to the \(1\) in the second position in the expression of \(-1.\)
A negative integer can be expressed as the difference between \(0\) and a positive integer. The coefficients will not be all zeros beyond a certain point as in positive integers, because they represent the “borrowing” that occurs during the subtraction. However, the representation will still be finite.
Example:
\(2\)-adic representation of \(-33\): We want to find a \(2\)-adic number \(x\) such that \(x + 33 = 0\) (in the \(2\)-adic field). We can compute this by finding the inverse of \(33\) in the \(2\)-adic field:
padic_printing.mode('digits')
print(Qp(2)(33))
...00000000000000100001
padic_printing.mode('digits')
print(Qp(2)(-33))
...11111111111111011111
Negative exponents typically come into play when dealing with fractions or representing very small numbers in the p-adic number system.
In the p-adic number system, fractions that involve negative exponents emerge when the denominator of the fraction is divisible by \(p\), the base of the system. This is because the p-adic expansion needs to represent the fractional part appropriately by incorporating terms with negative exponents. Let’s consider an example in the \(5\)-adic system: Let’s take \(1/25\). Convert to \(5\)-adic Expansion: \(1/25=5^{−2}\).
padic_printing.mode('digits')
print(Qp(5)(1/25))
...000000000000000000.01
padic_printing.mode('series')
print(Qp(5)(1/25))
5^-2 + O(5^18)
Here is another example of negative exponents, which correspond to digits to the right of the period. When you see a p-adic number written with digits to the right of a “p-adic radix point” (or sometimes represented with negative powers of p explicitly), it indicates that the number is not a p-adic integer. It is a p-adic number that lies in the fraction field of the p-adic integers. In this case it is the \(2\)-adic expression of \(\frac{1}{2^5 \cdot33}:\)
padic_printing.mode('digits')
print(Qp(2)(1/(2^5*33)))
...111110000011111.00001
padic_printing.mode('series')
print(Qp(2)(1/(2^5*33)))
2^-5 + 1 + 2 + 2^2 + 2^3 + 2^4 + 2^10 + 2^11 + 2^12 + 2^13 + 2^14 + O(2^15)
How are the finite digits (\(.011\)) to the right of the period calculated in an expression such as \(...10101010101010101.011\), and where do they come from?
The issue comes up in the introduction of \(\mathbb Q_p\) numbers. For instance, in the case of the 2-adic expression of \(\frac 1{24}\). P-adic numbers can be factored as
\[n = p^k \, \text{unit}\] where \(k\) is an exponent measuring the valuation of the p-adic as \(\frac 1{p^k}\), and the \(\text{unit}\) is… well quick review:
A unit in a ring is an element that has a multiplicative inverse. In other words, if \(a\) is a unit, there exists an element \(b\) in the ring such that \(a \cdot b = 1\). A zero divisor is a non-zero element \(a\) in a ring such that there exists a non-zero element \(b\) where \(a \cdot b = 0.\)
Therefore, in the case of a fraction:
\[\frac m n = \frac m{p^k} \frac 1{\text{unit}}= \frac m{\text{unit}}p^{-k}\]
Applying it to the example of \(1/24,\) the denominator can be factorized as \(2^3 \cdot 3:\)
\[\frac 1{24}=\frac 1 3 \cdot 2^{-3}\]
\(1/3\) is just the multiplicative inverse of \(3,\) which can be obtained in sagemath as:
from sage.all import *
from sage.rings.padics.padic_printing import pAdicPrinter
padic_printing.mode('digits')
print(Qp(2)(1/3))
# ...10101010101010101011
and easily confirmed to be accurate:
third = Qp(2)(1/3)
three = Qp(2)(3)
print(third * three)
# ...00000000000000000001
Therefore,
\[1/24 = ...10101010101010101011 \cdot 2^{-3}\]
but since we are operating in base \(2,\) the factor \(2^{-3}\) just moves the period to the right, like \(10^{-3}\) would in base \(10.\) In this way, we get the final result:
\[1/24=...10101010101010101.011=1\cdot2^{-3} + 1\cdot2^{-2}+0\cdot2^{-1}+1\cdot2^{0} + 0\cdot2^{1}+ 1\cdot2^{2}+0\cdot2^{3}+1\cdot2^{4}\]
or in sagemath
padic_printing.mode('digits')
print(Qp(2)(1/24))
...10101010101010101.011
padic_printing.mode('series')
print(Qp(2)(1/24))
2^-3 + 2^-2 + 1 + 2^2 + 2^4 + 2^6 + 2^8 + 2^10 + 2^12 + 2^14 + 2^16 + O(2^17)
Suppose our computer stores the following 5-adic number: \(...4321\) (where the digits extend infinitely to the left). However, the computer can only store the last four digits: \(4321\).
We treat the stored digits, \(4321\), as a base-\(5\) number.
We convert this base-5 number to its decimal (base-10) equivalent:
\(4 * 5³ + 3 * 5² + 2 * 5¹ + 1 * 5⁰ = 4 * 125 + 3 * 25 + 2 * 5 + 1 * 1 = 500 + 75 + 10 + 1 = 586\)
Computers typically use floating-point representation for real numbers. This allows them to represent a wide range of numbers, both very small and very large, with reasonable precision. Computer hardware is designed to perform arithmetic on binary numbers, which are used to represent integers and floating-point numbers. There is no direct hardware support for p-adic arithmetic. Any p-adic calculations would have to be implemented in software, which would be slower.
A simple root of a polynomial is a root where the polynomial crosses the x-axis and does not touch or bounce off it. A root \(r\) of a polynomial \(f(x)\) is considered simple if \(f(r) = 0\) and the derivative \(f'(r)\neq 0\). This means that at \(r\), the polynomial has a non-zero slope, indicating that it crosses the x-axis at that point. In contrast, a multiple root (or repeated root) would satisfy \(f(r) = 0\) and \(f’(r) = 0\), meaning the polynomial touches or bounces off the x-axis at \(r\) but does not cross it.
If a polynomial has a simple root modulo a prime \(p\), Hensel’s theorem allows us to lift this root to a root modulo \(p^k\) for any \(k\). This process can be extended to find roots in the p-adic integers \(\mathbb{Z}_p\).
\[a_{n+1}\equiv a_n \mod{p^{n+1}}\]
and
\[f(a_n)\equiv 0 \mod {p^{n+1}}\]
will allow the construction of a sequence of entries in the p-adic expression.
For instance (see here), \(f(x) = x^2 + 1\) has two solutions \(\mod{5}\): \(3\) with multiplicity \(1\), and \(2\) with multiplicity \(1.\)
R.<x> = GF(5)[]
p = x^2 + 1
p.roots()
# [(3, 1), (2, 1)]
These will start the sequence in the p-adic (of \(5\)-adic) expansion. So for \(r = 2,\) this will be \(a_0=2.\) For \(a_1,\) the equation above is
\[\begin{align} a_1 &\equiv a_0 \mod{5^1}\\ a_1 &\equiv 2 \mod{5} \\ a_1 &= 2 + 5t \end{align}\]
and
\[\begin{align} f(a_1) &\equiv 0 \mod{5^2}\\ (2 + 5t)^2 + 1 &\equiv 0 \mod{5^2} \\ t &\equiv 1 \mod {5^2} \end{align}\]
yielding
\[\begin{align} a_1 = 2 + 5 \cdot 1 =7 \end{align}\]
And at this point we are ready for
\[\begin{align} a_2 &\equiv a_1 \mod{5^2}\\ a_2 &\equiv 7 \mod{25}\\ a_2 &= 7 +25t \end{align}\]
and \[(7 +25t)^2+1 \equiv 0 \mod{5^3}\]
which results in \(a_2 =57.\)
Progressing to
\[\begin{align} a_3 &\equiv a_2 \mod{5^3}\\ a_3 &\equiv 57 \mod{125}\\ a_3 &= 57 +125t \end{align}\]
which can be plugged into the function:
\[(57+125t)^2 + 1\equiv 0 \mod{5^4}\]
resulting in \(t=1\) and \(a_3 =57 + 125 = 182\)
In sagemath,
import numpy as np
def hensel(roots, p):
first_root = roots[0][0]
scnd_root = roots[1][0]
first_root_str = str(first_root).replace('...', '')
first_root_list = [int(digit) for digit in first_root_str]
first_root_list_reversed = first_root_list[::-1]
first_result = [digit * (p ** i) for i, digit in enumerate(first_root_list_reversed)]
scnd_root_str = str(scnd_root).replace('...', '')
scnd_root_list = [int(digit) for digit in scnd_root_str]
scnd_root_list_reversed = scnd_root_list[::-1]
scnd_result = [digit * (p ** i) for i, digit in enumerate(scnd_root_list_reversed)]
return [np.cumsum(first_result), np.cumsum(scnd_result)]
padic_printing.mode('series')
R.<x> = Qp(5,8)[]
p = x^2 + 1
p.roots()
#[(2 + 5 + 2*5^2 + 5^3 + 3*5^4 + 4*5^5 + 2*5^6 + 3*5^7 + O(5^8), 1),
(3 + 3*5 + 2*5^2 + 3*5^3 + 5^4 + 2*5^6 + 5^7 + O(5^8), 1)]
padic_printing.mode('digits')
R.<x> = Qp(5,8)[]
p = x^2 + 1
p.roots()
#[(...32431212, 1), (...12013233, 1)]
roots = p.roots()
hensel(roots, 5)
#[array([ 2, 7, 57, 182, 2057, 14557, 45807, 280182]),
array([ 3, 18, 68, 443, 1068, 1068, 32318, 110443])]
Notice how this makes sense:
2 + 5 + 2*5^2 = 57
There is a “mirror-image” relationship between standard base-\(3\) expansions, for example and \(3\)-adic numbers. The most fundamental difference is the “direction” of the infinite digits. Base-\(3\) are real Numbers, expanding to the right into increasingly smaller fractions (\(3^{-1}, 3^{-2}, \dots\)). On the other hand, \(3\)-adics expand to the left into increasingly higher powers of \(3\) (\(3^1, 3^2, \dots\)).
The mechanical steps for calculating a fraction like \(5/29\) are inverted:
Base-3 Algorithm:
In base 3, we only use the digits \(0\), \(1\), and \(2\). We are looking for
\[5/29 = d_{-1}3^{-1} + d_{-2}3^{-2} + \dots$Since $5 < 29\]
the expansion starts with \(0\). To find the digits, we multiply the remainder by \(3\) and see how many times \(29\) fits into it.
\(5 \times 3 = 15\). (\(15\) is less than \(29\)). Digit: \(0\)
\(15 \times 3 = 45\). (\(29\) goes into \(45\) \(1\) time, remainder \(16\)). Digit: \(1\)
\(16 \times 3 = 48\). (\(29\) goes into \(48\) \(1\) time, remainder \(19\)). Digit: \(1\)
\(19 \times 3 = 57\). (\(29\) goes into \(57\) \(1\) time, remainder \(28\)). Digit: \(1\)
\(28 \times 3 = 84\). (\(29\) goes into \(84\) \(2\), remainder \(26\)). Digit: 2
Hence the base-3 result is \(5/29 \approx 0.01112\dots_3\)
You multiply the remainder by \(3\) at each step and keep the quotient (how many times \(29\) “fits”). This zooms into the number line.
\(3\)-adic algorithm:
You subtract the residue and divide the error by \(3\) at each step to find the next remainder.
For the 3-adic version, we want to find digits \(d_0, d_1, d_2 \dots\) such that:
\[5/29 = d_0 + d_1(3) + d_2(9) + d_3(27) + \dots\]
This is equivalent to solving the congruence \(29x \equiv 5 \pmod{3^k}\) for increasing values of \(k\).
Step 1: Find \(d_0\): Solve \(29d_0 \equiv 5 \pmod 3\). Simplify 29 and 5 modulo 3: \(29 \equiv 2 \pmod 3\) and \(5 \equiv 2 \pmod 3\). The equation becomes: \(2d_0 \equiv 2 \pmod 3\). \(d_0 = 1\).
Step 2: Find \(d_1\): We know the expansion looks like \(1 + 3d_1 + \dots\). Substitute this into the original fraction: \[\frac{5 - 29(1)}{3} = \frac{-24}{3} = -8\] Now solve for \(d_1\): \(29d_1 \equiv -8 \pmod 3\). Simplify: \(2d_1 \equiv 1 \pmod 3\) (since \(-8 \equiv 1 \pmod 3\)). \(d_1 = 2\) (because \(2 \times 2 = 4 \equiv 1 \pmod 3\)).
Step 3: Find \(d_2\): Take the previous “leftover” (\(-8\)) and subtract the new term (\(29 \times 2\)): \[\frac{-8 - 29(2)}{3} = \frac{-8 - 58}{3} = \frac{-66}{3} = -22\]
Now solve for \(d_2\): \(29d_2 \equiv -22 \pmod 3\). Simplify: \(2d_2 \equiv 2 \pmod 3\).\(d_2 = 1\).
Therefore the \(3\)-adic result is \(5/29 = \dots 121_3\)
Explained slightly differently:
The goal is to find \(...d_2d_1d_0\). To pick the digit \(d_i\) we have to answer what \(d_i \in \{0, 1, 2\}\) makes the numerator of \((\text{Value} - d_i)\) divisible by \(3\)? For \(5/29\), \(d_0 = 1\) because \(5-29(1) = -24\), which is divisible by \(3.\) Subtract that digit: \(5/29 - 1 = -24/29\). Divide by \(3\): \((-24/29) \div 3 = -8/29\). Repeat: What \(d_1\) makes \(-8/29 - d_1\) divisible by 3? \(-8 - 29(2) = -66\), which is divisible by \(3\). So \(d_1 = 2\).
In general terms the algorithm works as follows:
\[x_0 = x\]
\[x_i \equiv d_i \pmod p\]
Technically, if \(x_i = \frac{a}{b}\), you solve the linear congruence \(b \cdot d_i \equiv a \pmod p\). Since \(p\) does not divide \(b\), a unique solution for \(d_i\) always exists.
This division is not a modular operation. It is a literal division in the field of rational numbers \(\mathbb{Q}\). Because we chose \(d_i\) such that \(x_i - d_i\) is a multiple of \(p\), the division “clears” a factor of \(p\) from the numerator, effectively shifting the \(p^{i+1}\) term into the “units” position for the next iteration. In modular arithmetic, it would always be \(0.\)
In p-adics we keep the residue \(d_i\): the unique digit in \(\{0, \dots, p-1\}\) that, when subtracted from the current value, creates a difference divisible by \(p\). This ensures that when we subsequently divide by \(p\) to find the next digit, we are performing an exact algebraic shift that moves the next power of \(p\) into the units position.
Base-\(3\) approximations (\(0.17\)) get closer to a value by reducing the physical distance on a ruler. \(3\)-adic approximations get closer by making the error more divisible by \(3\). This is why we can represent fractions as “infinite integers” in p-adics: we are adding terms that are so highly divisible by \(3\) that they eventually become “invisible” or zero in the limit. While regular division feels like chasing an approximation, p-adic steps feel exact. This is because each p-adic digit is a perfect solution to a modular equation (\(29x \equiv 5 \pmod{3^n}\)). Once a digit is found, it is “locked in” and never changes.
The Hasse principle, or local-global principle, states that certain polynomial equations (specifically quadratic forms) have a rational solution if and only if they have solutions in the real numbers (\(\mathbb{R}\)) and in all \(p\)-adic fields (\(\mathbb{Q}_{p}\)). It allows checking for solutions locally (modulo primes) to confirm existence globally (in rationals).
If a rational number like \(x = 3/4\) solves an equation, that same \(x\) will also solve the equation in \(\mathbb{R}\) and in every single \(\mathbb{Q}_p\) for every prime \(p\).
To prove there is no rational solution, you only need to find one world where it fails.If you find a solution in \(\mathbb{Q}_5, \mathbb{Q}_{13}, \mathbb{Q}_{17} \dots\) but it fails in \(\mathbb{R}\), then there is no solution in \(\mathbb{Q}\).If it works in \(\mathbb{R}\) and \(\mathbb{Q}_5\) but fails in \(\mathbb{Q}_2\), then there is no solution in \(\mathbb{Q}\). You don’t have to check infinite primes one by one because of Finite Obstructions. For most polynomial equations (specifically “Quadratic Forms” like \(ax^2 + by^2 + cz^2 = 0\)), there are only a handful of “interesting” primes you actually need to check. Usually, these are: 1. The prime \(p=2\). 2. The primes that divide the coefficients of your equation (e.g., if you have \(7x^2\), you must check \(p=7\)). 3. The “Infinite” prime (\(\mathbb{R}\)). If the equation works in those specific “bad” primes and in \(\mathbb{R}\), it is mathematically guaranteed to work in all the other infinite “good” primes.
The Hasse Principle says that for quadratic forms (equations where every term is squared, like \(ax^2 + by^2 + cz^2 = 0\)), the local truths (the \(p\)-adic and real solutions) are so restrictive that they “trap” the global Truth (the rational solution). The reason this principle works specifically for quadratic forms is that they represent “conic sections” (circles, ellipses, hyperbolas). Geometric objects of degree \(2\) have a special property: if you find one point on the curve, you can find all of them by drawing lines through that point.
There is a deep law called the Hilbert Symbol and the Product Formula. It states that for a rational number to exist, the “local signatures” of the equation in all \(p\)-adic worlds must multiply together to equal \(1.\) If the \(p\)-adic worlds “agree” (the product is \(1\)), the rational solution exists. If they “disagree” (the product is \(-1\)), you can’t glue them together. The Hasse Principle for quadratic forms works because there is no “hidden room” for a contradiction. If it looks like a solution everywhere, it is a solution.
For a cubic equation like \(3x^3 + 4y^3 + 5z^3 = 0\), the geometry is a “Genus \(1\)” curve (a torus). These shapes have a hidden internal “twist” called the Shafarevich-Tate group (\(\text{Ш}\)). This “twist” can allow an equation to have solutions in every \(p\)-adic cylinder (the local blueprint looks fine) and in the reals (the size looks fine), but the global geometry is like an Escher staircase — it’s impossible to build the whole thing out of rational blocks.
The genus is the number of “holes” in the shape the equation forms over complex numbers. Genus \(0:\) These are lines or conics (quadratics). Topologically, they are spheres. Because they are “simple,” if you can find a point anywhere (locally), you can easily project that to find all rational points. Genus \(1:\) These are curves defined by cubic equations. Topologically, a genus \(1\) curve is a torus (a donut).
This “spherical” nature is exactly why the Hasse Principle works for quadratics but fails for your cubic (the donut).
Imagine a circle (a \(1\)D sphere) defined by \(x^2 + y^2 = 1\). Find one point: We know \((-1, 0)\) is a rational point on that circle. Draw a line through \((-1, 0)\) with a rational slope \(t\). That line will hit the circle at exactly one other point. If one intersection point is rational (which \((-1, 0)\) is) and the slope is rational, the other intersection point must be rational. By sweeping the slope \(t\) through all rational numbers, you “paint” every single rational point on the circle. You end up with the famous parameterization for Pythagorean triples:\[x = \frac{1-t^2}{1+t^2}, \quad y = \frac{2t}{1+t^2}\]
The Hasse principle (or Local-Global Principle) is the mathematical hope that if an equation has solutions in the real numbers (\(\mathbb{R}\)) and in all \(p\)-adic numbers (\(\mathbb{Q}_p\)), it must have a solution in the rational numbers (\(\mathbb{Q}\)). For quadratic forms (like \(ax^2 + by^2 + cz^2 = 0\)), the Hasse Principle always works. This is the Hasse-Minkowski theorem. If the “local blueprints” (the \(p\)-adics and reals) say a solution is possible, a rational solution is guaranteed to exist. When we move to cubics, the Hasse Principle breaks. The Shafarevich-Tate group (\(Ш\)) is the mathematical construct that measures exactly how much it breaks. It is surprising because, intuitively, if an object fits together perfectly in every local neighborhood and has a valid global “size” (the real solution), you would expect it to exist globally. However, \(Ш\) represents “elements of the Weil-Châtelet group that are locally trivial but globally non-trivial.”
Hensel lifting is a technique in number theory and computer algebra, analogous to Newton’s method, that raises a solution of a polynomial equation from modulo \(p\) (or \(p^{k}\)) to a higher power \(p^{k+1},\) or ultimately to \(p\)-adic integers. It efficiently finds roots of equations or factorizes polynomials over \(\mathbb{Z}[x]\) (polynomials with integer coefficients) by lifting solutions iteratively, requiring the initial root to satisfy a non-vanishing derivative condition.
After finding a root of \(f(x)\) in the residue field \(\mathbb{F}_p = \mathbb{Z}_p / p\mathbb{Z}_p\) (the elements of \(\mathbb{F}_p\) are the “residues” (remainders) of the \(p\)-adic numbers), we increase the “resolution,” by calculating the Hensel Lift in \(\mathbb{Z}_p\) up to three levels of precision (\(5^0, 5^1, 5^2\) for \(\mathbb{Z}_5\) in the example below). We are using the Newton-Raphson style formula for \(p\)-adics:
\[x_{n+1} = x_n - \frac{f(x_n)}{f'(x_n)}\]
The “bridge” that connects the current approximation \(x_n\) to the next one \(x_{n+1}\) is the “nudge” \(h\). If we rearrange the Newton-Raphson formula:
\[x_{n+1} - x_n = - \frac{f(x_n)}{f'(x_n)}\]
we can define \(h\) as that difference:
\[h = - \frac{f(x_n)}{f'(x_n)}\]
In the \(p\)-adic world, for this to be a valid “step” up the tree, \(h\) must be a multiple of the current precision level. If you are at Level \(n\), your \(h\) will look like: \(h = d_n \cdot p^n\). This \(h\) is the exact “nudge” required to make the error at the next level (\(f(x_{n+1})\)) divisible by \(p^{n+1}\).
In the calculation for \(f(x) = x^2 +1\) above, the candidate after getting the \(2\) seed was \((2 + 5d_1)^2,\) which is just a straightforward binomial expansion (FOIL). We simply took our “candidate” for the next level, \(x_1 = 2 + 5d_1\), and plugged it into \(x^2 + 1\).
The “aha!” moment is that Taylor expansions and polynomial expansions are the exact same thing. When you FOIL \((2 + 5d_1)^2 + 1\), you get:
\[(2)^2 + 2(2)(5d_1) + (5d_1)^2 + 1\]
Now look at the Taylor Expansion of \(f(x) = x^2 + 1\) centered at \(x=2\) with a step \(h\):
\[f(2+h) = f(2) + f'(2)h + \frac{f''(2)}{2!}h^2\]
\(f(2) = 2^2 + 1,\) \(f'(2) = 2(2)\) and \(f''(2) = 2.\) If you substitute \(h = 5d_1\), the Taylor formula gives you:
\[f(2+5d_1) = \underbrace{(2^2 + 1)}_{5} + \underbrace{2(2)}_{4}\underbrace{(5d_1)}_{h} + \underbrace{\frac{2}{2}}_{1}\underbrace{(5d_1)^2}_{h^2}\]
\[f(2+5d_1) = 5 + 20d_1 + 25d_1^2\]
You didn’t need the Taylor formula to expand \((2 + 5d_1)^2\) because it’s a simple square. But imagine if your equation was \(x^7 + 3x^4 - x^2 + 1 = 0\). You would have to expand \((2 + 5d_1)^7 \dots\) which would take an hour of algebra. Using the Taylor expansion you just find the derivative \(f'(2)\) and you instantly know the coefficient of the \(d_1\) term. Hensel’s Lemma is essentially the realization that for any polynomial, the expansion \(f(x_n + d_n p^n)\) will always look like:
\[f(x_n) + f'(x_n)(d_n p^n) + (\text{terms divisible by } p^{2n})\] Because you are working modulo \(p^{n+1}\), those “extra” terms (like your \(25d_1^2\)) are always zeroed out. This means the Newton-Raphson formula isn’t just a calculus trick; it is the linear part of the binomial expansion.
To turn the integer \(4357\) into a \(5\)-adic representation (as already done above), we use the method of successive division by \(5\). This gives us the digits \(a_i\) for the expansion:
\[x = a_0 + a_1(5)^1 + a_2(5)^2 + \dots\]
We divide by \(5\) and track the remainders:
\(4357 \div 5 = 871\), remainder \(2\) (\(a_0 = 2\))
\(871 \div 5 = 174\), remainder \(1\) (\(a_1 = 1\))
\(174 \div 5 = 34\), remainder \(4\) (\(a_2 = 4\))
\(34 \div 5 = 6\), remainder \(4\) (\(a_3 = 4\))
\(6 \div 5 = 1\), remainder \(1\) (\(a_4 = 1\))
\(1 \div 5 = 0\), remainder \(1\) (\(a_5 = 1\))
So, in \(5\)-adic notation (written from right to left as \(a_k \dots a_1 a_0\)):
\[4357 = \dots 00114412_5\]
Or more formally:
\[4357 = 2(5^0) + 1(5^1) + 4(5^2) + 4(5^3) + 1(5^4) + 1(5^5)\]
Hensel Lifting: Converting an integer to a \(p\)-adic is encoding. Hensel Lifting is solving. If you treat \(4357\) as a constant, “lifting” it just recovers the integer. To see the power of the lifting process, we should treat \(4357\) as the root of a polynomial, like:
\[f(x) = x - 4357\]
We start with a seed
\(x_1 \equiv 4357 \pmod 5\), which is \(2.\)
We want to find \(x_{k+1} = x_k + a_k(5^k)\) such that \(f(x_{k+1}) \equiv 0 \pmod{5^{k+1}}\).
Start at \(x_1 = 2\):
\(f(2) = 2 - 4357 = -4355\).
Since \(-4355 \equiv 0 \pmod 5\), our seed is valid.
Lift to \(x_2\):
We need \(a_1\) such that \(f(2 + a_1 \cdot 5) \equiv 0 \pmod{25}\).
\((2 + 5a_1) - 4357 \equiv 0 \pmod{25}\)
\(5a_1 - 4355 \equiv 0 \pmod{25}\)
\(5a_1 \equiv 4355 \pmod{25} \implies 5a_1 \equiv 5 \pmod{25} \implies \mathbf{a_1 = 1}\).
\(x_2 = 2 + 1(5) = 7\).
Lift to \(x_3\):
Find \(a_2\) such that \(f(7 + a_2 \cdot 25) \equiv 0 \pmod{125}\).
\((7 + 25a_2) - 4357 \equiv 0 \pmod{125}\)
\(25a_2 - 4350 \equiv 0 \pmod{125}\)
\(25a_2 \equiv 4350 \pmod{125} \implies 25a_2 \equiv 100 \pmod{125} \implies \mathbf{a_2 = 4}\).\(x_3 = 7 + 4(25) = 107\).
As you can see, the \(a_i\) values we find during the lift \((2, 1, 4...)\) are exactly the digits we found in Step \(1.\) Expansion breaks the number down into its \(p\)-adic components. Lifting reconstructs the number (the root) by adding those components back together, level by level.
\(\mathbb{Z}_p\): The \(p\)-adic Integers:
Every number in \(\mathbb{Z}_p\) can be written as a “standard” \(p\)-adic expansion:
\[d_0 + d_1p + d_2p^2 + \dots\]
An element of the \(p\)-adic integers \(\mathbb{Z}_p\) is defined as a thread: a sequence \((x_1, x_2, x_3, \dots)\) where each \(x_n\) is the “shadow” of the number in a lower-resolution world. \(x_1\) is the element that belongs to \(\mathbb{F}_p\) (or is at least the most direct representative of it), and \(x_3\) is the one that casts the shadow on \(x_1\). To visualize this, think of “resolution” as moving from a blurry image to a sharp one: The field \(\mathbb{F}_p\) is the “coarsest” possible level of the \(p\)-adic world. When we look at a \(p\)-adic number \(x = (x_1, x_2, x_3, \dots)\), the first term \(x_1\) is the number viewed modulo \(p\). It is exactly the seed or the residue. As you move to \(x_2\) (mod \(p^2\)) and \(x_3\) (mod \(p^3\)), you are gaining detail. \(\mathbb{F}_p\) only has enough “room” to understand the first digit, so it only “sees” \(x_1\). The higher-resolution elements cast shadows on the lower-resolution ones. Mathematically, the “shadow” is the projection map \(\phi\). \(x_3\) (resolution \(1/125\)) contains all the information about \(x_2\) and \(x_1\). When you “shine the light” of modular arithmetic (\(\pmod p\)) on \(x_3,\) the higher powers of \(p\) vanish, leaving only the \(x_1\) component behind.
In \(\mathbb{Z}_p\), all numbers have a \(p\)-adic size (norm) \(\le 1\). There are no “huge” values here.
Note the following:
\[\bbox[20px, border: 5px solid red]{\mathbb{Z}_p \supset p\mathbb{Z}_p \supset p^2\mathbb{Z}_p \supset p^3\mathbb{Z}_p \supset \dots}\]
\(\mathbb{Z}_p:\) The whole tree (all numbers).
\(p\mathbb{Z}_p\): Every number where the \(p^0\) digit is 0.
\(p^2\mathbb{Z}_p\): Every number where the \(p^0\) and \(p^1\) digits are 0…
\(\mathbb{Q}_p\): The \(p\)-adic Numbers:
Think of \(\mathbb{Q}_p\) as the Field that contains \(\mathbb{Z}_p\), just as the real numbers (\(\mathbb{R}\)) contain the integers (\(\mathbb{Z}\)). It allows for negative powers of \(p\). A number in \(\mathbb{Q}_p\) can start with “fractions”:
\[d_{-k}p^{-k} + \dots + d_0 + d_1p + \dots\]
It is the entire space. It includes numbers that are “huge” in the \(p\)-adic sense (like \(1/5, 1/25, 1/125\)). The Rule: \(\mathbb{Q}_p\) is what you get when you allow division.
When we solve an equation like \(x^2 + 1 = 0\), we are looking for a solution that looks like a \(p\)-adic integer (it has no \(1/5\) or \(1/25\) parts). Therefore, we look inside the ring \(\mathbb{Z}_p\), i.e. the ring of \(p\)-adic integers for a given prime \(p\) under addition (modular) and multiplication. This is why we use \(\mathbb{F}_p \cong \mathbb{Z}_p / p\mathbb{Z}_p\). This is the justification for why the “successive Division” or “cylinder” method is legally allowed to work. \(p\mathbb{Z}_p\) represents the Details. These are all the parts of the number divisible by \(5.\) In the plot, these are all the cylinders above the base. \(\mathbb{Z}_p / p\mathbb{Z}_p\) is is the act of Blurring the Image. You decide to ignore everything in the \(p\mathbb{Z}_p\) “detail” category.
When you take a \(p\)-adic integer and “mod out” by \(p\), you are essentially throwing away every term that has a \(p, p^2, p^3,\) etc., attached to it. Mathematically, it looks like this:
\[\begin{align}x &= a_0 + a_1p + a_2p^2 + \dots\\\\&x \pmod{p} = a_0\end{align}\]
The only thing left is \(a_0\), which is just an element of \(\{0, 1, \dots, p-1\}\).
In algebraic geometry, we call \(\mathbb{F}_p\) the residue field of \(\mathbb{Z}_p\). We can think of \(\mathbb{Z}_p\) as a microscope. The highest level view (the lowest magnification) is \(\mathbb{F}_p\). As we look closer (mod \(p^2\), mod \(p^3\)), you see more digits of the \(p\)-adic number. The isomorphism \(\mathbb{F}_p \cong \mathbb{Z}_p / p\mathbb{Z}_p\) says that the coarsest possible view of a \(p\)-adic integer is exactly the same thing as an element of a finite field.
We start with the ring of integers \(\mathbb{Z}_p\). We “mod out” by \(p\) to get the field \(\mathbb{F}_p\) (the digits \(0-4\)). We find a solution in \(\mathbb{F}_p\). We “lift” it back up into the full \(\mathbb{Z}_p\) tree. You only need \(\mathbb{Q}_p\) if you want to divide by \(p\). For finding roots of polynomials like \(x^2+1\), we stay comfortably inside the “Integer Tree” \(\mathbb{Z}_p\).
In number theory, we start with the “blurry” version (\(\mathbb{F}_p\)) because it is finite and discrete, making it computationally “easy” to check. If you are looking for a rational solution to \(x^2 - 2 = 0\), the search space in \(\mathbb{Q}\) is infinite and chaotic. But in the “blurry” world of \(\mathbb{F}_7\), there are only \(7\) possible values to check. If no solution exists in the blurry world (like \(\sqrt{2}\) in \(\mathbb{F}_5\)), then a solution cannot exist in the high-resolution world. It saves you from searching forever. If a solution exists in the blurry world, it gives you a “seed” (the \(a_0\) digit). Because \(\mathbb{Q}_p\) is a “complete” space, you can use the derivative of the equation to “refocus” the image, one digit at a time.
In the following diagram the Level \(1\) is represented:
The base cylinder represents the space of all possible \(5\)-adic integers before you apply any filters or constraints. It contains every number that can be written as: \[x = d_0 + d_1(5) + d_2(25) + \dots\] where \(d_i \in \{0, 1, 2, 3, 4\}\). Because it is level \(0,\) no digits have been decided yet. It is the unit ball \(B_1(0).\) In \(p\)-adic geometry, this cylinder is the unit ball. It has a \(p\)-adic radius of \(1\). Every point inside this silver cylinder has a \(p\)-adic norm \(|x|_5 \le 1\). By making it transparent, you are visually showing that the “true” action (the solution to your equation) is happening inside it, as you zoom into smaller and smaller sub-cylinders.
Think of a \(p\)-adic integer \(x \in \mathbb{Z}_p\) as a high-resolution image. The full image is an infinite string of digits:\[x = a_0 + a_1p + a_2p^2 + a_3p^3 + \dots\] When you “blur” the image, you lose the fine details. Initially, you ignore everything that is a multiple of \(p\). All you can see is \(a_0\). This is \(\mathbb{F}_p\). At a second step, you ignore everything that is a multiple of \(p^2\). You can now see \(a_0 + a_1p\). This is \(\mathbb{Z}/p^2\mathbb{Z}\). At level \(\infty\) you see every single digit. This is the full \(p\)-adic integer \(\mathbb{Z}_p\). By taking the quotient \(\mathbb{Z}_p / p\mathbb{Z}_p\), you are mathematically “masking” the fine details.
This coarsest level is \(\mathbb{F}_p\).\(\mathbb{F}_5\) is just the set \(\{0, 1, 2, 3, 4\}\) where we only care about remainders when dividing by \(5\). When we solve \(x^2 \equiv -1 \pmod 5\), we are looking for a seed. If you can’t find a “seed” (a digit \(d_0\)) in \(\mathbb{F}_5\), the project is over. No solution can ever exist in \(\mathbb{Z}_5\). But since \(2^2 = 4 \equiv -1 \pmod 5\), we found a seed: \(d_0 = 2\).
Level \(1\) (\(\mathbb{F}_5\)): We find \(d_0 = 2\). Now our “solution” is \(x = 2 + (\text{something divisible by 5})\).
Level \(2\) (\(\mathbb{Z}/25\mathbb{Z}\)): We look for \(d_1\). We find \(d_1 = 1\). Now our solution is \(x = 2 + 1(5) = 7\). Check: \(7^2 = 49\). In \(\mathbb{Z}/25\mathbb{Z}\), \(49 \equiv -1\). We are getting closer!
Level \(3\) (\(\mathbb{Z}/125\mathbb{Z}\)): We find \(d_2 = 2\). Now \(x = 2 + 1(5) + 2(25) = 57\). Check: \(57^2 = 3249\). In \(\mathbb{Z}/125\mathbb{Z}\), \(3249 \equiv -1\).
We are building the \(p\)-adic number \(x = (2, 1, 2, \dots)\) specifically because that number is the solution to \(x^2 + 1 = 0\). In the \(p\)-adic metric, as we add more cylinders (digits), the “error” (\(x^2 + 1\)) gets smaller and smaller (\(5^{-1}, 5^{-2}, 5^{-3} \dots\)). In summary: We solve in \(\mathbb{F}_5\) to find the “main branch” of the tree. Without that first step, we wouldn’t know which of the 5 colors to start painting.
To increase the “resolution,” we are going to calculate and plot the Hensel Lift for \(x^2 + 1 = 0\) in \(\mathbb{Z}_5\) up to three levels of precision (\(5^0, 5^1, 5^2\)). We are using the Newton-Raphson style formula for \(p\)-adics:\[x_{n+1} = x_n - \frac{f(x_n)}{f'(x_n)}\]
We already have our “seed” from level \(1\): \(x_0 = 2\). We want to find \(x_1\), which is a slightly better version of \(x_0\).2. The formula says: \(x_{n+1} = x_n - \frac{f(x_n)}{f'(x_n)}.\) The derivative of \(x^2+1\) is \(2x\). \(2(2) = \mathbf{4}\). Now we put them together: \[x_1 = 2 - \frac{5}{4}\]
In the real numbers, \(5/4\) is \(1.25\). But in the \(5\)-adics, we need an integer result. We need to find the “multiplicative inverse” of \(4\) modulo \(5\). What number times \(4\) gives a remainder of \(1\) when divided by \(5\)? \(4 \times 4 = 16\), and \(16 \equiv 1 \pmod 5\). So, in our world, \(1/4\) is actually \(4\). Now let’s finish the math: \[x_1 = 2 - (5 \times 4)\]\[x_1 = 2 - 20 = -18\]
Is \(-18\) the same as \(7\)? In your cylinder plot, we are currently at Level 2, which means we only care about remainders modulo \(25\) (\(5^2\)). \(-18 + 25 = \mathbf{7}.\)
Now we use the subtract and divide method to see the digits of \(7\):
\(d_0\) (The Root): \(7 \pmod 5 = \mathbf{2}\).
\(a_1\) (Successive Quotient): \((7 - 2) / 5 = \mathbf{1}\).
\(d_1\) (The next Branch): \(1 \pmod 5 = \mathbf{1}\).
This is why \(x_1 = 7\). It contains our original digit (\(2\)) plus a new layer of precision (\(1 \cdot 5\)).
If you run the “lifting” algorithm (Hensel’s Lemma), you find these two unique “names” for the square root of \(-1\) in the 5-prime basis:
Root 1 (\(i\)): \(\dots 101203212_5\) (The one we started: \(2, 7, 57, \dots\))
Root 2 (\(-i\)): \(\dots 343241233_5\) (The “conjugate”: \(3, 18, 68, \dots\))
If you add these two infinite strings together using base-5 arithmetic, you get \(\dots 00000_5\) (zero). If you multiply them, you get the expansion for \(+1\). But if you square either of them, the result is
\[\dots 444444444_5\]
This last number is indeed \(-1\) in 5-adics: Adding a \(1\) results in infinite carry to the left, and the number turns into zero.
In standard base \(5,\) we use powers of \(5\) to represent a value:
\[... + d_2 \cdot 5^2 + d_1 \cdot 5^1 + d_0 \cdot 5^0 + d_{-1} \cdot 5^{-1} + d_{-2} \cdot 5^{-2} + ...\]
Because \(i\) is not a real number, there is no sequence of digits \(\{0, 1, 2, 3, 4\}\) that can satisfy this sum to equal \(i\). It simply doesn’t exist on the 1D number line.
In the reals we define the value of a string by the sum \(\sum d_i 5^i\). For \(4444\dots_5\), that sum is \(4(5^0) + 4(5^1) + 4(5^2) + \dots\). This sum diverges to \(+\infty\). It never “wraps around” to \(-1\) because the real line is a straight line, not a circle. In the \(p\)-adics we define the “size” such that \(5^n \to 0\). In this world, the sum \(4(5^0) + 4(5^1) + 4(5^2) + \dots\) converges to \(-1\).
The use of the derivative makes the calculation faster, but here is what we are doing:
We need \(d_0\) such that \(d_0^2 \equiv - 1 \pmod 5.\) Since \(2^2 = 4\equiv -1 \pmod 5,\) we get that \(d_0 = 2,\) and \(x_0 = 2 (5^0)=2.\)
We want \(x_1= d_0 + d_1(5) = 2 + 5d_1.\) Therefore \[(2 + 5d_1)^2 \equiv -1 \pmod {25}\]
Since the FOIL of the parenthesis yield a third element \(5^2d_1^2\) that is naturally divisible by \(25,\) this third element goes away:
\[4 + 20 d_1 \equiv -1 \pmod {25}\]
\[20 d_1 \equiv -5 \pmod{25}\]
Dividing the congruence by \(5,\) including the modulus,
\[4 d_1 \equiv -1 \equiv 4 \pmod 5\]
And \(d_1 = 1\). Therefore, the approximation \(x_1 = 2 \cdot 5^0 + 1 \cdot 5^1 =7.\) Checking: \(7^2 = 49\equiv -1 \pmod{25}.\)
We want \(x_2 = 7 + d_2 (25)\).
\((7+25d_2)^2 \equiv -1 \pmod{125}\). This yields \(d_2 =2.\) Now the apprimation becomes \(x_2=7 + 2(25)=57.\) Checking: \(57^2 = 3249\equiv -1 \pmod{125}.\)
Think about the Taylor expansion of a polynomial \(f(x)\): \[f(x + h) = f(x) + f'(x)h + \frac{f''(x)}{2!}h^2 + \dots\]
This formula is purely algebraic. It doesn’t care about “smoothness”; it only cares about powers of \(h\). In the \(p\)-adics, when we move from Level \(n\) to Level \(n+1\), our “nudge” is \(h = d_n \cdot p^n\). Because \(p^n\) is very small in \(p\)-adic geometry, the higher-order terms like \(h^2\) (\(p^{2n}\)) and \(h^3\) (\(p^{3n}\)) disappear incredibly fast! This makes the linear approximation (\(f'(x)\)) more accurate in \(p\)-adic space than it often is in real space.
If we are “lifting” a solution from \(x_n\) to \(x_{n+1}\), we define our nudge as: \[h = d_n \cdot p^n\] When we look at the powers of \(h\) in the Taylor expansion, we see:\(h^1 = (d_n \cdot p^n)^1\): This term is what we use to solve for \(d_n\). It lives exactly at the level of precision we are trying to fix. \(h^2 = (d_n \cdot p^n)^2 = d_n^2 \cdot p^{2n}\): This term is “too small” to matter for our current level. In \(p\)-adic geometry, \(p^{2n}\) is much further up the tree than \(p^n\).
In algebraic calculus we ignore things because they are exactly zero in our current “mod” bucket. These powers of \(h\) are “invisible” to the current level of precision. When you are at level \(2\) \((p^2),\) your mathematical “universe” only has room for remainders between \(0\) and \(p^2-1\). Anything that is a multiple of \(p^2\) is mathematically zero in that universe. In the step \(2\) calculation avove (\(x_1 = 2 + 5d_1\)):
\[f(2 + 5d_1) = (2 + 5d_1)^2 + 1\]
If we expand this perfectly:
\[f(2 + 5d_1) = \underbrace{2^2 + 1}_{f(x_0)} + \underbrace{2(2)(5d_1)}_{f'(x_0)h} + \underbrace{(5d_1)^2}_{h^2}\]
\[f(2 + 5d_1) = 5 + 20d_1 + \require{cancel}\cancel{\color{red}{25}d_1^2}\] Now, look at the \(h^2\) term: \(25d_1^2\). In the world of \(\mathbb{Z}/25\mathbb{Z}\) (level \(2\)), \(25\) is the same thing as \(0.\) So, \(25d_1^2\) simply vanishes. It is an exact calculation of the next digit. In real numbers (\(\mathbb{R}\)): \(h^2\) is \(0.0001\). It’s not zero, so you are “approximating” by ignoring it. In \(p\)-adics (\(\mathbb{Z}_p\)): At Level \(n\), \(h^2\) is a multiple of \(p^{2n}\). Since we are working modulo \(p^{n+1}\), and \(2n \ge n+1\) (for \(n \ge 1\)), that \(h^2\) is identically zero. The \(p\)-adic Newton-Raphson isn’t “guessing” the next digit; it is solving a linear equation where the non-linear parts have been perfectly moved into the “future” (higher powers of \(p\)).
NOTE: These are tentative notes on different topics for personal use - expect mistakes and misunderstandings.