{"id":1349,"date":"2011-03-23T19:52:57","date_gmt":"2011-03-23T23:52:57","guid":{"rendered":"http:\/\/scientopia.org\/blogs\/goodmath\/?p=1349"},"modified":"2011-03-23T19:52:57","modified_gmt":"2011-03-23T23:52:57","slug":"3-valued-semantics","status":"publish","type":"post","link":"http:\/\/www.goodmath.org\/blog\/2011\/03\/23\/3-valued-semantics\/","title":{"rendered":"3-Valued Semantics"},"content":{"rendered":"<p> Before we can move from three-valued logic to fuzzy logic, we need to take a look at semantics &#8211; both how conventional two-valued logic handle semantics, and how three-valued logics extend the basic semantic structure. This isn&#8217;t exactly one of the more exciting topics I&#8217;ve ever written about &#8211; but it is important, and going through it now will set the groundwork for the interesting stuff &#8211; the semantics of a true fuzzy logic.<\/p>\n<p> What we&#8217;ve looked at so far has been propositional 3-valued logics. Propositional logics aren&#8217;t particularly interesting. You can&#8217;t do or say much with them. What we really care about is predicate logics. But all we need to do is take the three-valued logics we&#8217;ve seen, and allow statements to be <ic>predicate(object)<\/ic>. <\/p>\n<p> In a conventional first-order predicate logic, we define the semantics in terms of a <em>model<\/em> or <em>interpretation<\/em> of the logic. (Technically, a logic and an interpretation aren&#8217;t quite the same thing, but for our purposes here, we don&#8217;t need to get into the difference.) <\/p>\n<p> An interpretation basically takes a <em>domain<\/em> consisting of a set of objects or values, and does two things:<\/p>\n<ol>\n<li> For each atomic symbol in the logic, it assigns an object from the domain. That value is called the <em>interpretation<\/em> of\tthe symbol.<\/li>\n<li> For each predicate in the logic, it assigns a set, called the <em>extension<\/em> of the predicate. The extension contains the tuples for which the predicate is true.<\/li>\n<\/ol>\n<p> For example, we could use logic to talk about Scientopia. The <em>domain<\/em> would be the set of bloggers, and the set of blogs. Then we could have predicates like &#8220;Writes&#8221;, which takes two parameters &#8211; A, and B &#8211; and which is true is A is the author of the blog B.<\/p>\n<p> Then the <em>extension<\/em> of &#8220;Writes&#8221; would be a set of pairs: { (MarkCC, Good Math\/Bad Math), (Scicurious, Neurotic Physiology), &#8230; }.<\/p>\n<p> We can also define the <em>counterextension<\/em>, which is the set of pairs for whiche the predicate is <em>not<\/em> true. So the counterextension of &#8220;writes&#8221; would contain values like { (MarkCC, Neurotic Physiology),  &#8230;}.<\/p>\n<p> Given a domain of objects, and the extension of each predicate, we know the meaning of statements in the logic. We know what objects we&#8217;re reasoning about, and we know the truth or falsehood of every statement. Importantly, we don&#8217;t need to know the counterextension of a predicate: if we know the extension, then the counterextension is simple the complement of the extension.<\/p>\n<p> In three-valued Lukasiewicz logic, that&#8217;s not true, for reasons that should be obvious: if <img src='http:\/\/l.wordpress.com\/latex.php?latex=I%28A%29&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='I(A)' style='vertical-align:1%' class='tex' alt='I(A)' \/> is the interpretation of the predicate <img src='http:\/\/l.wordpress.com\/latex.php?latex=A&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='A' style='vertical-align:1%' class='tex' alt='A' \/>, then the complement of <img src='http:\/\/l.wordpress.com\/latex.php?latex=I%28A%29&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='I(A)' style='vertical-align:1%' class='tex' alt='I(A)' \/> is <em>not<\/em> the same thing as <img src='http:\/\/l.wordpress.com\/latex.php?latex=I%28lnot%20A%29&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='I(lnot A)' style='vertical-align:1%' class='tex' alt='I(lnot A)' \/>. <img src='http:\/\/l.wordpress.com\/latex.php?latex=L_3&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='L_3' style='vertical-align:1%' class='tex' alt='L_3' \/> requires <em>three<\/em> sets for a predicate: the extension, the counterextension, and the <em>fringe<\/em>. The fringe of a predicate <img src='http:\/\/l.wordpress.com\/latex.php?latex=P&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='P' style='vertical-align:1%' class='tex' alt='P' \/> is the set of values <img src='http:\/\/l.wordpress.com\/latex.php?latex=x&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='x' style='vertical-align:1%' class='tex' alt='x' \/> for which <img src='http:\/\/l.wordpress.com\/latex.php?latex=P%28x%29&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='P(x)' style='vertical-align:1%' class='tex' alt='P(x)' \/> is <img src='http:\/\/l.wordpress.com\/latex.php?latex=N&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='N' style='vertical-align:1%' class='tex' alt='N' \/>.<\/p>\n<p> To be more precise, an interpretation <img src='http:\/\/l.wordpress.com\/latex.php?latex=I&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='I' style='vertical-align:1%' class='tex' alt='I' \/> for first order <img src='http:\/\/l.wordpress.com\/latex.php?latex=L_3&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='L_3' style='vertical-align:1%' class='tex' alt='L_3' \/> consists of:<\/p>\n<ol>\n<li> A set of values, <img src='http:\/\/l.wordpress.com\/latex.php?latex=D&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='D' style='vertical-align:1%' class='tex' alt='D' \/>, called the <em>domain<\/em> of the logic. This is the set of objects that the logic can be used to reason about.<\/li>\n<li> For each predicate <img src='http:\/\/l.wordpress.com\/latex.php?latex=P&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='P' style='vertical-align:1%' class='tex' alt='P' \/> of arity <img src='http:\/\/l.wordpress.com\/latex.php?latex=n&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='n' style='vertical-align:1%' class='tex' alt='n' \/> (that is, taking <img src='http:\/\/l.wordpress.com\/latex.php?latex=n&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='n' style='vertical-align:1%' class='tex' alt='n' \/> arguments), three sets <img src='http:\/\/l.wordpress.com\/latex.php?latex=ext%28P%29&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='ext(P)' style='vertical-align:1%' class='tex' alt='ext(P)' \/>, <img src='http:\/\/l.wordpress.com\/latex.php?latex=cext%28P%29&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='cext(P)' style='vertical-align:1%' class='tex' alt='cext(P)' \/>, and <img src='http:\/\/l.wordpress.com\/latex.php?latex=fringe%28P%29&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='fringe(P)' style='vertical-align:1%' class='tex' alt='fringe(P)' \/>, such that:\n<ul>\n<li> the values of the members of all three sets are members\t\t\t\tof <img src='http:\/\/l.wordpress.com\/latex.php?latex=D%5En&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='D^n' style='vertical-align:1%' class='tex' alt='D^n' \/>. <\/li>\n<li> the sets are mutually exclusive &#8211; that is, there is no\tvalue that is in more than one of the sets.<\/li>\n<li> the sets are <em>exhaustive<\/em>: <img src='http:\/\/l.wordpress.com\/latex.php?latex=ext%28P%29%20cup%20cext%28P%29%20cup%20fringe%28P%29%20%3D%20D%5En&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='ext(P) cup cext(P) cup fringe(P) = D^n' style='vertical-align:1%' class='tex' alt='ext(P) cup cext(P) cup fringe(P) = D^n' \/>.<\/li>\n<\/ul>\n<\/li>\n<li> For each constant symbol <img src='http:\/\/l.wordpress.com\/latex.php?latex=a&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='a' style='vertical-align:1%' class='tex' alt='a' \/> in the logic, an assignment of <img src='http:\/\/l.wordpress.com\/latex.php?latex=a&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='a' style='vertical-align:1%' class='tex' alt='a' \/> to some member of <img src='http:\/\/l.wordpress.com\/latex.php?latex=D&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='D' style='vertical-align:1%' class='tex' alt='D' \/>: <img src='http:\/\/l.wordpress.com\/latex.php?latex=I%28a%29%20in%20D&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='I(a) in D' style='vertical-align:1%' class='tex' alt='I(a) in D' \/><\/li>\n<\/ol>\n<p> With the interpretation, we can look at statements in the logic, and determine their truth or falsehood. But when we go through a proof, we&#8217;ll often have statements that don&#8217;t operate on specific values &#8211; they use <em>variables<\/em> inside of them. In order to make a statement have a truth value, all of the variables in that statement have to be <em>bound<\/em> by a quantifier, or <em>assigned<\/em> to a specific value by a variable assignment. So given a statement, we can frequently only talk about its meaning in terms of variable assignments for it.<\/p>\n<p> So, for example, consider a simple statement: P(x,y,z). In the interpretation I, P(x, y, z) is satisfied if  <img src='http:\/\/l.wordpress.com\/latex.php?latex=%28I%28x%29%2C%20I%28y%29%2C%20I%28z%29%29%20in%20ext%28P%29&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='(I(x), I(y), I(z)) in ext(P)' style='vertical-align:1%' class='tex' alt='(I(x), I(y), I(z)) in ext(P)' \/>; it&#8217;s dissatisfied if <img src='http:\/\/l.wordpress.com\/latex.php?latex=%28I%28x%29%2C%20I%28y%29%2C%20I%28z%29%29%20in%20cext%28P%29&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='(I(x), I(y), I(z)) in cext(P)' style='vertical-align:1%' class='tex' alt='(I(x), I(y), I(z)) in cext(P)' \/>. Otherwise, <img src='http:\/\/l.wordpress.com\/latex.php?latex=%28I%28x%29%2C%20I%28y%29%2C%20I%28z%29%29&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='(I(x), I(y), I(z))' style='vertical-align:1%' class='tex' alt='(I(x), I(y), I(z))' \/> must be in <img src='http:\/\/l.wordpress.com\/latex.php?latex=fringe%28P%29&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='fringe(P)' style='vertical-align:1%' class='tex' alt='fringe(P)' \/>, and then the statement is <em>undetermined<\/em>.<\/p>\n<p> The basic connectives &#8211; and, or, not, implies, etc., all have defining rules like the above &#8211; they&#8217;re obvious and easy to derive given the truth tables for the connectives, so I&#8217;m not going to go into detail. But it does get at least a little bit interesting when we get to quantified statements. But to talk about we need to first define a construction called a variant. Given a statement with variable assignment v, which maps all of the variables in the statement to values, an x-variant <img src='http:\/\/l.wordpress.com\/latex.php?latex=v%27&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='v'' style='vertical-align:1%' class='tex' alt='v'' \/> of <img src='http:\/\/l.wordpress.com\/latex.php?latex=v&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='v' style='vertical-align:1%' class='tex' alt='v' \/> is a variable assignment where for every variable <img src='http:\/\/l.wordpress.com\/latex.php?latex=y&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='y' style='vertical-align:1%' class='tex' alt='y' \/> <em>except<\/em> <img src='http:\/\/l.wordpress.com\/latex.php?latex=x&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='x' style='vertical-align:1%' class='tex' alt='x' \/>, <img src='http:\/\/l.wordpress.com\/latex.php?latex=v%27%28y%29%20%3D%3D%20v%28y%29&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='v'(y) == v(y)' style='vertical-align:1%' class='tex' alt='v'(y) == v(y)' \/>. In other words, it&#8217;s an assignment where all of the variables <em>except x<\/em> have the same value as in <img src='http:\/\/l.wordpress.com\/latex.php?latex=v&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='v' style='vertical-align:1%' class='tex' alt='v' \/>.<\/p>\n<p> Now we can finally get to the interpretation of quantified statements. Given a statement <img src='http:\/\/l.wordpress.com\/latex.php?latex=forall%20x%20P&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='forall x P' style='vertical-align:1%' class='tex' alt='forall x P' \/>, <img src='http:\/\/l.wordpress.com\/latex.php?latex=P&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='P' style='vertical-align:1%' class='tex' alt='P' \/> is <em>satisfied<\/em> by a variable assignment <img src='http:\/\/l.wordpress.com\/latex.php?latex=v&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='v' style='vertical-align:1%' class='tex' alt='v' \/> if <img src='http:\/\/l.wordpress.com\/latex.php?latex=P&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='P' style='vertical-align:1%' class='tex' alt='P' \/> is satisfied by <em>every<\/em> x-variant of <img src='http:\/\/l.wordpress.com\/latex.php?latex=v&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='v' style='vertical-align:1%' class='tex' alt='v' \/>; it&#8217;s <em>dissatisfied<\/em> if <img src='http:\/\/l.wordpress.com\/latex.php?latex=P&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='P' style='vertical-align:1%' class='tex' alt='P' \/> is dissatisfied by <em>at least<\/em> one x-variant of <img src='http:\/\/l.wordpress.com\/latex.php?latex=v&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='v' style='vertical-align:1%' class='tex' alt='v' \/>. Otherwise, it&#8217;s undetermined.<\/p>\n<p> Similarly, an existentially quantified statement <img src='http:\/\/l.wordpress.com\/latex.php?latex=exists%20x%20P&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='exists x P' style='vertical-align:1%' class='tex' alt='exists x P' \/> is <em>satisfied<\/em> by <img src='http:\/\/l.wordpress.com\/latex.php?latex=v&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='v' style='vertical-align:1%' class='tex' alt='v' \/> if <img src='http:\/\/l.wordpress.com\/latex.php?latex=P&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='P' style='vertical-align:1%' class='tex' alt='P' \/> is satisfied by at least one x-variant of <img src='http:\/\/l.wordpress.com\/latex.php?latex=v&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='v' style='vertical-align:1%' class='tex' alt='v' \/>; it&#8217;s dissatisfied if <img src='http:\/\/l.wordpress.com\/latex.php?latex=P&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='P' style='vertical-align:1%' class='tex' alt='P' \/> is dissatisfied by <em>every<\/em> x-variant of v. Otherwise, it&#8217;s undetermined.<\/p>\n<p> Finally, now, we can get to the most important bit: what it means for a statement to be true or false in <img src='http:\/\/l.wordpress.com\/latex.php?latex=L_3&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='L_3' style='vertical-align:1%' class='tex' alt='L_3' \/>. A statement <img src='http:\/\/l.wordpress.com\/latex.php?latex=S&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='S' style='vertical-align:1%' class='tex' alt='S' \/> is <img src='http:\/\/l.wordpress.com\/latex.php?latex=T&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='T' style='vertical-align:1%' class='tex' alt='T' \/> (true) if it is satisfied by <em>every<\/em> variable assignment on <img src='http:\/\/l.wordpress.com\/latex.php?latex=I&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='I' style='vertical-align:1%' class='tex' alt='I' \/>;  it&#8217;s <img src='http:\/\/l.wordpress.com\/latex.php?latex=F&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='F' style='vertical-align:1%' class='tex' alt='F' \/> (false) if it&#8217;s dissatisfied by every variable assignment on <img src='http:\/\/l.wordpress.com\/latex.php?latex=I&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='I' style='vertical-align:1%' class='tex' alt='I' \/>, and it&#8217;s <img src='http:\/\/l.wordpress.com\/latex.php?latex=N&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='N' style='vertical-align:1%' class='tex' alt='N' \/> otherwise.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Before we can move from three-valued logic to fuzzy logic, we need to take a look at semantics &#8211; both how conventional two-valued logic handle semantics, and how three-valued logics extend the basic semantic structure. This isn&#8217;t exactly one of the more exciting topics I&#8217;ve ever written about &#8211; but it is important, and going [&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":[87],"tags":[166,193],"class_list":["post-1349","post","type-post","status-publish","format-standard","hentry","category-fuzzy-logic","tag-fuzzy-logic-2","tag-logic-2"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p4lzZS-lL","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/posts\/1349","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=1349"}],"version-history":[{"count":0,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/posts\/1349\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/media?parent=1349"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/categories?post=1349"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/tags?post=1349"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}