{"id":367,"date":"2007-03-31T18:01:41","date_gmt":"2007-03-31T18:01:41","guid":{"rendered":"http:\/\/scientopia.org\/blogs\/goodmath\/2007\/03\/31\/surreal-arithmetic-edited-rerun\/"},"modified":"2007-03-31T18:01:41","modified_gmt":"2007-03-31T18:01:41","slug":"surreal-arithmetic-edited-rerun","status":"publish","type":"post","link":"http:\/\/www.goodmath.org\/blog\/2007\/03\/31\/surreal-arithmetic-edited-rerun\/","title":{"rendered":"Surreal Arithmetic (Edited rerun)"},"content":{"rendered":"<p> In my last post on the surreals, I introduced how the surreal numbers are constructed. It&#8217;s really fascinating to look back on it &#8211; to see the structure of numbers from 0 to infinity and beyond, and realize that ultimately, that it&#8217;s <em>all<\/em> built from nothing but the empty set! <\/p>\n<p> Today, we&#8217;re going to move on, and start looking at arithmetic with the surreal numbers. In this post, I&#8217;m going to go through the basic definition of addition, subtraction, and multiplication of surreal numbers. Division will have to wait for a later post; division is quite a subtle operation in the surreals.<\/p>\n<p><!--more--><\/p>\n<h3>Transfinite Induction<\/h3>\n<p>Before getting into the actual operations of surreal arithmetic, I need to pause for a moment, and talk about the fundamental mechanism of how most proofs and constructions on the finite numbers are structured. It&#8217;s called  <em>transfinite induction<\/em>. <\/p>\n<p> Transfinite induction is induction based on the use of ordinals. It uses the same basic mechanism as good old-fashioned mathematical induction (a la the 5th Peano axiom), only instead of doing the induction over the numbers directly, the induction is done on the ordinals &#8211; that is the birthdays &#8211; associated with sets of numbers. So what transfinite induction does is say: <\/p>\n<ul>\n<li> If I can prove that:\n<ul>\n<li> X is true for things with ordinal 0;\n<li> if X is true for ordinal N, then I can prove that X is true for ordinal N+1;\n<\/ul>\n<li> Then X is true for all ordinals.<\/li>\n<\/ul>\n<p> While I didn&#8217;t say this explicitly in the previous post, the way that the definition of &#8220;&le;&#8221; works for the surreal number is by induction over the ordinals:<\/p>\n<ul>\n<li> The set containing the surreal 0 has ordinal 0 in the surreals. 0&le;0 is true, because there is nothing in its right set (&empty;) that is not less than or equal to anything in its left set; and there&#8217;s nothing in its left set that is greater than or equal to anything in its right set.<\/li>\n<li> Ordinal 1 for the surreals is the set { -1, 1 }. Does &le; work for -1, 0, and 1? Check it through; it does.<\/li>\n<li> Since each new ordinal introduces a set of numbers constructed from the previous ordinals; and the construction rule requires the values in a new ordinal to be built from valid values of previous ordinals, then the new values will also work correctly with &#8220;&le;&#8221;.<\/li>\n<\/ul>\n<p> All of the other arithmetic on surreals works using definitions that similarly depend on transfinite induction.<\/p>\n<h3>Addition with Surreal Numbers<\/h3>\n<p>Addition for surreals is pretty straightforward:<\/p>\n<p> If x = { X<sub>L<\/sub> | X<sub>R<\/sub> } and y = { Y<sub>L<\/sub> | Y<sub>R<\/sub> } are surreal numbers, then x+y =  {X<sub>L<\/sub>+y &cup; x+Y<sub>L<\/sub> |  X<sub>R<\/sub>+y &cup; x+Y<sub>R<\/sub>} where:<\/p>\n<ul>\n<li> if X is a set of surreal numbers, and y is a surreal number, then X+y = {x+y|x&isin;X}.<\/li>\n<\/ul>\n<p> Once again, take note of the fact that this definition is recursive, and applies to all surreal numbers by transfinite induction.<\/p>\n<p> So, to translate into english a bit: to add two surreals x and y, take the left side of x, and add it each member of it to y; take the left side of y, and add each member of it to X. Same basic idea for the right side.<\/p>\n<p> So, for example, let&#8217;s look at 2 + 3.<\/p>\n<ul>\n<li> {1|} + {2|} = {{1}+{2|} &cup; {1|}+2 | &empty; &cup; &empty; } =<\/li>\n<li> {{{0|}}+{2|}) &cup; {{0|}+{1|}} |} = {{3|}} &cup; {2|}|} = {3,4|} = {4|} = 5.<\/li>\n<\/ul>\n<p> To get subtraction into the picture, we need to define negation for surreal numbers:<\/p>\n<ul>\n<li>-0 = 0;<\/li>\n<li> if x={ X<sub>L<\/sub> | X<sub>R<\/sub> }, then -x = { {-xr | xr&isin;X<sub>R<\/sub>} | {-lx | xl&isin;X<sub>L<\/sub>}}<\/li>\n<\/ul>\n<p> And now, we can define subtraction. For any two surreal numbers x and y, x &#8211; y = x + (-y)<\/p>\n<h3>Multiplication with Surreal Numbers<\/h3>\n<p> The definition of multiplication is very similar to the definition for addition, only a bit messier:<\/p>\n<p> If x={X<sub>L<\/sub> | X<sub>R<\/sub> } and y = {Y<sub>L<\/sub> | Y<sub>R<\/sub> }, then z = x&times;y = { Z<sub>L<\/sub> | Z<sub>R<\/sub> } where:<\/p>\n<ul>\n<li> Z<sub>L<\/sub> = (X<sub>L<\/sub>&times; y + x&times;Y<sub>L<\/sub> &#8211; X<sub>L<\/sub>&times;Y<sub>L<\/sub>) &cup; (X<sub>R<\/sub>&times;y + x&times;Y<sub>R<\/sub> &#8211; X<sub>R<\/sub>&times;Y<sub>R<\/sub>)<\/li>\n<li> Z<sub>R<\/sub> = (X<sub>L<\/sub>&times; y + x&times;Y<sub>R<\/sub> &#8211; X<sub>L<\/sub>&times;Y<sub>R<\/sub>) &cup; (X<sub>R<\/sub>&times;y + x&times;Y<sub>L<\/sub> &#8211; X<sub>R<\/sub>&times;Y<sub>L<\/sub>); and<\/li>\n<li> if S and T are sets of surreals (e.g., X<sub>L<\/sub> above), then S&times;T= { s&times;t | s \u2208 S, t \u2208 T };<\/li>\n<li> if t is a surreal and S is a set of surreals, then t &times; S = S &times; t = { t }&times;S. (Note that this implies that if S is &empty;, then t&times;S={&empty;|&empty;} = 0; and therefore S&times;T=0 if S or T = &empty;.)<\/li>\n<\/ul>\n<p> To make it easier to write things out, we can break it up and describe  x&times;y in terms of four components: l<sub>1<\/sub>, l<sub>2<\/sub>, r<sub>1<\/sub>, and r<sub>2<\/sub>, where:<\/p>\n<ul>\n<li> l<sub>1<\/sub>=X<sub>L<\/sub>&times; y + x&times;Y<sub>L<\/sub> &#8211; X<sub>L<\/sub>&times;Y<sub>L<\/sub><\/li>\n<li> l<sub>2<\/sub>=X<sub>R<\/sub>&times;y + x&times;Y<sub>R<\/sub> &#8211; X<sub>R<\/sub>&times;Y<sub>R<\/sub><\/li>\n<li> r<sub>1<\/sub>=X<sub>L<\/sub>&times; y + x&times;Y<sub>R<\/sub> &#8211; X<sub>L<\/sub>&times;Y<sub>R<\/sub><\/li>\n<li> r<sub>2<\/sub>=X<sub>R<\/sub>&times;y + x&times;Y<sub>L<\/sub> &#8211; X<sub>R<\/sub>&times;Y<sub>L<\/sub><\/li>\n<\/ul>\n<p> Then in terms of those components, x&times;y={l<sub>1<\/sub>&cup;l<sub>2<\/sub> | r<sub>1<\/sub>&cup;r<sub>2<\/sub> }<\/p>\n<p> Multiplication is a bit hard to follow, so we&#8217;ll work through a couple of examples.<\/p>\n<p>Let&#8217;s start with 0&times;1. In surreal format, that&#8217;s: 0 &times; {0|}. We&#8217;ll look at l<sub>1<\/sub> first:<\/p>\n<ol>\n<li> l<sub>1<\/sub> = &empty;&times;{0|} + 0&times;{0} &#8211; &empty;&times;{0} =<\/li>\n<li> &empty; + 0&times;{0} &#8211; &empty;&times;{0} = &empty;<\/li>\n<\/ol>\n<p> The same thing happens to all four terms: 0 always contributes an &empty; component, which turns every term it&#8217;s a part of into &empty;. In fact, the above works for any number multiplied with zero: zero&#8217;s part of every combination is always &empty;, which eliminates the contribution from the other number, so the result will always end up being {&empty; | &empty;} = 0.<\/p>\n<p> How about 1&times;1? That&#8217;s {0|}&times;{0|} =<\/p>\n<ol>\n<li> l<sub>1<\/sub> = {0}&times;{0|} + {0|}&times;{0} &#8211; {0}&times;{0} = {0} + {{0|}&times;0} &#8211; {0} = {{0|} &times; 0} = {0}. <\/li>\n<li> l<sub>2<\/sub> = &empty;&times;{0|} + {0|}&times;&empty; &#8211; &empty;&times;&empty; = &empty;\n<li> r<sub>1<\/sub> = {0}&times;{0|} + {0|}&times;&empty; &#8211; {0};&times;&empty; = {0} + &empty; &#8211; &empty; = &empty;. <\/li>\n<li> r<sub>2<\/sub> = &empty;&times;{0|} + {0|}&times;{0} &#8211; &empty;&times;&empty; = &empty; + 0 + &empty; = &empty;<\/li>\n<li> So 1&times;1 = { {0} &cup; &empty; | &empty; &cup; &empty; } = {0|} = 1.<\/li>\n<\/ol>\n<p> One last example: 2&times;2, aka {1|}&times;{1|}. I&#8217;m actually going to cheat with this one. I&#8217;ve written some Java code to do basic surreal manipulations, so I&#8217;m going to let it spit out the pieces.<\/p>\n<ol>\n<li>  L<sub>1<\/sub> = { {{{{{|0}|{0|}}|{{0|}|}}|{{{0|}|}|}}|{{{{0|}|}|}|}} }<\/li>\n<li>  L<sub>2<\/sub> = &empty;<\/li>\n<li> R<sub>1<\/sub> = &empty;<\/li>\n<li> R<sub>2<\/sub> = &empty;<\/li>\n<\/ol>\n<p>So 2&times;2 = { {{{{{|0}|{0|}}|{{0|}|}}|{{{0|}|}|}}|{{{{0|}|}|}|}} | } =<\/p>\n<ul>\n<li>  {{{{{-1|1}|{1|}}|{{1|}|}}|{{{1|}|}|}}|} =<\/li>\n<li> {{{{0|2}|{2|}}|{{2|}|}}|} =<\/li>\n<li> {{{1|3}|{3|}}|} =<\/li>\n<li>  {{2|4}|} = <\/li>\n<li>  {3|} =<\/li>\n<li>  4<\/li>\n<\/ul>\n<p> See, it works!<\/p>\n<h3>Why should I care?<\/h3>\n<p> The first fascinating thing about surreal numbers they&#8217;re such a simple construction &#8211; and yet they manage to capture the richness of behavior of the real numbers. And they do in a way that remains consistent with the reals,  while also giving us a handle on playing with infinitely large and infinitely small values. They&#8217;re a lot like Church numerals in lambda calculus, where you start with one trivial little thing: a surreal number with two empty sets -and you can create everything, from 0 to infinity and beyond!<\/p>\n<p> Ultimately, all of the definitions of arithmetic reduce to nothing more than a bunch of recursive set unions; and yet, somehow, using nothing but those set unions, we can get absolutely everything to work exactly the way we expect real numbers to work.<br \/>\nWhen you think about it that way &#8211; we&#8217;ve built up everything we need to be able to do any algebraic operation, using nothing but the empty set and set unions &#8211; it&#8217;s just amazing.<\/p>\n<p> And there&#8217;s even more to it than that. As you&#8217;ll see later, the surreals are actually a subset of a construction called <em>games<\/em>; and when you expand from surreal numbers to games, all sorts of wonderful things can happen. It gives us a way of talking about all sorts of things in terms of simple number-like values.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In my last post on the surreals, I introduced how the surreal numbers are constructed. It&#8217;s really fascinating to look back on it &#8211; to see the structure of numbers from 0 to infinity and beyond, and realize that ultimately, that it&#8217;s all built from nothing but the empty set! Today, we&#8217;re going to move [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[43],"tags":[],"class_list":["post-367","post","type-post","status-publish","format-standard","hentry","category-numbers"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p4lzZS-5V","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/posts\/367","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/comments?post=367"}],"version-history":[{"count":0,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/posts\/367\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/media?parent=367"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/categories?post=367"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/tags?post=367"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}