Re: Is a function a relation?

From: Marshall <marshall.spight_at_gmail.com>
Date: Tue, 23 Jun 2009 20:15:59 -0700 (PDT)
Message-ID: <158a06c8-e95e-4b55-8aca-89770ae0c7c8_at_s1g2000prd.googlegroups.com>


On Jun 22, 10:35 pm, David BL <davi..._at_iinet.net.au> wrote:
> On Jun 23, 1:09 pm, Keith H Duggar <dug..._at_alum.mit.edu> wrote:
>
>
>
> > You considered the wrong relation values having the wrong
> > attribute names. Here are the correct values
>
> >    f(x) = x+1 -> { (domain,range) | range = domain + 1 }
> >    g(y) = y+1 -> { (domain,range) | range = domain - 1 }
>
> > corresponding to the f(x) and g(y) you gave.
>
> So you're suggesting that a function is a relation where a special
> convention has been followed in the choice of attribute names?  Yes
> that's one way of looking at it. That would in fact suggest the
> interesting idea that one can use the RA to define functions.  E.g.
> start with some n-ary relation and use projection to get a binary
> relation, and rename as required according to this special naming
> convention.

That's possible, but I think the better approach is to keep function attributes at the same level of nesting as is done with relation attributes: at the top wherever possible.

Consider the case of composition. It gets quite complicated! But the complication is all on the shoulders of the type system implementer. The programmer will be much happier that way than if we introduce nesting and special conventions, etc.

Marshall Received on Wed Jun 24 2009 - 05:15:59 CEST

Original text of this message