Path: utzoo!attcan!uunet!ncrlnk!ncr-mpd!Chuck.Phillips From: Chuck.Phillips@FtCollins.NCR.COM (Chuck.Phillips) Newsgroups: comp.databases Subject: Re: errors and 4 valued logic (long) Message-ID: Date: 11 Nov 90 15:47:27 GMT References: <694@creatures.cs.vt.edu> <32358@netnews.upenn.edu> Sender: news@ncr-mpd.FtCollins.NCR.COM Distribution: na Organization: NCR Microelectronics, Ft. Collins, CO Lines: 107 In-reply-to: aaron@grad2.cis.upenn.edu's message of 6 Nov 90 14:22:10 GMT >>>>> On 6 Nov 90 14:22:10 GMT, aaron@grad2.cis.upenn.edu (Aaron Watters) said: Aaron> The question at hand is: What are the appropriate truth values Aaron> for the following statements Aaron> B: `the king of north america is Bald.' Aaron> H: `the king of north america has Hair.' Aaron> G: `I am Green years old.' Aaron> I don't agree at all. B=not H. To steal a line, "I don't agree with your disagreement". _Both_ B and H assume the existence of a unique (follows from the use of "the king" as opposed to "a king") king of North America. To make explicit the implicit: B1: There exists exactly one king of North America. -and- B2: The king of North America is bald. H1: There exists exactly one king of North America. -and- H2: The king of North America is not bald. It is true that B2 and H2 cannot both be true. Further, since B1=H1=FALSE, it follows (B1 and B2)=(H1 and H2)=B=H=FALSE. (If two people claim to be Napoleon, they can't both be correct, but they can both be wrong.) Even if you negate both statements: not B: There is no bald king of North America. not H: There is no non-bald king of North America. As one would expect, both of these statements are true. Consistentcy reigns, even if the king of North America does not. :-) Aaron> Since at an intuitive level I can admit neither B or H as a true Aaron> statement, I am forced to consider an additional truth value called Aaron> `error' (or `overdefined') in order to deal with such statements. Although, I don't see it as _necessary_ (an N-valued logic can be modelled by a 2-value logic for any finite N), perhaps there is some common ground here. With DBMSs, the problem with using a two valued logic, IMHO, is that it is _useful_ to allow both domain violations and uncertainties to be stated _explicitly_ instead of always deriving them by implication. You _can_ model properties as abstract as existence and temporal relations using only a 2-valued logic, but it gets to be awkward, requires storing information about meaningless impossibilities (e.g. modelling existence) and/or an explosion in the number of required variables (e.g. temporal relations). Allowing the explicit "unknown-but-in-domain" semantic can help eliminate (if not eliminate) the special case-ing currently required to implement outer joins. Because it is _also_ useful to allow an explicit "out-of-domain" semantic, we're left with a 4-valued logic to maximize robustness, clairity, concisness of expression and (I believe) performance for certain types of queries. Aaron> (I've had personal correspondence with a constructivist who argues Aaron> that B must be true since we cannot produce a hair off the king's Aaron> head -- I maintain this does violence to ordinary common sense, even Aaron> if it is an internally consistent position.) Ha! I used similar "reasoning" to argue in a Biology class that sterility _was_ inheirited and that it was a dominant trait. After all, if your parents don't have children, you won't either. :-) But seriously, neither of these positions is even "internally consistent". Both contradict observable reality, and are therefore false. > To call both of these [B and G?] >false, your database wants rules that say >1. The domain for every object/entity must be completely defined. >2. Any purported value which does not fall within the appropriate domain is > reported as an error. >3. Any reference to a value which does not exist (but would fall within an > appropriate domain if it did exist) is reported as an error. >Glenn Holliday holliday@csgrad.cs.vt.edu In a 2-valued logic, G either would be disallowed altogether, being out of domain, or else evaluate to false. (Implicit assumption: Green is a measure of time.) In the 4-valued logic discussed, G would be error. Regarding your three assertions: For the 4-valued logic discussed to be particularly useful, 2 and 3 are needed. Though 1 is desirable, it is not essential. A. You can explicitly assign the value of error. B. A partial domain definition is still often useful. Example: Defining the domain as an integer will yield an error value when an attempt is made to assign a string to the cell, even though the _real_, but unenforced, domain is the set of integers between 1 and 10. Not ideal, but still useful. C. Operations on "unknown" values still preserve more information than the current system. (e.g. "(true OR unknown)=true", vs. "(true OR null)=null".) Aaron> PS: recap of my position B=H=error. G=false. And mine: B=H=false. G=error. Recursive conclusion: We can't both be right, but we can both be wrong. :-) Cheers, -- Chuck Phillips MS440 NCR Microelectronics chuck.phillips%ftcollins.ncr.com 2001 Danfield Ct. Ft. Collins, CO. 80525 ...uunet!ncrlnk!ncr-mpd!bach!chuckp