Newbie: Truth values (three-valued logic)

Gordon McMillan gmcm at hypernet.com
Fri Jun 18 10:57:47 EDT 1999


Olaf Delgado writes:

[three valued logic: one interpretation of "not maybe"]

> Okay, but this kind of intuitive semantics is not what I need here.
> The negation of "Maybe, I'll go to the cinema tomorrow." should be
> "Maybe, I wan't go to the cinema tomorrow.". By the way, this is IMO
> another, stronger argument against hardwiring multi-valued logics
> into a programming language. There may be different, equally
> justified views on what the natural behaviour would be.

Note that, if you want to retain DeMorgan's Laws, you don't have 
much choice. ANSI SQL defines a three valued logic which meets these 
conditions, and comes up with 
  NOT maybe == maybe
(well, NOT unknown == unknown), which makes sense as long as you 
rmember that NOT is an operator, and the result of a non-trivial 
operation on an unknown operand is probably unknown.

Which is why most DBA's won't allow NULL values in any column that 
might be used in a WHERE clause - three valued logic is often 
non-obvious.

Then there's fuzzy logic, where MAYBE is a whole range of values, and 
the rules are different.

- Gordon




More information about the Python-list mailing list