Surreal Numbers – An Introduction (2019) [pdf] 110 points by ColinWright 21 days ago | hide | past | favorite | 73 comments

 Knuth has a nice book on Surreal numbers.https://www-cs-faculty.stanford.edu/~knuth/sn.htmlThis interview is excellent https://www.youtube.com/watch?v=mPn2AdMH7UQHe wrote the book in less than a week, the book was just flowing for days and after that he couldn't write a thing. Then he realized he missed a detail and had to rewrite the whole book.
 Here's an intro to surreal numbers I wrote a while ago: https://ianopolous.peergos.me/maths/surreal
 This is a wonderful intro! Thanks for sharing..
 Thanks! Glad you like it. I wrote it as an undergrad for the Oxford maths magazine at the time, Eureka. I'm still blown away by how beautiful Surreal numbers are.
 I thought there had been more threads on this, but found only one:Donald Knuth: Surreal Numbers [video] - https://news.ycombinator.com/item?id=11987415 - June 2016 (54 comments)
 Do you literally just do this deduplication with your brain alone? Or do you have some kind of clever indexing scheme and, if the latter, have you ever written it up? Because that would be interesting to read about.
 It is all explained at https://news.ycombinator.com/item?id=27284079 and the links back from there.
 One helpful intuition for the surreals - the standard numbers are basically mapped to a ruler where the 'gap' between any two consecutive numbers (eg, 4 and 5) is intuitively equivalent to any other (eg, the gap between 0 and 1).The concept of distance is abandoned in the construction of the surreals so it no longer makes sense to talk about the gap between 1 and 2 being the same as the gap between 2 and 3.It is a very pure conception of numbers and it is quite pretty that it contains everything (integers, reals, infinitesimals, infinities, concept of infinity + 1, etc.
 I was introduced to this concept through the Numberphile video and thought it was more about having fun with symbols / notation than contributing anything mathematically new or useful. I particularly object to the playing with infinities and infinitesimals as though they were numbers. As the pdf says on page 41:> "According to theorem 5, {Z | } is a number that is greater than all integers. Therefore, its value is infinity!"That makes no sense, nor does much of the exploration from this point. Other than playing with symbols, I'm not sure it has any value by itself.That said, "playing with symbols" can still be of great value as how we symbolize and notate things can change our understanding of things.
 When we analyse games, especially combinatorial games, we find that for a given game we can give positions "values". Then there's a concept of "Adding" game positions, and the value of the sum of positions is the sum of the values of the positions. So using "P" for position, and V(P) for the value of a position, we have V(P1+P2) = V(P1)+V(P2). (The additions here are on different types.)So things work nicely, and it feels natural.Then we find that the integers can be embedded naturally into the values we get. So the values from positions form an algebraic structure that extends the integers.Then we find that there are game positions whose values are larger than all the integers. The obvious interpretation of this is that they are infinite, but are all part of a larger structure, one where addition and subtraction of these things still makes sense, and are still well defined.When you say "That makes no sense", you're thinking of this in the limited space of counting, and ordinary numbers. But there are wider contexts where "simple counting" isn't enough, and in those cases it makes perfect sense, and is useful.
 > "Then we find that there are game positions whose values are larger than all the integers. The obvious interpretation of this is that they are infinite, but are all part of a larger structure, one where addition and subtraction of these things still makes sense, and are still well defined."But isn't this really more about notation than having "values" that are necessarily "larger than all integers"? That is, isn't this about needing a convenient way to notate something when we're already using integers for something else?And/or do you know of any books or resources that go into more detail about this?(As far as I can tell, the idea of surreal numbers still imagines a one-dimensional layout through which numbers are ordered. It's the adding of "infinity" and "1/infinity" to this line to which I object on nonsense grounds; using a non-integer symbol to represent an extension of some sort (non-spatially related) for some context still makes sense, I just don't think it implies a value "greater than all integers".)
 >> Then we find that there are game positions whose values are larger than all the integers ...> But isn't this really more about notation than having "values" that are necessarily "larger than all integers"?We have a structure which is "values for games". That structure has addition and subtraction, "greater than" and "less than", and they behave a lot like numbers. We find that the integers embed naturally into this structure, so it's reasonable to think of this structure as an extension of the integers.There are things in that structure that are greater than all the integers.Call them what you like, the people who work with these things find it natural to refer to them as "infinities". I feel that your objections are arising from your desire to think of these things in the existing ways you think of the integers, but these things are not the integers, they are a structure in which the integers naturally live as a sub-structure. Not all of your intuitions will be helpful (although some will, and they are certainly understandable).The classic works here are "On Numbers and Games", or "Winning Ways". The freely available on-line resources are scattered, non-comprehensive, and occasionally bordering on wrong, but they do exist, and they are free. Magic phrases to search for are things like "nimbers", "Combinatorial Game Theory", and "Sprague-Grundy Theorem". You might like to read the related thing that I wrote:https://www.solipsys.co.uk/new/TheIndependenceGame.html?UF03...That deals only with the most elementary aspects, specifically Nimbers, but if nothing else, you might like to skip to the references section of that for other links.
 Looks interesting, will check it out! Thanks for the dialogue. :)
 You're welcome ... your questions and observations are absolutely reasonable, so it's nice to have the opportunity to offer an alternate point of view.Cheers!
 Wikipedia also has a nice overview:
 2019
 Don't get weirded out by somebody thanking God for something. People thank God for many things, for instance thank God it's Friday.
 I'm sure that your comment was well-intentioned, but it's best to leave provocations (such as religious provocations) in place rather than opening a new loop in the threads.
 [flagged]
 Please leave provocations (such as religious provocations) in place rather than opening a new loop in the HN thread. That just replaces the actual topic with a secondary flamewar, which only makes this place worse.
 please see my response below. people always assume the worst.
 I certainly don't want to assume the worst, but we have to go by the comments people actually post and the known effects of such things [1], i.e. what sort of subthread they're expected to lead to [2].Your GP comment was unsubstantive, on perhaps the most flammable of flamewar topics. That made it flamebait, and it was completely off topic to boot. I'm sure you didn't intend to start a flamewar, but that's only a necessary condition, not a sufficient condition, for not starting one. Please don't post like that to HN.
 You can safely ignore it, the document is just a summary of Knuth's book. And it's a good one, I found it very helpful when I was working through the book. I found I had to read the material from several different sources to understand, in addition to working things out on paper/in code.I'm not religious myself but honestly that seems like a perfectly reasonable motivation. While there are some people who believe the Surreals could lead to a deeper form of analysis, I think the most common reason to learn them is to apprehend something beautiful without any sort of utility. But as a heads up, if that doesn't sit right with you, then Knuth's book is probably not right for you either; it's framed in the style of the old testament. On the first day, Conway created zero, and saw that it was good; things like that.This may be more to your taste.https://www.youtube.com/watch?v=mPn2AdMH7UQhttps://www.youtube.com/watch?v=1eAmxgINXrE
 > You can safely ignore it, the document is just a summary of Knuth's book.Knuth is a Lutheran, by the way (uh-oh). He even wrote 3:16 Bible Texts Illuminated[1].
 I didn't know that, that's interesting. Thank you.To clarify, I didn't mean, you can ignore it because it's irrelevant, as much as, you can derive the bulk of the value from the text if you ignore the introduction.
 Perhaps even more interesting is Knuth’s Things a Computer Scientist Rarely Talks About which goes into a bit more of his religious life and how he applies some mathematical techniques (particularly Monte Carlo–style random selection). The genesis of 3:16 (so to speak) is discussed as well.
 Knuth isn't evangelical, though. Like Bach and many others, Knuth's works could be classified as either religious or secular. He doesn't shoehorn religion into every work.
 For what little it's worth, I am not a religious person, but I found Knuth's Surreal Numbers perfectly reasonable, much more on the tongue-in-cheek side than the proselytizing side.And the surreal numbers are over of my favorite things in mathematics, so I'd say they're worth it :)
 Thanks, this was constructive and informative.
 Mentally replace "God" with "the space in which we exist" if it bothers you so much.EDIT: another commenter suggested "all that exists and the way that things turned out", I like that more.I'm very much an atheist, but I appreciate the appreciation of Gods creation from theists too, I just substitute my own more abstract idea of God when I observe the same beauty.
 "God" with "the space in which we exist", if these are equivalent for you, so be it. I have little patiences with people definitions of what god is or isn't and the last place I expect to grapple with such whimsical notions is in a paper like such. I'm reluctant to "glorify God," "or even have the hubris of doing such in such a place or setting. I'd rather not grapple with a stranger's idea of what is (or isn't!) worthy of worship. Forgive me, I shut down.
 At the risk of being slightly glib, it pales in comparison to the copy most startups put out.
 > It was hard for me to get past that point.Why does it bother you that a logician happens to be religious? I myself am a Christian, and some of the most brilliant people I know happen to be religious (Christian, Muslim, Catholic, Jewish, or otherwise).In fact some of the most brilliant logicians in the history of the world have been religious (from Avicenna, to Anselm, to Gödel, to Kripke).
 Not the OP, but what bothers me is not that Knuth is relgious (but see update below), that is perfectly fine. What bothers me is that he chooses to proselytize his religion in a technical publication. That seems inappropriate to me. Imagine the reaction if instead of glorifying God, he had written instead, "Finally, I hope that this paper may glorify Allah the compassionate and merciful..."[UPDATE] I made a mistake here and assumed that Knuth had written this because I happen to know that he's a Christian, but I was wrong about that. And in retrospect I should have realized that I was wrong because Knuth is actually quite scrupulous about keeping his religious views private. But I stand by the substance of my comment subject to s/Knuth/Tøndering.
 > Not the OP, but what bothers me is not that Knuth is relgious, that is perfectly fine. What bothers me is that he chooses to proselytize his religion in a technical publication. That seems inappropriate to me.First of all, the quote is not by Knuth, but by Claus Tøndering (the author of the paper linked). Second of all, the "Preface," where the quote is snipped from, is just that -- a preface -- a lot of people thank their moms in there.It's just much ado about nothing and annoying posturing. Why is why I, and I'd assume others, take issue with it.
 > the quote is not by Knuth, but by Claus TønderingSorry, my mistake. I knew Knuth was religious so I assumed it was his quote.I stand by the substance of my comment though. But I agree with you that it's not a huge big deal.
 Math is made by humans to be learned and applied by humans. There's no need for marketing in the form of pretext formalities. If anything, we should savour the human metadata to math - the last decades before AI takes over.
 I'm a bit weirded out by the implication that a purely abstract number system could be possible or impossible based on the actions of any entity, even a god. That's the only way I can see for God to be glorified in the way described. Yet that would mean that it would be possible to create a universe that has free-thinking mathematicians but in which surreal numbers could not exist even as a concept. Which is quite a claim.
 I don't think that's so weird. An omnipotent entity controls the rules of reality. It could construct a universe in which contradictory things are true, or whatever it wanted. This is a bit like the puddle assuming the world was made for it because it fits so well into it - we take the rules of our reality for granted but that need not be the case in this thought experiment.
 The rules of reality apply to reality, though. It's easy for an omnipotent power to make physics do seemingly contradictory things. But pure logic is not part of reality.You could talk about how a real-life implementation of some element of math doesn't match the logical version derived from a specific set of axioms, but there's no real-life version of surreal numbers in our universe anyway so that's basically true already.
 Are you so sure that logic is separate from reality? A great deal of logic depends on physics. Reversing the arrow of entropy, for example, pretty much breaks 'if x, therefore y' statements.
 There is an irony to referring to faith when discussing logic.
 Why? Modern math (and logic) explicitly don't make any absolute claims. They are all just "if you take these axioms as given, then you can conclude these theorems."Math doesn't care where you get your axioms from, or why you take them as given. So faith is just as good or bad a source as intuition or empirical evidence as far as logic is concerned.I'm not religious myself, but compatibility with logic is a really, really low bar to clear for any Weltanschauung.(And you can believe that Knuth and the author of the paper are smart enough to be able to reason away any inconsistencies.)
 Wonderfully put!To be honest, I struggle to explain this to mathematicians even: many of them do not grasp the fact that axioms are basically the things you put your faith in.I only claim that the main difference between science and religion, which are both based on faith in unprovable statements, is that science invites you to challenge those statements (easy example is the axiom of parallelism), whereas religion doesn't.
 In some sense, mathematics is just a game you play. Playing round with different axioms is encouraged.Another view at axioms is that they are like an API:Whenever you find a system (real world or elsewhere in math) that fits the axioms of group theory, you can apply all kinds of already proven theorems to it. Very much like building a library on top of an API spec.In this perspective, faith doesn't come into the picture at all: the axioms of a specific theory are just the shape of the socket that you need to fit your plug in to get already proven theorems for free.(A somewhat similar special case is reductions in computer science: where eg you show that some new problem is at least as hard as one we already know to be NP complete.)
 Sure, that speaks to the usefulness of mathematics and the way it's constructed: perhaps the API analogy is the way to go about explaining it to others.However, I am mostly talking about people (mathematicians even) who do not understand that something as basic as 2+2=4 relies on our faith that: 1. there exists "one", and 2. there exists a successor to "one" (simplified, for interested readers, look for Peano axioms). The beauty of mathematics and the human mind are in that everything else flows from there!Most of them would claim that this is universally true, whereas as a mathematician, one needs to understand the difference, and be open to, as you put it, playing with assumptions!
 > However, I am mostly talking about people (mathematicians even) who do not understand that something as basic as 2+2=4 relies on our faith that: 1. there exists "one", and 2. there exists a successor to "one" (simplified, for interested readers, look for Peano axioms). The beauty of mathematics and the human mind are in that everything else flows from there!I don't see any faith in here:Math just says 'if something like 1 were to exist, and if successors were to exists (etc), then after a long chain of reasoning you could conclude that 2+2=4'.The 'faith' perhaps comes in when you go from '2+2=4' to eg two hens in my coop and two more hens in my coop means that I have four hens in my coop.(And that's not trivial! Not all things in the real world or even in math behave like that. For some not even as an approximation.)
 You are getting caught up in what mathematics does say: and you are right about that.I am contrasting that with what people think it says (i.e. 2+2 is 4), without understanding that there's an "if" in there. They take it for granted as indisputable truth, meaning that they have faith in those "ifs" being fulfilled.
 You do need faith that the axioms you work with are consistent, unless you're working in one of the few provably consistent systems.
 That's somewhat true. Though in practice, you can just accept it provisionally as an empirical observation.(Math is just as applicable even if you have your doubts and are missing absolute certainty.)
 Empirical observation is not considered much proof of abstract principles because of the measuring errors.I.e. Newtonian mechanics is empiricaly observed to be true with a certain error margin during measurements. As you lower measurement errors, you start to notice things that are not consistent with it.Newtonian physics was and still is very much applicable for many use cases, just like mathematics is.You seem set on "defending" mathematics where nobody is attacking it.My comment is not to discredit mathematics: it is the ultimate expression of the human mind, showing the limits of our comprehension. Limits that clearly show that we can start reasoning only if we accept a few things as a given (what I simplified to "faith").It is beautiful and transcendent in its expression, and while people consider it the most complex of human expression, I consider it the simplest full expression, worked down to the smallest ambiguities our brain will let us have. It is a reflection of what our mind can understand and grasp, and we should accept it as such so we can both grow our understanding of the world, and test limits of our understanding.
 a) The difference is the ironyb) Religions don’t just make unprovable claims, they make contradictory claims. Mathematicians prefer systems which are consistent yet have unprovable claims as opposed to inconsistent systems.
 > b) Religions don’t just make unprovable claims, they make contradictory claims.To quote myself:> (And you can believe that Knuth and the author of the paper are smart enough to be able to reason away any inconsistencies.)
 The idea of a language which underlies the structure of the natural world (the word / logos) is a core underpinning of -- I hesitate to say most, but at the very least -- many sophisticated theologies.The line between that which you can call "the word" and what you call "math" is not clear to me at all.
 Math exists within the world and, of necessity, is expressed in its terms. The reverse need not be true.
 That's true, but most people people consider mathematical truths to be actual truths, and this is backed by the predictive power of mathematical models.You can doubt the predictive power of math itself, but I have yet to see a clear example where rigorous math deviates from nature.The fact that effects seem to follow causes naturally leads to the idea that there is a language which you can use to symbolically represent the process by which the universe evolves in time and space. The attempt to realize that language is what we call "math."My point is only that the idea of the logos is not at all dissimilar from that, and the idea that someone who is intensely interested in logic and mathematics would also be interested in theology is only natural to me.
 While I myself am a strident atheist, I must point out that your comment demonstrates a profound ignorance of the history of both faith and logic. In the premodern era it was through logic that the faithful intellectuals discovered “the mind of god.”
 I recently encountered the "midwit" meme: https://knowyourmeme.com/photos/2054904-iq-bell-curve-midwit ..atheism as a symptom of middling intelligence.as someone who spent their 20s and 30s devoutly atheist I very much appreciate the sentiment - never discount religious people. the smartest person you meet in your life will be religious, probably.
 >> the smartest person you meet in your life will be religious, probably.The fact that this would be surprising speaks volumes about the accuracy of the meme.https://en.m.wikipedia.org/wiki/Demographics_of_atheism“A 1998 survey based on a self-selected sample of biological and physical scientists of the National Academy of Sciences in the United States found that 7% believed in the existence of God, 72.2% did not, and 20.8% were agnostic or had doubts.[53] Eugenie Scott argued that there are methodological issues in the study, including ambiguity in the questions. A study on leading scientists in the US, with clearer wording and allowing for a broader concept of "god", concluded that 40% of prominent scientists believe in god.”
 Of course, doing these kinds of studies in the God-fearing US biases them a quite lot.You'd get rather different results in China or Europe or South Korea or Egypt.
 Indeed. It is a great leap of faith to have faith in logic.
 Well who made the world logical?
 Glibly? We did. Or, who says it is logical? Either works.
 Right and we created god too! I think that atheistic people get too bent up when someone thanks god for something. You could equally say “thanks for all that exists and the way that things turned out” but it’s a mouthful!
 You can redefine God to mean 'all that exists and the way that things turned out'. But then you don't get to turn around and use the definition of God that goes 'whatever it says in my preferred holy text'.
 [flagged]
 Yikes, taking HN threads further into religious flamewar is not cool, and crossing into personal attack is no way to serve God, or love! Please don't do that here.
 [flagged]
 "I don't know who hurt you" is certainly a personal attack and an internet flamewar trope to boot. No more of that, please.Making provocative statements about God in a religious flamewar thread is obviously taking the thread further into religious flamewar. No more of that either, please.Edit: see also https://news.ycombinator.com/item?id=27371909. If you don't to be banned on HN, we're going to need you to change how you're posting to the site.
 What a bigoted remark.
 Should have put a trigger warning
 I prefer the hyperreals