# Re: NULLs: theoretical problems?

From: Jan Hidders <hidders_at_gmail.com>
Date: Thu, 23 Aug 2007 10:12:44 -0000

On 23 aug, 01:12, "Evan Keel" <evank..._at_sbcglobal.net> wrote:
> "Jan Hidders" <hidd..._at_gmail.com> wrote in message
>
> news:1187811230.504947.11400_at_x40g2000prg.googlegroups.com...> On 22 aug, 17:37, "V.J. Kumar" <vjkm..._at_gmail.com> wrote:
> > > Jan Hidders <hidd..._at_gmail.com> wrote
>
>
>
>
> > > > On 22 aug, 13:23, "V.J. Kumar" <vjkm..._at_gmail.com> wrote:
> > > >> Jan Hidders <hidd..._at_gmail.com> wrote
>
> > > >> > On 22 aug, 00:06, "V.J. Kumar" <vjkm..._at_gmail.com> wrote:
> > > >> >> Jan Hidders <hidd..._at_gmail.com> wrote
> > > >> >> innews:1187729150.610272.117790_at_r29g2000hsg.googlegroups.com:
> > > >> >> >> I do not understand. You have:
>
> > > >> >> >> DEF y y DEF y:y
> > > >> >> >> 1 1 1 (1)
> > > >> >> >> 1 0 0 (2)
> > > >> >> >> 0 0 (3)
>
> > > >> >> >> So 'DEF y:y' will give the same result when y is either
> > > >> >> >> undefined or 'false', rows (2) and (3). How is it not
> > > >> >> >> substituting 'false' for undefined ?
>
> > > >> >> > In the way that if y is undefined then "DEF y : f" is not always
> > > >> >> > equivalent with "f[y/false]" i.e. "f" with all free occurrence
> > > >> >> > of y replaced with "false".
>
> > > >> >> I do not understand. Could you show what you mean with an example
> > > >> >> ?
>
> > > >> > If y is undefined then "DEF y : NOT(y)" evaluates to "false".
>
> > > >> Is it not what line(3) shows and what SQL queries do, namely
> > > >> substituting 'false' for unknown ?
>
> > > > Yes, it is what line 3 shows, but I would not describe that as
> > > > "substituting 'false' for unknown".
>
> > > In your language, the expression 'def y:x AND y' where 'y' is
> > > 'undefined' evaluates to 'false'. In SQL, the expression 'x AND y'
> where
> > > 'y'is 'unknown' evaluates to 'unknown'. The effect of having a
> predicate
> > > that evaluates to 'unknown' is the same as having a predicate that
> > > evaluates to 'false': no rows will be selected. That's what I meant by
> > > "substituting 'false' for unknown".
>
> > That's not exactly the same because there are formulas f(x) that
> > evaluate to 'true' if x is 'unknown'.
>
> You wrote formulas f(x) that
>
> > evaluate to 'true' if x is 'unknown'.
>
> You meant a function, right?

No, I meant formula. But a formula can be interpreted (or even defined) as a function that returns a truth value.

• Jan Hidders
Received on Thu Aug 23 2007 - 12:12:44 CEST

Original text of this message