{"id":754,"date":"2009-03-17T19:27:03","date_gmt":"2009-03-17T19:27:03","guid":{"rendered":"http:\/\/scientopia.org\/blogs\/goodmath\/2009\/03\/17\/mr-spock-is-not-logical-book-draft-excerpt\/"},"modified":"2009-03-17T19:27:03","modified_gmt":"2009-03-17T19:27:03","slug":"mr-spock-is-not-logical-book-draft-excerpt","status":"publish","type":"post","link":"http:\/\/www.goodmath.org\/blog\/2009\/03\/17\/mr-spock-is-not-logical-book-draft-excerpt\/","title":{"rendered":"Mr. Spock is Not Logical (book draft excerpt)"},"content":{"rendered":"<p><em>As I mentioned, I&#8217;ll be posting drafts of various sections of my book here on the blog. This is a rough draft of the introduction to a chapter on logic.  I would be extremely greatful for comments, critiques, and corrections.<\/em><\/p>\n<p> I&#8217;m a big science fiction fan. In fact, my whole family is pretty<br \/>\nmuch a gaggle of sci-fi geeks. When I was growing up, every<br \/>\nSaturday at 6pm was Star Trek time, when a local channel show<br \/>\nre-runs of the original series.  When Saturday came around, we<br \/>\nalways made sure we were home by 6, and we&#8217;d all gather in front of<br \/>\nthe TV to watch Trek. But there&#8217;s one one thing about Star Trek for<br \/>\nwhich I&#8217;ll never forgive Gene Roddenberry or Star Trek:<br \/>\n&#8220;Logic&#8221;. As in, Mr. Spock saying &#8220;But that would<br \/>\nnot be logical.&#8221;.\n<\/p>\n<p> The reason that this bugs me so much is because it&#8217;s taught a<br \/>\nhuge number of people that &#8220;logical&#8221; means the same<br \/>\nthing as &#8220;reasonable&#8221;. Almost every time I hear anyone<br \/>\nsay that something is logical, they don&#8217;t mean that it&#8217;s logical &#8211;<br \/>\nin fact, they mean something almost exactly opposite &#8211; that it<br \/>\nseems correct based on intuition and common sense.\n<\/p>\n<p> If you&#8217;re being strict about the definition, then saying that<br \/>\nsomething is logical by itself is an almost meaningless<br \/>\nstatement. Because what it means for some statement to be<br \/>\nlogical is really that that statement is inferable<br \/>\nfrom a set of axioms in some formal reasoning system. If you don&#8217;t<br \/>\nknow what formal system, and you don&#8217;t know what axioms, then the<br \/>\nstatement that something is logical is absolutely meaningless. And<br \/>\neven if you do know what system and what axioms you&#8217;re talking<br \/>\nabout, the things that people often call &#8220;logical&#8221; are<br \/>\nnot things that are actually inferable from the axioms.\n<\/p>\n<p><!--more--><\/p>\n<p> Logic, in the sense that we generally talk about it, isn&#8217;t<br \/>\nreally one thing. Logic is a name for the general family of formal<br \/>\nproof systems with inference rules. There are many logics, and a<br \/>\nstatement that is a valid inference (meaning that it is logical)<br \/>\nin one system may not be valid in another. To give you a very<br \/>\nsimple example, think about a statement like &#8220;The house on the corner<br \/>\nis red&#8221;. Most people would say that it&#8217;s <em>logical<\/em><br \/>\nthat that statement is either true or false: after all, either the house<br \/>\n<em>is<\/em> red, or the house <em>isn&#8217;t<\/em> red. In fact, most<br \/>\npeople would agree that the statement &#8220;Either the house is red, or it<br \/>\nisn&#8217;t red&#8221; <em>must be<\/em> true.\n<\/p>\n<p> In the most common logic, called <em>predicate<br \/>\nlogic<\/em>, that&#8217;s absolutely correct. The original<br \/>\nstatement is either true or false; the statement with an &#8220;or&#8221; in<br \/>\nit must be true. But in another common logic, called<br \/>\n<em>intuitionistic<\/em> logic, that&#8217;s <em>not<\/em><br \/>\ntrue. In intuitionistic logic, there are three possible truth<br \/>\nvalues: something can be true (which means that there is a proof<br \/>\nthat it is true); something can be false (which means that there<br \/>\nis a proof that it is false); and something can be unknown so far<br \/>\n(which means that there&#8217;s no proof either way).\n<\/p>\n<p> In addition to having different ways of defining what&#8217;s true<br \/>\nor provable, different logics can describe different things.  Our<br \/>\ngood old familiar predicate logic is awful at describing things<br \/>\ninvolving time &#8211; there&#8217;s really no good particularly good way in<br \/>\npredicate logic to say &#8220;I&#8217;m always hungry at 6pm&#8221;.  But<br \/>\nthere are other logics, called <em>temporal<br \/>\nlogics<\/em> which are designed specifically for making<br \/>\nstatements about time. We&#8217;ll look at temporal logics later. For<br \/>\nnow, we&#8217;ll stick with simple familiar logics.<\/p>\n<\/p>\n<h3>So What is Logic?<\/h3>\n<p> A logic is a formal symbolic system, which consists of:<\/p>\n<ol>\n<li> A set of <em>atoms<\/em>, which are the objects<br \/>\nthat the logic can reason about.<\/li>\n<li> A set of rules describing how you can form statements<br \/>\nin the logic (the <em>syntax<\/em> of the logic).<\/li>\n<li> A system of <em>inference rules<\/em><br \/>\nfor mechanically discovering<br \/>\nnew true statements using known true statements. <\/p>\n<\/li>\n<li> A <em>model<\/em> which describes how the atoms and predicates<br \/>\nin the logic map onto a real, consistent set of objects and properties.<\/li>\n<\/ol>\n<p> The key part of that definition is the<br \/>\n<em>mechanical<\/em> nature of inference. What logic does is<br \/>\nprovide a completely mechanical system for determining the truth<br \/>\nor falsehood of a statement given a set of known truths. In<br \/>\nlogic, <em>you don&#8217;t need to know what something means in order to<br \/>\ndetermine if it&#8217;s true!<\/em>. As long as the logic <em>has<\/em> a<br \/>\nvalid model, you don&#8217;t need to know what the model <em>is<\/em> to<br \/>\nbe able to do valid reasoning in that logic.<\/p>\n<p> The easiest way to get a sense of how that can possibly work<br \/>\nis to use an example. We&#8217;ll start with one simple logic, and show<br \/>\nhow it can be used in a mechanical fashion to deduce true statements<br \/>\n&#8211; without knowing what those statements mean. For now, we won&#8217;t even<br \/>\nreally define the logic formally, but instead just rely on intuition.<br \/>\nMost arguments that we hear day to day are based informally on a logic<br \/>\ncalled <em>predicate logic<\/em>; to be more specific, they&#8217;re<br \/>\nmostly first order predicate logic.<\/p>\n<p> In predicate logic, we&#8217;ve got a collection of objects which we<br \/>\ncan reason about, which we usually call<br \/>\n<em>atoms<\/em>.  To say anything about objects, we use<br \/>\npredicates. Predicates are statements that assert some property<br \/>\nabout on object, or some relationship between objects. For<br \/>\nexample, if I had a pet dog named Joe, we could make statements<br \/>\nabout him like <code>Dog(\"Joe\")<\/code>,<br \/>\nwhich would say &#8220;Joe is a dog.&#8221;. Or we could form statements about<br \/>\nspecific relationships: <code>Likes(\"Joe\",<br \/>\n\"Rex\")<\/code> is a logical way of saying &#8220;Joe<br \/>\nlikes Rex&#8221;. <\/p>\n<p> We can also form general statements. For example, if Joe likes<br \/>\nall other dogs, we can say that in logic: <code>(&forall;x)<br \/>\nDog(x) &rArr; Likes(\"Joe\", x)<\/code>. The<br \/>\nupside down &#8220;A&#8221; stands for &#8220;for all&#8221;; the statement<br \/>\nsays &#8220;For all x, if x is a dog, then Joe likes x.&#8221;<\/p>\n<h3>Inference Rules<\/h3>\n<p> Where things get interesting is the inference rules. Inference<br \/>\nrules describe how to perform reasoning in the logic &#8211; which is another<br \/>\nway of saying that they describe how the logic can allow you to figure<br \/>\nout what&#8217;s true or false, based on reasoning starting from an initial<br \/>\nset of given facts.<\/p>\n<p> Inference rules are usually written as <em>sequents<\/em>,<br \/>\nwhich we&#8217;ll get to in another section; for now, we&#8217;ll<br \/>\nstick with informal descriptions.<\/p>\n<p> The simplest inference rules allow you to just manipulate<br \/>\nsimple statements. For example, if you know <code>A &and;<br \/>\nB<\/code> is true, then you know <code>A<\/code> is<br \/>\ntrue.<\/p>\n<p> Another group of inference rules combine similar<br \/>\nstatements to derive new facts. For example, the most famous rule<br \/>\nof logic is called <em>modus ponens<\/em>: if you know<br \/>\nthat the statement <code>P &rArr; Q<\/code> is true,<br \/>\nand you also know that <code>P<\/code> is true, then you<br \/>\ncan infer that <code>Q<\/code> must be true.<\/p>\n<p> More interesting rules allow you to do things like work from<br \/>\nthe general to the specific: if you know that <code>&forall;<br \/>\nx: P(x)<\/code>, and &#8220;A&#8221; is an atom, then you can<br \/>\ninfer <code>P(\"A\")<\/code>.<\/p>\n<p> Yet other rules allow you to transform statements. For example,<br \/>\nif you know that <code>&exist;x : P(x)<\/code>, then<br \/>\nyou can infer that <code>&not;&forall;x: &not;P(x)<\/code>.\n<\/p>\n<p> With the rules we&#8217;ve looked at so far, we can build an example of<br \/>\nwhat I meant by totally mechanical inference.<\/p>\n<p> Let&#8217;s suppose we have a bunch of atoms, &#8220;a&#8221;,<br \/>\n&#8220;b&#8221;, &#8220;c&#8221;, &#8230;, and two predicates, P<br \/>\nand Q.<\/p>\n<p> We know a few simple facts:<\/p>\n<ul>\n<li><code>P(\"a\", \"b\")<\/code><\/li>\n<li><code>P(\"b\", \"c\")<\/code><\/li>\n<li><code>&forall;x, y, z: P(x,y) &and; P(y,z)<br \/>\n&rArr; Q(x,z)<\/code><\/li>\n<\/ul>\n<p> What can we infer using this? Using a general-to-specific<br \/>\ninference, we can say <code>P(\"a\",<br \/>\n\"b\") &and; P(\"a\", \"b\")<br \/>\n&rArr; Q(\"a\", \"c\")<\/code><\/p>\n<p> Then, we can combine <code>P(\"a\",<br \/>\n\"b\")<\/code> and <code>P(\"b\",<br \/>\n\"c\")<\/code> to infer<br \/>\n<code>P(\"a\", \"b\") &and;<br \/>\nP(\"b\", \"c\")<\/code>.  (Remember, we&#8217;re<br \/>\nbeing totally mechanical, so if we want to use the implication, we<br \/>\nneed to exactly match its left-hand side, so we need to do an<br \/>\ninference to get the &#8220;and&#8221; statement.)<\/p>\n<p> Finally, we can now use modus ponens to infer<br \/>\n<code>Q(\"a\",\"c\")<\/code>. We<br \/>\nhave <em>no idea<\/em> what the atoms a, b, and c are; we have<br \/>\nno idea what the predicates P and Q mean. But we&#8217;ve been able to<br \/>\ninfer true statements.<\/p>\n<p> So what do the statements mean? That depends on the model. For a given set of symbolic statements, you can use more than one model &#8211; so long as each model is valid, the meanings of the inferences will be valid in all models assigned to the statements. (We&#8217;ll talk more about models in section &#8230;) In this case, we could use several different models; I&#8217;ll show two examples:<\/p>\n<ol>\n<li>&#8220;a&#8221; could be 1, &#8220;b&#8221; could be 2,<br \/>\nand &#8220;c&#8221; could be 3, with P(x,y) meaning &#8220;x is<br \/>\n1 plus y&#8221;, and Q(x,y) meaning &#8220;x is 2 plus y&#8221;.<br \/>\nThen we would have used the fact that 2 is 1+1 and 3 is 1+2 to infer<br \/>\nthat 3 is 2+1.,\/p&gt;<\/li>\n<li>&#8220;a&#8221; could be my father, Irving;<br \/>\n&#8220;b&#8221; could be me, and &#8220;c&#8221; could be my<br \/>\nson Aaron, with P(x,y) meaning &#8220;x is the father of<br \/>\ny&#8221; and Q(x,y) meaning &#8220;x is the grandfather of<br \/>\ny&#8221;. Then we would have used the fact that Irving is my<br \/>\nfather, and I am Aaron&#8217;s father to infer that Irving is<br \/>\nAaron&#8217;s grandfather.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>As I mentioned, I&#8217;ll be posting drafts of various sections of my book here on the blog. This is a rough draft of the introduction to a chapter on logic. I would be extremely greatful for comments, critiques, and corrections. I&#8217;m a big science fiction fan. In fact, my whole family is pretty much a [&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":[33],"tags":[193,221],"class_list":["post-754","post","type-post","status-publish","format-standard","hentry","category-logic","tag-logic-2","tag-rant"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p4lzZS-ca","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/posts\/754","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=754"}],"version-history":[{"count":0,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/posts\/754\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/media?parent=754"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/categories?post=754"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/tags?post=754"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}