[Mulgara-dev] Re: Bug list and versions
Life is hard, and then you die
ronald at innovation.ch
Mon Nov 13 23:04:46 CST 2006
On Tue, Nov 14, 2006 at 10:48:48AM +1000, Andrae Muys wrote:
>
> On 14/11/2006, at 9:51 AM, Life is hard, and then you die wrote:
[snip]
> >you get one line for every matching $b, just as expected. So it's just
> >in the context of an OR that things don't work. I understood OR to be
> >a set-theoretic union, so it shouldn't matter if I do one query with
> >3 OR terms, or 3 queries each with only one of the OR terms.
>
> OR is not strictly speaking a set-theoretic union, but a disjunction.
>
> So given the following tuples:
>
> A $a $b B $a $b
> 1 5 2 6
> 2 7
>
> the actual semantics are not tabular, but logical:
>
> A = { {a->1, b->5} } implies (a==1) ^ (b==5) -> #t
> B = { {a->2, b->6}, {a->2, b->7} } implies ((a==2) ^ (b==6)) v
> ((a==2) ^ (b==7)) -> #t
>
> and consequently
>
> A or B |- ((a==1) ^ (b==5)) v ((a==2) ^ (b==6)) v ((a==2) ^ (b==7)) -
> > #t
>
> which in sets-of-bindingsets notation is
> { {a->1, b->5}, {a->2, b->6}, {a->2, b->7} }
> and in tabular format is:
>
> A or B $a $b
> 1 5
> 2 6
> 2 7
>
> Given
>
> C = { {a->2, c->8} }
>
> A or C |- ((a==1) ^ (b==5) v ((a==2) ^ (c==8))
> ie. { {a->1, b->5}, {a->2, c->8} }
> which in tabular format is:
>
> A or C $a $b $c
> 1 5 -
> 2 - 8
>
> So you are right, disjunction is isomorphic with set-theoretic union,
> and indeed when the propositions represented by the various tuples
> are or'ed the result is the set-theoretic union of their variable
> bindings; but the interface to that result is via a tabular form.
> Consequently we have these "binding-doesn't-exist"/"don't
> care"/"variable unbound" (whatever you want to call it) values
> turning up in the mapping from the logical proposition to the table.
> These values are not NULL's, rather they are DONTCARE's - they
> literally indicate that the truth value of that term in the sum-of-
> products form is independent of that variable.
Thanks for the detailed explanation. I tend to think in in terms of
sets of tuples, hence my interpretation. The 'A or C' then becomes the
union of an inverse-projection
----- -----
pr_ab(A) u pr_ac(C)
(where pr_ab is the projection from {(a,b,c)} to {(a,b)}), i.e. the
DONTCARE's are all possible values. But like you say, the two views
are (or should be) isomorphic.
Cheers,
Ronald
More information about the Mulgara-dev
mailing list