Re: Principle of Orthogonal Design(B

From: David BL(B <davidbl_at_iinet.net.au>
Date: Thu, 7 Feb 2008 15:19:04 -0800 (PST)
Message-ID: <8d716ed3-0828-4c74-a4f0-44ac88f9214f_at_v46g2000hsv.googlegroups.com>


On Feb 8, 4:43 am, Marshall <marshall.spi..._at_gmail.com> wrote:
> On Feb 7, 3:46 am, David BL <davi..._at_iinet.net.au> wrote:
>
>
>
>
>
> > On Feb 7, 6:44 pm, JOG <j..._at_cs.nott.ac.uk> wrote:
> > > On Feb 7, 1:13 am, David BL <davi..._at_iinet.net.au> wrote:
> > > > On Feb 7, 2:45 am, Marshall <marshall.spi..._at_gmail.com> wrote:
>
> > > > It seems to me that a role name is tied to a complete sentence that a
> > > > variable appears in. In the following example
>
> > > > parent(P,C) :- P is the parent of child C.
>
> > > > P has the role of "parent", and C has the role of "child".
>
> > > > Now consider
>
> > > > grandparent(GP,GC) :- parent(GP,P), parent(P,GC).
>
> > > In terms of Marshall's example of a join I see the above as saying:
> > > $B"P(Bx parent(p:a,c:x) $B"J(B parent(p:x,c:b) $B"N(B grandparent(gp:a,gc:b)
>
> > A minor comment: when I see '$B"N(B' I assume it means all apparently free
> > variables are in fact bound and are implicitly universally
> > quantified.
>
> As I understand it, this is conventional for all theorems and axioms,
> whether there is an <=> in them or not.

Perhaps. I've seen some people only drop explicit universal quantifiers when they use =>.

I had thought the reason for introducing '$B"*(B' was to avoid this implicit universal quantification that was customary with '=>'.

> > Therefore your existential quantifier seems redundant to me.
>
> Um, how?

I think I got that wrong because of the bidirectional implication.

Consider we write

    parent(p:a,c:x) $B"J(B parent(p:x,c:b) => grandparent(gp:a,gc:b)

and assume the "free" variables a,b,x are in fact all implicitly universally quantified. When the quantification of x is brought into the antecedent it becomes existential.

>
> > Also note that
>
> > ($B"P(Bx p(x)) $B"*(B q
> > $B"N(B ~($B"P(Bx p(x)) $B"K(B q
> > $B"N(B ($B"O(Bx ~p(x)) $B"K(B q
> > $B"N(B $B"O(Bx (~p(x) $B"K(B q)
> > $B"N(B $B"O(Bx (p(x) $B"*(B q)
>
> > so I'd be careful not to inadvertently create confusion with the scope
> > of that existential quantifier. I guess it's customary for $B"N(B to have
> > a lower precedence?
>
> Different authors use different syntax. It is probably best in a
> context with diverse authors (such as a newsgroup) to use
> a very explicit syntax, such as
>
> (Ax)(f)
>
> Not that I follow my own advice.
>
>
>
>
>
> > > But even better, if we use the set enumerations of the predicates, we
> > > can state the result of a join using standard set builder notation:
> > > Grandparents = { {gp:a, gc:b} | {p:a, c:x}, {p:x, c:b} $B":(B Parents }
>
> > > Mmmm, set notation = tasty goodness.
>
> > > > Within the conjunctive query on the rhs, there are three distinct
> > > > roles: grandparent GP, parent P and grandchild GC.
>
> > > > In the syntax
>
> > > > P(a=y, b=x) & Q(a=x, b=z)
>
> > > > I don't see any reason why we can't think of 'x', 'y' and 'z' as the
> > > > three role names in the result relation.
>
> > > I'm unclear what you mean here - x,y and z are values no?
>
> > I would say they are free variables that have not yet bound to any
> > value.
>
> >http://en.wikipedia.org/wiki/Free_variable
>
> > I was thinking that predicate P implicitly has two free variables
> > named a,b and in the expression P(a=y, b=x), those implicit a,b have
> > been bound (in this case to free variables named x,y).
>
> Well, at the very least we have to be careful to distinguish
> the use of the equals sign between its use as the equality
> relation and its use as name-binding.

In a way I don't really see a fundamental distinction. I think the special syntax is needed to deal with variable names that are local to a sub-expression, because with implicit variable names on predicates we can get name clashes. These would be impossible to deal with if all variables had global scope.

> But yeah, there is a close relationship between variable names
> and attribute names.

As an example, we could think of

    x > y

as a relation with attributes named x,y

If relation P has attributes y,z then the expression

    P & (x > y)

could be regarded as shorthand for

    P(y,z) & (x > y)

which can be regarded as join between two relations using common attribute y.

Suppose we want to project away y so only x,z are left in the result set. Then we use existential quantification on y:

    (Ey) (P(y,z) & (x > y))

> > I would think P(a=y) could be interpreted as a predicate with free
> > variables named y and b. ie there is the option of only renaming a
> > subset of the implicit free variables.
>
> > Furthermore the syntax could support binding or renaming of free
> > variables in arbitrary expressions. Eg
>
> > (P(a=y, b=x) & Q(a=x, b=z)) (x=w)
>
> > has free variables w,y,z.
>
> I guess you're using '=' as name binding here.
> (Wouldn't it be better to bind x *before* its use?)

Yes, it was only for illustration. Received on Fri Feb 08 2008 - 00:19:04 CET

Original text of this message