Awesome exploration, you managed to hit a deep and interesting subject!
BTW, it’s perfectly legitimate to do 10-adic integers, or for any n (see here). The reason primes are preferred is because of this issue you discovered:
But there is still problem with fractions like 1⁄2 or 1⁄5. There is no integer, not even infinite one, such that if we multiplied it by 2 or by 5, the last digit of the result would be 1.
That doesn’t happen if you use a prime number instead, so you get all "fractions" as "integers".
[ETA: This is wrong, see comment below.]
If you want things like √2, you’ll need to do a limiting process (called the completion) just like you would to complete Q to get R. The completion of p-adic integers is called Qp, and you need to use a p-absolute value called the p-adic valuation to do the Cauchy completion.
The thing I find most interesting is the fact that if you start with plain old Q, you can use any of these absolute values to complete it, and get Qp. The only other way you can complete Q like this is by using the standard absolute value to get R. This is Ostrowski’s theorem. So there’s a completion for every prime number, plus an extra one for R. Number theorists will sometimes talk as if this extra completion came from a mysterious new prime number, called the “prime at infinity”. This actually does work a lot like a prime number in lots of contexts, for example in the Galois theory of finite field extensions.
It’s maybe worth saying that while you can get √2 in, say, Q7, (1) this isn’t really “the same” √2 as you have in the reals—I mean, it is a square root of 2, just as the corresponding thing in the reals is, but the structure it fits into isn’t the same as that of the reals—and (2) just as some square roots (those of negative numbers) don’t exist in R, so some square roots (but a different set) don’t exist in any given Qp. For instance, there is no square root of 2 in Q2 or Q3 or in Q5, which is why I said Q7 before.
(In Qp, just as in R, in some sense “about half” of integers have square roots.)
[EDITED to add:] Actually I see that Viliam already noticed that not everything has a square root in the p-adics.
A couple more remarks. The things Viliam constructed are (aside from the base-10 versus base-p thing) the p-adic integers, generally written Zp; the full p-adic field Qp is what you get if you allow finitely many nonzero digits after the “decimal” point, just as when writing ordinary numbers we allow finitely many nonzero digits before the decimal point.
To get all the square roots (and much more), you can construct an “algebraic closure” of Qp just as you can for R. But the story here isn’t quite as nice as it is when you go from R to C.
You get R from Q by doing a “topological completion”, and then C from R by doing an “algebraic closure”, but then C is still topologically complete. Similarly, you get Qp from Q by doing a topological completion (using a different topology), and then you can construct an algebraic closure of that … but then the result isn’t topologically complete any more.
There is a simple explicit construction to get from R to C: you throw in a square root of −1 and then every other polynomial equation becomes solvable. (Which is the definition of being “algebraically closed”.) That isn’t the case for Qp, whose algebraic closure is not a nice “finite extension” like that. If you extend Q2 or Q5 just enough to get a square root of 2, that doesn’t automatically get you all the other square roots, or solutions to all the other polynomial equations that don’t have ’em.
An other funny thing you can do with square roots: let’s take Q7, and let us look at the power series √1+X=1+12X−18X⋯. This converges for |X|<1, so that you can specialize in X=79. Now, you can also do that inside R, and the series converges to 34, ``the″ square root of 916. But in Q7 this actually converges to −34.
A further remark: confusingly, the algebraic closure of Qp and its completion Cp are actually isomorphic as fields (and both are also isomorphic to C), since they are both algebraically closed fields of characteristic zero and of cardinality of the continuum.
it’s perfectly legitimate to do 10-adic integers, or for any n (see here).
Ah, the wonders of modern science! Whatever insane idea you get, pretty sure someone already published it decades ago. (Related: Contra Hoel On Aristocratic Tutoring at ACX)
That doesn’t happen if you use a prime number instead, so you get all “fractions” as “integers”.
What would be 1⁄2 in base 2, or 1⁄5 in base 5? I think that p-adic numbers also make an exception for fractions that contain the base in the denominator.
Number theorists will sometimes talk as if this extra completion came from a mysterious new prime number, called the “prime at infinity”.
Not sure if this is related, but writing −1 as …999 already feels kinda like “modulo infinity”. And of course ω is a prime number; it’s not like you can divide it by 2 or something. :D
(Don’t mind me, I don’t really understand most of this. What’s in this article is exactly as far as I got.)
What would be 1⁄2 in base 2, or 1⁄5 in base 5? I think that p-adic numbers also make an exception for fractions that contain the base in the denominator.
Ah yeah, what I said was wrong. I was thinking of the completion Qn which is a field (i.e. allows for division by all non-zero members, among other things) iff n is prime. The problem with 10-adics can be seen by checking that …2222 * …5555 = …0000 = 0, so doing the completion has no hope of making it a field.
There’s no 1⁄2 in the 2-adic integers, but there’s a 1⁄2 in the 2-adic numbers where you’re allowed finitely many places after the decimal (binary) point. So although e.g. 1⁄3 = …0101010101 with nothing right of the binary point, 1⁄2 = 0.1 with a single place to the right. So 5⁄6 = …0101010101.1.
Awesome exploration, you managed to hit a deep and interesting subject!
BTW, it’s perfectly legitimate to do 10-adic integers, or for any n (see here). The reason primes are preferred is because of this issue you discovered:
That doesn’t happen if you use a prime number instead, so you get all"fractions" as"integers".[ETA: This is wrong, see comment below.]If you want things like √2, you’ll need to do a limiting process (called the completion) just like you would to complete Q to get R. The completion of p-adic integers is called Qp, and you need to use a p-absolute value called the p-adic valuation to do the Cauchy completion.
The thing I find most interesting is the fact that if you start with plain old Q, you can use any of these absolute values to complete it, and get Qp. The only other way you can complete Q like this is by using the standard absolute value to get R. This is Ostrowski’s theorem. So there’s a completion for every prime number, plus an extra one for R. Number theorists will sometimes talk as if this extra completion came from a mysterious new prime number, called the “prime at infinity”. This actually does work a lot like a prime number in lots of contexts, for example in the Galois theory of finite field extensions.
It’s maybe worth saying that while you can get √2 in, say, Q7, (1) this isn’t really “the same” √2 as you have in the reals—I mean, it is a square root of 2, just as the corresponding thing in the reals is, but the structure it fits into isn’t the same as that of the reals—and (2) just as some square roots (those of negative numbers) don’t exist in R, so some square roots (but a different set) don’t exist in any given Qp. For instance, there is no square root of 2 in Q2 or Q3 or in Q5, which is why I said Q7 before.
(In Qp, just as in R, in some sense “about half” of integers have square roots.)
[EDITED to add:] Actually I see that Viliam already noticed that not everything has a square root in the p-adics.
A couple more remarks. The things Viliam constructed are (aside from the base-10 versus base-p thing) the p-adic integers, generally written Zp; the full p-adic field Qp is what you get if you allow finitely many nonzero digits after the “decimal” point, just as when writing ordinary numbers we allow finitely many nonzero digits before the decimal point.
To get all the square roots (and much more), you can construct an “algebraic closure” of Qp just as you can for R. But the story here isn’t quite as nice as it is when you go from R to C.
You get R from Q by doing a “topological completion”, and then C from R by doing an “algebraic closure”, but then C is still topologically complete. Similarly, you get Qp from Q by doing a topological completion (using a different topology), and then you can construct an algebraic closure of that … but then the result isn’t topologically complete any more.
There is a simple explicit construction to get from R to C: you throw in a square root of −1 and then every other polynomial equation becomes solvable. (Which is the definition of being “algebraically closed”.) That isn’t the case for Qp, whose algebraic closure is not a nice “finite extension” like that. If you extend Q2 or Q5 just enough to get a square root of 2, that doesn’t automatically get you all the other square roots, or solutions to all the other polynomial equations that don’t have ’em.
An other funny thing you can do with square roots: let’s take Q7, and let us look at the power series √1+X=1+12X−18X⋯. This converges for |X|<1, so that you can specialize in X=79. Now, you can also do that inside R, and the series converges to 34, ``the″ square root of 916. But in Q7 this actually converges to −34.
A further remark: confusingly, the algebraic closure of Qp and its completion Cp are actually isomorphic as fields (and both are also isomorphic to C), since they are both algebraically closed fields of characteristic zero and of cardinality of the continuum.
Yup. Very different topologically, though.
Ah, the wonders of modern science! Whatever insane idea you get, pretty sure someone already published it decades ago. (Related: Contra Hoel On Aristocratic Tutoring at ACX)
What would be 1⁄2 in base 2, or 1⁄5 in base 5? I think that p-adic numbers also make an exception for fractions that contain the base in the denominator.
Not sure if this is related, but writing −1 as …999 already feels kinda like “modulo infinity”. And of course ω is a prime number; it’s not like you can divide it by 2 or something. :D
(Don’t mind me, I don’t really understand most of this. What’s in this article is exactly as far as I got.)
Ah yeah, what I said was wrong. I was thinking of the completion Qn which is a field (i.e. allows for division by all non-zero members, among other things) iff n is prime. The problem with 10-adics can be seen by checking that …2222 * …5555 = …0000 = 0, so doing the completion has no hope of making it a field.
There’s no 1⁄2 in the 2-adic integers, but there’s a 1⁄2 in the 2-adic numbers where you’re allowed finitely many places after the decimal (binary) point. So although e.g. 1⁄3 = …0101010101 with nothing right of the binary point, 1⁄2 = 0.1 with a single place to the right. So 5⁄6 = …0101010101.1.
Oh, please please tell me you’re an algebraic number theorist actually called Adele.
I’m a programmer, but my website uses AQ (the ring of rational adeles) as the favicon :D
Heh. I thought actually being an algebraic number theorist was too much to ask for, but hope springs eternal :-).