I _kinda_ get p-adic numbers a little more after watching this?
August 19, 2023 11:26 PM   Subscribe

Veritasium on the p-adics - "There's a strange number system, featured in the work of a dozen Fields Medalists, that helps solve problems that are intractable with real numbers." (p-adics previously)
posted by kliuless (30 comments total) 19 users marked this as a favorite
 
This is baffling but also incredible. ...999999.0 + 1 = 0 blew me away.
posted by rifflesby at 1:07 AM on August 20, 2023 [1 favorite]


Feels like working with signed and unsigned integers (or their bit equivalents).
posted by They sucked his brains out! at 1:52 AM on August 20, 2023 [1 favorite]


Yes, the closed form of the top number being like a sign bit and being explicit about p's-compliment reminded me of closed-count binary as if it was 2-adic maths.
posted by k3ninho at 4:06 AM on August 20, 2023


Ugh. Infinities are so strange. My brain protests the logic that shows that a large enough number becomes a fraction.
posted by eustatic at 5:01 AM on August 20, 2023 [3 favorites]


I'm going to have words with my brain, an infinite decimal expansion below the decimal point is okay but above the decimal point is not because it's unbounded? Here we have bounds for the infinite expansion above the decimal point, but it's not the conventional boundaries and that messes with long-established mental habits.
posted by k3ninho at 7:05 AM on August 20, 2023 [2 favorites]


2s complement arithmetic in computers definitely shares a lot with 2-adic numbers (and I think if you ignore the overflow bit they're nearly identical) though I don't know enough of the history to know which idea came first or if it's convergent evolution.

Watching the video helped me realize that a lot of my personal discomfort with p-adic numbers is that, when we say 0.9999999999... = 1, in part we're saying that the sequence 0.9, 0.99, 0.999, etc (a) gets closer to 1 every step but also (b) the distance between 0.9999... and 1 gets smaller every step, so the "last digit" is decreasingly significant. That's such a fundamental property for convergence -- and the basis of approximations and doing "real world" math with continuous quantities -- that I suspect a lot of people with good number sense have an appreciation for it regardless of whether they've studied a lot of limits, convergence, etc.

P-adic numbers totally break that system because the part you "ignore" in the sequence is becoming increasingly significant. (This means that while I appreciate using 0.99999... to pave the way for 999999... it ultimately dodges the source of the queasiness with this number system.)

So for me anyway, that means that p-adic numbers go in the same drawer in my brain as formal power series (which also discard any common notion of convergence), as a useful structure/machinery/shorthand/re-coding/etc but something that I should not try to apply normal number-sense to.
posted by range at 7:09 AM on August 20, 2023 [5 favorites]


It feels like p-adic numbers work at the notation level, but not at the numerical meaning level. ...99999 + 1 doesn't equal zero for any finite number of nines, and while the notation works at the infinite level, ...99999 + 1 = 1000..... kinda also works. My point being that the apparent magic of "big number + 1 = 0" feels just like an artifact. I'm using "feels" here because I'm no mathematician and I'm sure my intuition is wrong on many levels. But it doesn't *feel* that way, hehe.
posted by valdesm at 8:45 AM on August 20, 2023 [1 favorite]


"Intuition" is just the result of being brainwashed by Big Number your whole life!
posted by phliar at 10:57 AM on August 20, 2023 [4 favorites]


This was awesome! Thank you for sharing.
posted by Conrad Cornelius o'Donald o'Dell at 11:20 AM on August 20, 2023


n-adics and p-adics have been on my mind a lot over the past few months.

Increasingly, I feel like they're a piece of evidence that we (humans) don't really understand numbers well, and that we play with a very restricted set of tools and technique.

I don't know which came first, our limited exploration or our limited understanding, but this stuff makes me hopeful that we'll find new ways of perceiving and manipulating the universe.

Also: What if the Arecibo message (now Beacon in the Galaxy) and its distillation of mathematics looks to a non-human intelligence the way the n-adics look to most of us (i.e. weird and counterintuitive), rather than simple?
posted by yellowcandy at 12:12 PM on August 20, 2023 [1 favorite]


2s complement arithmetic in computers definitely shares a lot with 2-adic numbers (and I think if you ignore the overflow bit they're nearly identical) though I don't know enough of the history to know which idea came first or if it's convergent evolution.

It definitely helps me to conceptualize the arithmetic.

Would be curious to hear from a mathematician what 5-adic numbers offered that 3-adics did not, for the purposes of WIles solving Fermat's Last Theorem.

This video is very well-made, thanks to kliuless for posting this find!
posted by They sucked his brains out! at 12:30 PM on August 20, 2023


> P-adic numbers totally break that system because the part you "ignore" in the sequence is becoming increasingly significant.

The p-adic number system has an answer for this, which is to simply redefine significance so that the rightmost digits are the most significant! (Technical details here; the minus sign in the first formula is the tell.)

Formal power series aren't usually taught with an inbuilt metric, but the same idea arises there naturally. For example, when you calculate a Taylor series in a calculus class, you'll generally start from the constant term and then work out terms in ascending order of degree, eventually brushing the remaining terms under an ellipsis (or a slightly more explicit "big O" term). The lower-degree terms are more significant in the sense that they capture the crudest data about the function being approximated (its value, its first derivative, its second derivative...) at the base point of the expansion. They are also more significant in the sense that, within the radius of convergence, the "tail" of higher-degree terms must diminish to zero as more and more low-degree terms are computed.

Treating the rightmost digits of numbers as the most significant requires a bit more of a conceptual remapping of significance away from "numerical size", which frees us up to use the idea for other purposes. There are some things in entry-level number theory that already point in that direction. For example, long addition and multiplication famously go from right to left. Another example: Russian peasant multiplication is based on an algorithm that determines the binary expansion of an integer from right to left, which is arguably simpler than doing it from left to right. (Is your number odd? It ends in 1. Is it even? It ends in 0. Then divide by two to determine the remaining part to the left.)

I left a comment in a previous p-adics thread with examples of problems for which the rightmost digits are the most "available" or "stable" -- basically the concepts that significance is remapped to in this context.

[My apologies if some of this is already, and better, explained in the video, which I do not currently have time to watch]
posted by aws17576 at 4:18 PM on August 20, 2023 [3 favorites]


P. S. Fun fact: In Arabic numerals (I'm specifically using Eastern Arabic numerals here, there are lots of varieties), ٢ is 2 and ٩ is 9. Arabic reads from right to left. So ٢٩ is 92, correct? No, ٢٩ is 29. The "least significant" digit is written first from the point of view of the Arabic reader, which, if you think about it, is handy if you're about to do some arithmetic and you don't want to smudge the paper.

This is the numeral system we adopted into the left-to-right languages of the West, without bothering to reverse it. To my mind, this speaks to the ambiguity and flexibility of the whole concept of "significant" digits.
posted by aws17576 at 4:28 PM on August 20, 2023 [2 favorites]


> Increasingly, I feel like they're a piece of evidence that we (humans) don't really understand numbers well, and that we play with a very restricted set of tools and technique.
This is the kind of thing that makes me suspect that mathematics is not, as the Platonists would have it, a real thing that exists in a real way outside of human understanding. The alternate interpretation is that mathematics is a biological phenomenon, taking place in the lumps of meat inside of our skulls, and that it's a miracle this biological phenomenon is self-consistent enough that we've been able to construct rules about it.
> What if the Arecibo message [...] looks to a non-human intelligence [...] weird and counterintuitive?
Now I want to design an experiment to see whether octopuses think in p-adic numbers.
> when we say 0.9999999999... = 1, in part we're saying that the sequence 0.9, 0.99, 0.999, etc (a) gets closer to 1 every step but also (b) the distance between 0.9999... and 1 gets smaller every step
This is a difference between representing the fraction as 0.99999... versus 0.9, where you indicate briefly that the underlined part is repeated. If you remember long division, you can show that any repeating decimal has the fractional representation repeating part/999..999, where the length of the string of nines in the denominator is the length of the repeating sequence. So for instance, 1/11 = 0.09 = 9/99, and you can also show that 142857/999999 = 1/7 = 0.142857.

With this knowledge, obviously 0.9 = 9/9 = 1.
posted by fantabulous timewaster at 4:39 PM on August 20, 2023


The p-adic number system has an answer for this, which is to simply redefine significance so that the rightmost digits are the most significant!

This is the part I think I'm most curious about in the development of p-adic numbers, though my guess is that it's just this way because it causes p-adic numbers to satisfy some important requirements/be more useful/etc.

But from the outside, the metric/modulus/distance function for p-adic numbers looks an awful lot like they make more sense written mirrored about the decimal point as "normal" decimal-point numbers (eg as in binary arithmetic where the digits might be (8s) (4s) (2s) (1s) . (1/2s) (1/4s) etc. And I'm seeing some papers that write them mirrored in this way (without decimal point) because that's the "normal" direction to write down a power series, in ascending powers.

But really it seems like the whole game is in discarding the radius of convergence, or I guess in devising a metric that redefines convergence? I think the sticking point is that it sort of looks like p-adic numbers are a very useful piece of machinery that require a bananas distance metric to be attached so that pure mathematicians can sleep at night.
posted by range at 5:42 PM on August 20, 2023


I think the sticking point is that it sort of looks like p-adic numbers are a very useful piece of machinery that require a bananas distance metric to be attached so that pure mathematicians can sleep at night.

When you really understand the p-adics, you realize that it's the distance metric you learned in grade school that's the really bananas one. You add two small things and you get something big! That's nuts! In a p-adic metric, the sum of two small things is small, as it should be.
posted by escabeche at 7:11 PM on August 20, 2023 [1 favorite]


p-adic numbers totally break that system because the part you "ignore" in the sequence is becoming increasingly significant.
I think I might not understand your meaning here, but if I do -- that is, if (1) "the part you ignore" means the stuff farther left, and (2) "becoming increasingly significant" means "the further left, the bigger the magnitude of what I'll call the number-in-the-kindergarten-sense (NITKS) it corresponds to", then I don't think that's correct.

Before I get into it,

(1) Please note that I'm going to try to be pretty explicit about when I'm referring to a NITKS number and when I'm referring to a 2-adic number, because I think the video sometimes breezes through some things that can lead the viewer to conflate them in certain ways that may seem natural, but are in fact wrong, and can lead to incorrect conclusions.

(2) It's been several thousand years since I learned this stuff, and I've never really used it since, so I may be badly mistaken, even totally mistaken (though I feel pretty sure I'm not, and if I am, I'd appreciate my misunderstandings being pointed out to me).

Now:

Consider the 2-adic representation of the NITKS 1. For any p, the p-adic representation of any number in the NITKS integers looks exactly the same as the NITKS integer's base-p representation (the video uses this fact whenever it "adds one" to a p-adic number, but I don't think it is very explicit about it). So the 2-adic representation of NITKS 1 is just "1" (in fact, for NITKS 1 in particular, this is true for any p). Or, if you like, "...0000000001", infinite zeroes going off to the left, with a single "1" all the way on the right.

Now consider the 2-adic representation of NITKS -1. Like the video shows, this is "...1111111111". So, as we go further and further to the left, the numbers that I think you're saying are "becoming increasingly significant" are all "0" for NITKS 1, and all "1" for NITKS -1. But if they really are more significant, that would imply NITKS -1 is bigger than NITKS 1, which is obviously false.

At this point, one may think something like "Oh, I must have misunderstood; the numbers become less significant as you go to the left." But that's not true either! For example, consider the 2-adic representation of NITKS 1/3. If I did the math right, that's a bunch of "10"s followed by a single "11" ("...10101010101011"). So NITKS 1 and NITKS 1/3 agree in what we're now saying is the most significant place, but since all the (supposedly) less significant places of NITKS 1 are zeroes, that would mean that NITKS 1/3 is more than NITKS 1. Which, again, is obviously false.

So, unlike in the case of NITKS representations of NITKS numbers, there is no easy, direct, universal way to determine which of two different p-adic numbers represents a bigger NITKS number if you only look at the lexical sequence of characters. Instead, you have to do mathematical calculations to determine which is bigger in the NITKS sense.

Finally, there actually is a way to compare two p-adic numbers lexically that leads to a mathematically consistent ordering. It's just not the same mathematically consistent ordering as results from lexically comparing NITKS numbers lexically. I'm not going to get into exactly what "mathematically consistent" means here, but:

This is the thing in the video where they show some cylinders stacking up on each other, with higher cylinders being shorter. The lowest (tallest) cylinders represent the value of the rightmost digit, and as they get higher (shorter), they represent digits further and further to the left. The reason it represents the lower (further right) ones as taller is because in the "mathematically consistent" lexical ordering I just mentioned, the further right, the higher the significance. The further left you have to go to find a difference between two numbers, the closer those numbers are (in this particular sense of "close", which is not the same sense of "close" in the NITKS sense (which, in turn, is what I've been babbling about throughout this post)).
posted by Flunkie at 8:47 PM on August 20, 2023


Perhaps NITKS 2 would be a clearer example than NITKS 1/3:
  • NITKS -1 < NITKS 1 < NITKS 2
  • NITKS -1 = p-adic ...1111111
  • NITKS 1 = p-adic ...0000001
  • NITKS 2 = p-adic ...0000010
So considering "<" to mean "< in the NITKS sense", even though I'll be sticking it between p-adic numbers:
  • p-adic ...1111111 < p-adic ...0000001 < p-adic ...0000010
Which does not correspond to any lexical ordering of those p-adic numbers.
posted by Flunkie at 9:03 PM on August 20, 2023 [1 favorite]


... aaaaaaaaaaaaaaand, everywhere I said "p-adic" in that "clarifying" comment, I meant "2-adic".

I'll shut up now :)
posted by Flunkie at 9:18 PM on August 20, 2023 [1 favorite]


At three minutes we are told that taking a large number and multiplying it by seven yields an answer of one. My ten year old brain thinks there must be a mistake there and indeed it seems that there is.

In the process of multiplication there are two elements to the working, the 'modulus' (don't know, it will have to do, the bit that you write down as you go) and the carry. These two are brought together at the end to produce the result. Until you've reached the end you don't have a meaningful result, just some incomplete workings.

The demo at three minutes just ignores the ever accumulating carry, which contains by far the most significant part of the result .... because infinity. What's left is an artefact of no real interest or significance. It's certainly not the result.

Can anyone help me get beyond this?
posted by grahamwell at 2:17 AM on August 21, 2023


grahamwell, I think that's one of the mistaken conclusions that the breeziness of the video tends to lead to.

I've been typing this reply for a long time now, and I fear it's in desperate need of a tl/dr. I'm having a hard time thinking of one, though, because this reply itself is intentionally an anti-tl/dr of sorts, being an attempt at not replicating the video's tl/dr-ness (which is what leads to the conclusion). I guess my best attempt at a tl/dr is something like:

TL/DR: The video is showing you two different things, and showing you some ways in which they're very similar. But it's not really clearly, explicitly pointing out ways in which they're dissimilar. Since you're extremely familiar with one of the things and not at all familiar with the other, you're naturally (but wrongly) led to assume that certain other things about them are also similar.

So, when you say...
The demo at three minutes just ignores the ever accumulating carry (...)
... it's because the video has led you to naturally but mistakenly conflate various different pairs of things with each other.

When it says something like "...99999 + 1 = 0", it's leading you to mistakenly conflate:
  • Its implicit ten-adic representation of a number (e.g. "1", "0") with the base ten representations of numbers you've been familiar with for pretty much your whole life;
  • Its representation of a certain type of calculation that acts on two ten-adic numbers and results in a ten-adic number ("+") with the type of calculation on (and resulting in) base ten numbers called "addition" that you've been familiar with all your life.
Which leads you to conclude (wrongly, but quite reasonably) things like:
(...) which contains by far the most significant part of the result .... because infinity. What's left is an artefact of no real interest or significance. It's certainly not the result.
The video is not wrong in what it says; it's just phrasing things in ways that are leading you to be wrong. Again, this is because of its breeziness. So to try to understand what the video is really sayings, let's be more explicit than the video is being:

First, the "1" and the "0" there are not really base ten representations of numbers. They are (implicit) ten-adic representations of numbers. So, to be explicit, from here on out, let's never be implicit when we're using a ten-adic representation; instead of something like...
...999999 + 1 = 0
... we will instead always say:
...999999 + ...000001 = ...000000
And to be super-explicit here, whenever I am referring to a number rather than to a representation of a number, I will spell it out in English capital letters. So for example:
The number EIGHTEEN has the base TEN representation "18", the TEN-adic representation "...000018", the base TWO representation "10010", and the TWO-adic representation "...000000010010".
Second, the "+" in there is not really the "addition" function that you're used to. So from now on, whenever we "add" two p-adic numbers, instead of writing...
...999999 + ...000001 = .000000
... let's write:
...999999 @ ...000001 = ...000000
These really, truly are different things, and it's important to understand that up front, even if we don't yet understand how they're different.

However, even though they are different, there are various things about them that are very, very similar. For example:

For any positive integer, the base TEN representation and the TEN-adic representation will look essentially the same: The base TEN "15" means the same number as the TEN-adic "...000015" does: FIFTEEN. The base TEN "25" means the same number as the TEN-adic "...000025" does: TWENTY-FIVE. So you might naturally think this similarity implies related similarities. For example:

In base TEN, if you line up TWO numbers and compare them digit by digit starting on the left until you come to a digit that's different between the TWO of them, you can then immediately, confidently and correctly say which one's bigger:


38293921
38295247
    ^
    5 is bigger than 3, so 38295247 is bigger than 38293921


And at first glance it seems like you might be able to do the same thing in TEN-adic:


...00038293921
...00038295247
          ^
          5 is bigger than 3, so ...00038295247 is bigger than ...00038293921


And in some cases, you reach the right conclusion: ...00038295247 really is bigger than ...00038293921. But you didn't reach that conclusion correctly. You're not really doing the same thing as you did in the base TEN case, where you "started on the left". In TEN-adic, there's nowhere on the left that you can start. Instead, you relied on the fact that you know, in this particular case, that no matter how far you go left past a certain point, every digit is the same.

But you can't apply that as a general rule for all TEN-adic numbers. For example, what about instead of both "starting" in infinitely many "0", ONE of them "starts" in infinitely many "80" and the other starts in infinitely many "64"? Then we do not know that past a certain point to the left, every digit is the same - in fact we know that's false. So we can't just say "all the same". But we also can't do what we really did in the base TEN case -- "start on the left and go digit by digit" -- because there's nowhere for us to start.

The TEN-adic representations behave differently than the base TEN representations do; they obey different rules. Even though some of the rules they behave have some similarities -- ...00038295247 really is bigger than ...00038293921 -- we can't generalize a conclusion from that. So, back to where you say...
the ever accumulating which contains by far the most significant part of the result .... because infinity.
... that's a mistake. In a TEN-adic representation, the "place" of a digit does not behave under the same rules as it would in a base TEN representation; for example, like I said just above, "further left" does not always mean "more significant" (even though it does in the limited case where you're only talking about integers), and an infinite number of non-zero digits on the left does not mean it's going to infinity.

Then based on that mistake, you conclude that:
What's left is an artefact of no real interest or significance. It's certainly not the result.
Those are also mistakes. Similarly to my long-winded explanation above of the fact that you're conflating TEN-adic representations with base TEN representations, here you're conflating the "@" operation with the "+" operation. I'll save you the long-windedness this time, but it boils down to the same idea: It's true that 15 + 10 = TWENTY-FIVE, and it's true that ...000015 @ ...000010 = TWENTY-FIVE, but you can't conclude from that that the @ operation and the + operation both follow exactly the same rules. They're different operations, and they behave differently - even though they behave similarly in some certain cases.

And they're definitely not of "no real interest or significance". Nothing could be further from the truth, really. Like the video says, the p-adic system has been used in recent years to solve a whole bunch of major long-unsolved mathematical problems (such as Fermat's Last Theorem, which resisted all attempts at proof for over 350 years, despite a whooooooooooooooooooooole lot of mathematicians trying).

I hope this helps. I'm afraid I've been far too long-winded, but again that's because I'm consciously and explicitly trying to avoid what I think is leading to confusion based on the video - breezy conflation of easily confusable things that are not the same as each other.
posted by Flunkie at 11:51 AM on August 21, 2023 [5 favorites]


> The demo at three minutes just ignores the ever accumulating carry, which contains by far the most significant part of the result .... because infinity. What's left is an artefact of no real interest or significance. It's certainly not the result.

Can anyone help me get beyond this?


As I wrote above, part of the p-adic "viewpoint" is that the digits get less significant as you move to the left, which means the carried part of the computation also gets less significant.

In the real number system, there's a unique solution to the equation 7x = 1. This solution can be written as 1/7, or as the base 10 decimal 0.142857..., for which we'd accept the truncation 0.14 as a two-significant-digit approximation.

In the 10-adic system, there is also a unique solution to the equation 7x = 1. This solution can be written as 1/7, though I'd caution against thinking of it as "the same number" as the real 1/7, as it belongs to a fundamentally different number system. Anyway, the "decimal" form of this 10-adic number is ...857143, the two-significant-digit approximation of which is 43 -- since the rightmost digits are the most significant. Note that 7 × 43 = 301, which agrees with the desired value of 1 up to two significant digits. :-)

(This is probably not doing anything to answer the implicit "why?" in your question, but at least I can hope to demonstrate the internal consistency of thinking this way, and hopefully the video has some things to say about what it's good for!)
posted by aws17576 at 1:24 PM on August 21, 2023


though I'd caution against thinking of it as "the same number" as the real 1/7, as it belongs to a fundamentally different number system
Yeah, for all my "that's too breezy", I breezed over this, but I did so intentionally, as I think it confuses the point:

As long as you don't consider the ordering and operations on them, and consider them only as strings that represent numbers (albeit in different ways), there's a natural way to consider p-adic strings as being in a one-to-one relationship wit a subset of the reals (in fact, a subset of the rationals, I think? please correct me if I'm wrong there). So as long as we don't say anything like "+", there's nothing really wrong with saying that the string "...1111111" corresponds to the real number NEGATIVE ONE.

It's when we add in operations (like "+") and ordering (like "32 < 95") that things start getting hairy; we no longer really can consider p-adic strings to be one-to-one with a subset of the reals under such operations. So that's the crux of what I was trying to point out as the underlying confusing issue: "+" and what I referred to as "@" are not the same operation.

But as long as we consider the underlying sets to be strings, we can still give them the same "natural" correspondences with numbers, and in fact we can define operations on subsets of strings resulting in such strings that naturally, consistently correspond to operations on numbers resulting in numbers (e.g. "...11111 @ ...000001 = .000000" or "-1 + 1 = 0", with "...11111" consistently corresponding to "-1" etc. despite the fact that the "@" operator there is not the same as the "+" operator there - in fact they're not even applicable to the same subsets of string).

But this is all pretty deep in the weeds, and I thought it wouldn't really help get to the heart of the confusion despite needing a bunch more words in an already super-wordy post.
posted by Flunkie at 1:57 PM on August 21, 2023


> Can anyone help me get beyond this?

p-adic numbers are actually a wildly different thing than normal numbers, even though they look a lot like the same thing.

They are internally self-consistent, and useful for various things - though different things than the regular decimal numbers that you learned about in school.

But they follow their own rules, which are different than the usual rules for adding, subtracting, multiplying, dividing, etc, numbers. They are the same in a few certain ways but different in most ways.

So when you say, "This doesn't make sense at all!" you are completely right. This makes no sense at all in our normal number system!

You kind of have to forget about the old/normal number system entirely, and learn the new rules of this new number system.

Now why would you want to do that?

Well the short answer is, YOU probably wouldn't want to do it - if all you are thinking about is the practical matters of daily life. It's not going to help you prepare your taxes or balance your checkbook.

The reason you might be interested in investigating this different number system, is if you are curious about new/unusual/different/interesting things that are out of the ordinary. If you want to do that, just be prepared to jettison all your normal thoughts and intuitions about what numbers are and how they should act.

Because these are just completely different and new things.

Now as to why mathematicians and such are interested in them: They're a different type of number system with its own type of addition, multiplication, distance function, etc etc etc etc that has its own special properties that are both interesting and useful in certain (fairly arcane/technical) situations.
posted by flug at 12:23 AM on August 22, 2023


I finally watched the video. The bit about finding a rational solution to x2 + x4 + x8 = y2 using the 3-adics was new to me, and interesting. (It seemed to be implied that this was a classical problem which led to the development of Hensel's lemma and thus the p-adics; I'd love to read more about that, but I'm not finding relevant stuff with Google.)

As homework, I tried to reproduce the method to find a solution of the form ...2 over the 23-adics (why I chose the 23-adics is left as an exercise to the reader). However, the digits of this solution didn't appear to repeat, so I guess this is a strictly 23-adic solution which doesn't reveal any rational (real) solutions. That makes me wonder why we got "lucky" with the rational 3-adic solution ...11111 = –1/2. The video doesn't explain that!


> As long as you don't consider the ordering and operations on them, and consider them only as strings that represent numbers (albeit in different ways), there's a natural way to consider p-adic strings as being in a one-to-one relationship wit a subset of the reals (in fact, a subset of the rationals, I think? please correct me if I'm wrong there).

Really it's a subset of the p-adics (those which eventually repeat) that corresponds to a subset of the rationals (those whose denominators aren't divisible by p), I think. But I'm not sure I get the gist of your comments; addition within this subset should transfer nicely from one domain to the other, while order is meaningless in the p-adics, as far as I'm aware.
posted by aws17576 at 12:27 AM on August 22, 2023


> simply redefine significance so that the rightmost digits are the most significant!

If you know about "clock addition" or addition & multiplication modulo some number - which is a different and simpler example of the same type of thing that p-adic numbers are - an interesting fact about them is that one way to think about them is exactly this: You throw away all the "large" parts of the number and only worry about the small parts.

For example, with clock addition, you throw away - or "fold over" - all the parts of your number above 12, and only think about the remainder modulo 12.

Just for example: What time will it be 3 million hours from now?

Well, it will a different month, a different year, a different decade, and in fact a different century. But guess what - I don't care about that. I'm throwing all that stuff away - even though they are very big time periods indeed.

For the purpose of my question, I only care about what time will it be three million hours from now?

Well it turns out, three million hours is an exact multiple of 12 (and 24, too!) so in three million hours it will be the same exact time of day it is right now.

That's not an answer we would expect based on elementary school arithmetic, is it?

Common sense says: Take a number, add 3 million to it, and the result will be much, much larger than the number we started with.

But if you're adding with clock arithmetic, you take a number, add 3 million to it, and get the same number you started with!

Adding by clock arithmetic is not the "one and only true way to think about numbers" but it sure is useful if you are worried about what time of day it is.

Similarly with p-adic numbers, but even more so: p-adic numbers are much stranger than our "normal" everyday numbers - even stranger yet than clock arithmetic, which is quite strange in its own way - but p-adic numbers are still internally self-consistent in their own way, and turn out to be quite useful for certain purposes.
posted by flug at 12:38 AM on August 22, 2023 [1 favorite]


Really it's a subset of the p-adics (those which eventually repeat) that corresponds to a subset of the rationals (those whose denominators aren't divisible by p), I think.
Oooh, I didn't know this. Very interesting. Thanks! If I understand correctly, then for example ...0000001000001000010001001011 (i.e. tacking on an additional "0" every time going left) does not correspond to any rational, but still has meaning in the p-adics as a whole?

Does it (I mean things like that in general, not just that example) correspond to some real number (in the same sense that any p-adic of the "eventually repeat" subset does)?

Can anything further along those lines be said about them, like maybe "they correspond to the algebraics"? Or maybe the p-adics (as a whole, not just this subset) correspond to all real numbers minus the rationals whose denominators aren't divisible by p? Or something else entirely?
But I'm not sure I get the gist of your comments; addition within this subset should transfer nicely from one domain to the other, while order is meaningless in the p-adics, as far as I'm aware.
I'm sorry, I don't think I was clear. To back up a little, I was replying to when you wrote...
though I'd caution against thinking of it as "the same number" as the real 1/7, as it belongs to a fundamentally different number system
... and in the context of that, I was trying to draw a distinction between something like "the p-adics (as a field) are an entirely different number system that obeys different rules" and:

Yes, but first let's drop the "field" part, and just look at them as a set of strings (potentially of infinite length). Same with base-p numbers - just a set of strings. Not even any operations on the set (yet). Call the one set of strings setSpa and the other setSbp, and define their strings so that the two sets are disjoint (e.g. none of this "1" representing a p-adic; it's an infinite number of "0"s followed immediately to its right by a single "1", which in turn nothing is to the right of).

We can then define a function fSbpToR: setSbp |-> Reals so that fSbpToR("0") = [ZERO], fSbpToR("1") = [ONE], fSbpToR("0.1") = [ONE]/p, etc.

Do something similar (the specifics of which are beyond me) to define fSpaToR: setSpa |-> Reals... although given what you just said about "really it's a subset of the p-adics", I guess I'm no longer so sure this can actually be done? But I'm just trying to illustrate my thought process for my earlier post, though, where I was assuming it could, so please let's just go with it for now.

Now define the set setSp to be setSpa U setSbp. We can then define a new function fSpToR: setSp |-> Reals such that (A) fSpToR(x in setSpa) = fSpaToR(x), and (B) fSpToR(x in setSbp) = fSbpToR(x). Since setSpa and setSbp are disjoint, we don't have to worry about any potential conflicts resulting from this definition.

So now we have a situation where it is reasonable to say, for example, that the setS2 string "...1111111" "represents" the real number [NEGATIVE ONE], and the setS2 string "-1" also represents the real number [NEGATIVE ONE]. Obviously we're not going to form something like a field by going this route, or even a group, but that's OK! I'm not intending to do that. All I'm intending here is to get a mathematically valid system in which it is in some sense reasonable to say that these strings represent numbers.

So once that's done, we can use operations that are defined on real numbers into real numbers to define similar operations on setSp into real numbers. For example, we can define a "+" function so that on setS2:
"...11111" + "...000010" = [ONE]
In fact we can even mix and match, like:
"-1" + "...000010" = [ONE]
Similarly, we can do crazy things like define a function "<" on setS2 to be the obvious analog of "<" on the reals, as in:
[NEGATIVE TWO] < [NEGATIVE ONE] < [ZERO] < [ONE] < [TWO]
"-2" < "-1" < "0" < "1" < "2"
"...111110" < "...111111" < "...000000" < "...000001" < "...000010"
I imagine you might here say "But that's not how the 2-adics are ordered! That's done by rightmost significance!"

And again, I say: That's OK! I'm not intending to say that that's how p-adics are ordered! I'm saying that a certain set of strings that look a whole lot like either a p-adic number or a base p number can be ordered in an obvious way that is analogous to how real numbers are ordered! The p-adics per se have got nothing to do with this.

And if we define setSpR = setSp U Reals, we can define a new "<" operator on that which allows us to mix and match all of them! For example:
[NEGATIVE TWO] < "...111111" < [ZERO] < "1" < "...00010"
Now it's of course important to realize that I've been using the same symbol, "<", to represent several entirely different mathematical functions. And that's exactly the kind of thing that I was trying to explain originally!

Confusions about the p-adic numbers arising from this video are based, in large part, on the fact that it's not clearly saying that it's re-using various symbols to mean different things. Subtly different, but different nonetheless. And that unintentionally leads someone who is completely unfamiliar with the n-adics, but extremely familiar with real numbers and their base 10 representations, to get confused based on untrue implicit assumptions, like "putting more and more nonzero digits to the right means approaching infinity".

So, when attempting to clarify such confusion to someone suffering under it, I could have said to them all of the crap that I just said to you earlier in this comment, and in all likelihood thereby confused them even more.

Alternatively, I could have just been a little loose and fast, in a way that might lead to a mathematician bringing abstract algebra into it, pointing out that p-adics and real numbers are entirely different fields and some particular p-adic therefore cannot really be said to be "the same as" any particular real number. That would be the cost of not further confusing a layman in an attempt to describe the source of their (original) confusion to them. Since I was in fact attempting to describe the source of a layman's original confusion to them, this is the alternative I chose.

Does this make any sense?
posted by Flunkie at 12:49 PM on August 22, 2023


get confused based on untrue implicit assumptions, like "putting more and more nonzero digits to the right means approaching infinity"
On preview-but-miss-a-mistake-and-the-comment-is-too-long-to-find-that-mistake-after-posting-until-after-the-edit-window-is-closed, I meant "to the left".
posted by Flunkie at 12:58 PM on August 22, 2023


I do really appreciate the time you've spent to engage with my silly question. I can't say that I understand your answer but I am going to sit down and have a damn good try.
posted by grahamwell at 12:38 AM on August 25, 2023


I think the Veritasium video does a disservice by spending so little time discussing the metric on the p-adics (the notion of "size" of a p-adic number), and by not drawing a visual distinction between the p-adic representation of a number and base-10 representation we're used to seeing (when the number exists in both systems). This video does a better job on both counts.
posted by samw at 9:01 AM on August 25, 2023


« Older Streaming Doesn't Pay   |   Mulgaras (tiny carnivorous marsupials) return to... Newer »


This thread has been archived and is closed to new comments