{"id":710,"date":"2011-07-21T16:35:59","date_gmt":"2011-07-21T21:35:59","guid":{"rendered":"https:\/\/scottaaronson.blog\/?p=710"},"modified":"2017-01-12T16:31:26","modified_gmt":"2017-01-12T21:31:26","slug":"rossers-theorem-via-turing-machines","status":"publish","type":"post","link":"https:\/\/scottaaronson.blog\/?p=710","title":{"rendered":"Rosser&#8217;s Theorem via Turing machines"},"content":{"rendered":"<p><em>(Thanks to Amit Sahai for spurring me to write this post!)<\/em><\/p>\n<p><span style=\"color: red;\"><strong>The Background<\/strong><\/span><\/p>\n<p>We all remember <a href=\"http:\/\/en.wikipedia.org\/wiki\/G%C3%B6del%27s_incompleteness_theorems\">G\u00f6del&#8217;s First Incompleteness Theorem<\/a> from kindergarten.\u00a0 This is the thing that, given a formal system F, constructs a sentence G(F) that&#8217;s a mathematical encoding of<\/p>\n<p style=\"padding-left: 30px;\">&#8220;This sentence is not provable in F.&#8221;<\/p>\n<p>If F proves G(F), then F proves both that F proves G(F) and that F doesn&#8217;t prove G(F), so F is inconsistent (and hence also unsound).\u00a0 Meanwhile, if F proves Not(G(F)), then it &#8220;believes&#8221; there&#8217;s a proof of G(F).\u00a0 So either that proof exists (in which case it would render F inconsistent, by the previous argument), or else it doesn&#8217;t exist (in which case F is unsound).\u00a0 The conclusion is that, assuming F is powerful enough to express sentences like G(F) in the first place, it can&#8217;t be both <em>sound<\/em> and <em>complete<\/em> (that is, it can&#8217;t prove all and only the true arithmetical statements).<\/p>\n<p>OK, but the way most people like to state G\u00f6del&#8217;s Theorem is stronger than that: <strong>no sufficiently-powerful formal system F can be both complete and <em>consistent<\/em>.<\/strong>\u00a0 Note that soundness implies consistency, but not vice versa.\u00a0 (If I believe that there&#8217;s a giant purple boogeyman on the moon, then presumably my belief is <em>unsound<\/em>, but it might be perfectly <em>consistent<\/em> with my various other beliefs about boogeymen.)<\/p>\n<p>Unfortunately, neither G\u00f6del&#8217;s original proof, nor computer scientists&#8217; favorite alternative proofs, actually give you the stronger statement about completeness and <em>consistency<\/em>.\u00a0 And this has been a persistent problem when I teach\u00a0G\u00f6del in my undergraduate computability and complexity class.<\/p>\n<p>Where&#8217;s the catch in\u00a0G\u00f6del&#8217;s argument?\u00a0 It&#8217;s in the case where F proves Not(G(F)) (i.e., that G(F) is provable), even though in reality G(F) is true (i.e., G(F) <em>isn&#8217;t<\/em> provable).\u00a0 In that situation, F would clearly be <em>unsound<\/em>, but it might not contain any <em>contradiction<\/em>&#8212;basically because, no matter how long you looked, you could never rule out F&#8217;s (false) belief that G(F) is provable.\u00a0 Indeed, F would be what I like to call a <em>self-hating theory<\/em>: a theory, like F+Not(Con(F)), that pessimistically believes in its own inconsistency, even though in fact it&#8217;s perfectly consistent.\u00a0 (By contrast, if F arrogantly believes in its own <em>consistency<\/em>, then it <em>can&#8217;t<\/em> be consistent by the Second Incompleteness Theorem!\u00a0 There&#8217;s a lesson there somewhere&#8230;)<\/p>\n<p>The way G\u00f6del himself solved this problem was by introducing a new concept called <a href=\"http:\/\/en.wikipedia.org\/wiki\/Omega-consistent\">\u03c9-consistency<\/a>, which is intermediate between consistency and soundness.\u00a0 He then showed that F can&#8217;t be both complete and \u03c9-consistent.\u00a0 (Why didn&#8217;t G\u00f6del simply talk about soundness?\u00a0 Because unlike consistency or \u03c9-consistency, soundness is a &#8220;metatheoretic&#8221; concept that&#8217;s impossible to formalize in F.\u00a0 So, if he used soundness, then the First Incompleteness Theorem couldn&#8217;t even be <em>stated<\/em>, let alone proved, in F itself, and that in turn would create problems for the proof of his <em>Second<\/em> Incompleteness Theorem.)<\/p>\n<p>Anyway, from the standpoint of an undergrad class, the fear is that, once you start talking about &#8220;\u03c9-consistency,&#8221; all the romance and self-referential magic of\u00a0G\u00f6del will vanish in a morass of technicality.<\/p>\n<p>So surely we can dot the i&#8217;s here (or rather, put the umlauts on the \u00f6&#8217;s), and prove the stronger, cleaner statement that F can&#8217;t be both complete and <em>consistent<\/em>?<\/p>\n<p>Yes we can&#8212;but to do so we need <a href=\"http:\/\/en.wikipedia.org\/wiki\/Rosser%27s_trick\">Rosser&#8217;s Theorem<\/a>: a strengthening of G\u00f6del&#8217;s Theorem from 1936 that&#8217;s much less well-known among the nerd public than it ought to be.\u00a0 In Rosser&#8217;s proof, we replace G(F) by a new sentence R(F), which is a mathematical encoding of the following:<\/p>\n<p style=\"padding-left: 30px;\">&#8220;For every proof of this sentence in F, there&#8217;s a shorter disproof.&#8221;<\/p>\n<p>If F proves R(F), then it also proves that there&#8217;s a <em>disproof<\/em> of R(F) that&#8217;s shorter than the proof of R(F) whose existence we just assumed.\u00a0 So we can <em>look<\/em> for that disproof (since there are only finitely many strings of symbols to check), and either we&#8217;ll find it or we won&#8217;t&#8212;but in either case, we&#8217;ll have revealed F to be inconsistent.\u00a0 Meanwhile, if F proves Not(R(F)), then it proves that there <em>is<\/em> a proof of R(F) with no shorter disproof.\u00a0 So in particular, it proves that there&#8217;s a proof of R(F) that&#8217;s <em>no longer<\/em> than the proof of Not(R(F)) whose existence we just assumed.\u00a0 But once again, we can <em>look<\/em> for that proof (there are only finitely many strings to check), and either we&#8217;ll find it or we won&#8217;t, and in either case, F is revealed to be inconsistent.<\/p>\n<p>Notice what the Rosser sentence accomplishes: it creates a <em>symmetry<\/em> between the cases that R(F) is provable and R(F) is <em>dis<\/em>provable, correcting the asymmetry between the two cases in G\u00f6del&#8217;s original argument.<\/p>\n<p>Alright, so then why don&#8217;t I just teach Rosser&#8217;s Theorem in my undergrad class, instead of G\u00f6del&#8217;s?<\/p>\n<p>I&#8217;ll tell you why: because, when <em><\/em>I teach G\u00f6del to computer scientists, I like to sidestep the nasty details of how you formalize the concept of &#8220;provability in F.&#8221;\u00a0 (From a modern computer-science perspective, <a href=\"http:\/\/en.wikipedia.org\/wiki\/G%C3%B6del_numbering\">G\u00f6del numbering<\/a> is a barf-inducingly ugly hack!)<\/p>\n<p>Instead, I simply observe G\u00f6del&#8217;s Theorem as a trivial corollary of what I see as its <em>conceptually-prior (even though historically-later) cousin<\/em>: <a href=\"http:\/\/en.wikipedia.org\/wiki\/Halting_problem\">Turing&#8217;s Theorem on the unsolvability of the halting problem.<\/a><\/p>\n<p>For those of you who&#8217;ve never seen the connection between these two triumphs of human thought: suppose we had a sound and complete (and recursively-axiomatizable, yadda yadda yadda) formal system F, which was powerful enough to reason about Turing machines.\u00a0 Then I claim that, using such an F, we could easily solve the halting problem.\u00a0 For suppose we&#8217;re given a Turing machine M, and we want to know whether it halts on a blank tape.\u00a0 Then we&#8217;d simply have to enumerate all possible proofs in F, until we found <em>either<\/em> a proof that M halts, <em>or<\/em> a proof that M runs forever.\u00a0 Because F is complete, we&#8217;d eventually find one or the other, and because F is sound, the proof&#8217;s conclusion would be <em>true<\/em>.\u00a0 So we&#8217;d decide whether M halts.\u00a0 But since we already know (thanks to Mr. T) that the halting problem is undecidable, we conclude that F can&#8217;t have existed.<\/p>\n<p>&#8220;Look ma, no\u00a0G\u00f6del numbers!&#8221;<\/p>\n<p><span style=\"color: red;\"><strong>The &#8220;New&#8221; Observation<\/strong><\/span><\/p>\n<p>The above discussion leads to an obvious question:<\/p>\n<p><strong>Is there also a proof of <em>Rosser&#8217;s Theorem<\/em> that uses only Turing machines&#8212;analogous to the computer-scientist-friendly proof we just gave for the &#8220;original&#8221; Incompleteness Theorem?<\/strong><\/p>\n<p>My initial worry was that the answer would be no.\u00a0 For not only is Rosser&#8217;s sentence more complicated than\u00a0G\u00f6del&#8217;s, but it depends essentially on an <em>ordering<\/em> of proofs&#8212;and it&#8217;s not clear what such an ordering would correspond to in the world of Turing machines.<\/p>\n<p>Why did this worry me?\u00a0 Because it threatened my conviction that computer programs are &#8220;really&#8221; at the core of G\u00f6del&#8217;s Theorem, whatever any tradition-minded philosopher or logician might claim to the contrary.\u00a0 If even the modest step from G\u00f6del to Rosser required abandoning the computability perspective, then my faith in the Almighty Turing Machine would be shaken.<\/p>\n<p>But never fear!\u00a0 A few months ago, I found a short, simple, Turing-machine-based proof of Rosser&#8217;s Theorem.\u00a0 While this seemed too small to write up as a paper, <del>I&#8217;d never seen it before (please let me know if you have!)<\/del>, so I thought I&#8217;d share it here.\u00a0 (<span style=\"color: #ff0000;\"><strong>Update:<\/strong><\/span> Makoto Kanazawa points me to a basically-similar argument in <a href=\"http:\/\/books.google.com\/books?id=uV6Sp8gl3PcC&amp;lpg=PR7&amp;ots=HfXuowZ5og&amp;dq=Kleene%20%22mathematical%20logic%22&amp;lr&amp;pg=PA275#v=onepage&amp;f=false\">Kleene&#8217;s 1967 textbook<\/a>.\u00a0 So, you can consider what follows to be a &#8220;popularization&#8221; of Kleene.)<\/p>\n<p>The first step is to define the following variant of the halting problem:<\/p>\n<p><strong>The Consistent Guessing Problem<\/strong><\/p>\n<p><em>Given as input a description of a Turing machine M:<\/em><\/p>\n<ol>\n<li><em>If M accepts on a blank tape, then accept.<\/em><\/li>\n<li><em>If M rejects on a blank tape, then reject.<\/em><\/li>\n<li><em>If M runs forever on a blank tape, then either accept or reject, but in any case, halt!<\/em><\/li>\n<\/ol>\n<p>It&#8217;s easy to show that there&#8217;s no Turing machine to solve the Consistent Guessing Problem, by a modification (arguably, even a simplification) of Turing&#8217;s original argument for the halting problem.\u00a0 Indeed, I put the unsolvability of the Consistent Guessing Problem on last semester&#8217;s midterm, and at least half the students got it.\u00a0 (Damn!\u00a0 I guess I can&#8217;t use that one again.)<\/p>\n<p>See it yet?\u00a0 No?\u00a0 Alright, so let P be a Turing machine that solves the Consistent Guessing Problem.\u00a0 Then we can easily modify P to produce an new Turing machine Q that, given as input a description \u27e8M\u27e9 of another Turing machine M:<\/p>\n<ul>\n<li>Rejects if M(\u27e8M\u27e9) accepts.<\/li>\n<li>Accepts if M(\u27e8M\u27e9) rejects.<\/li>\n<li>Halts (either accepting or rejecting) if M(\u27e8M\u27e9) runs forever.<\/li>\n<\/ul>\n<p>Now run Q on its own description \u27e8Q\u27e9.\u00a0 If Q(\u27e8Q\u27e9) accepts, then it rejects; if Q(\u27e8Q\u27e9) rejects, then it accepts.\u00a0 So the only remaining option is that Q(\u27e8Q\u27e9) runs forever, violating the third condition.<\/p>\n<p>From the unsolvability of the Consistent Guessing Problem, I claim that Rosser&#8217;s Theorem follows.\u00a0 For suppose we had a complete and consistent (but <em>not<\/em> necessarily sound!) formal system F, which was powerful enough to talk about Turing machines.\u00a0 Then using F, we could solve the Consistent Guessing Problem, as follows.\u00a0 Given as input a Turing machine description \u27e8M\u27e9, start enumerating all possible proofs and disproofs of the statement &#8220;M accepts on a blank tape.&#8221;\u00a0 Accept as soon as you find a proof, or reject as soon as you find a disproof.<\/p>\n<p>Because F is complete, you must eventually find either a proof or a disproof (and therefore halt, either accepting or rejecting).\u00a0 Also, because F is consistent, if M really rejects then F can&#8217;t prove that M accepts, while if M really accepts then F can&#8217;t prove that M doesn&#8217;t accept (since in either case, the contradiction could be discovered in finite time).\u00a0 So you&#8217;ll accept if M accepts and reject if M rejects.\u00a0 But this means that you&#8217;re solving Consistent Guessing!\u00a0 Since we already showed there&#8217;s <em>no<\/em> Turing machine to solve Consistent Guessing, we conclude that F can&#8217;t have existed.<\/p>\n<p>QED: the moral order of the universe is restored, and the Turing machine&#8217;s exalted position at the base of all human thought reaffirmed.<\/p>\n<p>(Incidentally, you might wonder whether\u00a0G\u00f6del&#8217;s <em>Second<\/em> Incompleteness Theorem, on the impossibility of a consistent F proving its own consistency, can also be proved in a Turing-machine-centric way.\u00a0 To anticipate your question, the answer is yes&#8212;and better yet, it even involves Kolmogorov complexity!\u00a0 See, for example, <a href=\"http:\/\/www.ams.org\/notices\/201011\/rtx101101454p.pdf\">this beautiful recent paper<\/a> by Shira Kritchman and Ran Raz.)<\/p>\n<p>So, will G\u00f6del&#8217;s Theorem always and forevermore be taught as a centerpiece of <em>computability <\/em>theory, and will the\u00a0G\u00f6del numbers get their much-deserved retirement?\u00a0 I don&#8217;t see a reason why that <em>shouldn&#8217;t<\/em> happen&#8212;but alas, the consistency of my prediction isn&#8217;t enough to imply its metatheoretic truth.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>(Thanks to Amit Sahai for spurring me to write this post!) The Background We all remember G\u00f6del&#8217;s First Incompleteness Theorem from kindergarten.\u00a0 This is the thing that, given a formal system F, constructs a sentence G(F) that&#8217;s a mathematical encoding of &#8220;This sentence is not provable in F.&#8221; If F proves G(F), then F proves [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":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},"_wpas_customize_per_network":false},"categories":[11],"tags":[],"class_list":["post-710","post","type-post","status-publish","format-standard","hentry","category-nerd-interest"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=\/wp\/v2\/posts\/710","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=710"}],"version-history":[{"count":16,"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=\/wp\/v2\/posts\/710\/revisions"}],"predecessor-version":[{"id":3124,"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=\/wp\/v2\/posts\/710\/revisions\/3124"}],"wp:attachment":[{"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=710"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=710"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=710"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}