Re: A Logical Model for Lists as Relations

From: David Cressey <dcressey_at_verizon.net>
Date: Sat, 13 May 2006 12:05:31 GMT
Message-ID: <fYj9g.515$nq5.387_at_trndny06>


"JOG" <jog_at_cs.nott.ac.uk> wrote in message news:1147467334.905572.107190_at_y43g2000cwc.googlegroups.com...
> Bob Badour wrote:
> > JOG wrote:
> >
> > > Marshall Spight wrote:
> > >
> > >>JOG wrote:
> > >>
> > >>>Marshall Spight wrote:
> > >>>
> > >>>>But a list can be described as a relation. Most simply, an infinite
> > >>>>list is a relation from the natural numbers to the target set,
> > >>>>and a finite list is a relation from some finite contiguous subset
> > >>>>[0..n] of the naturals to the target set. Generalizing, we could
> > >>>>describe an n-ary list as a relation with an index attribute and
> > >>>>zero or more other attributes.
> > >>>
> > >>>Do you not find this unsatisfying though?
> > >>
> > >>Actually, I find it quite satisfying, since it means I can, for
> > >>example,
> > >>use the full power of the relational algebra for selection on lists.
> > >>
> > >>
> > >>>By doing this one is altering
> > >>>information that is ordinal in nature to being cardinal.
> > >>
> > >>I don't understand this statement. Can you expand?
> > >
> > >
> > > "The order of the primeministers were Blair, major, thatcher" =
> > > "Blair was prime minister after Major."
> > > "Major was prime minister after Thatcher."
> > >
> > > Hence A satisfying relation (to me ;) representing this list is:
> > > { (Blair, Major), (Major, Thatcher) }
> > >
> > > This ordinal representation does not need to include cardinal indeces,
> > > and to my eyes that's a good thing as where did they exist in the
> > > original propositions?
> >
> > You will run into problems when you get to things like:
> >
> > { (MacDonald, Laurier), (Laurier, MacDonald), (MacDonald, Laurier) }

>

> Indeed. This makes me think something suspicious is going on if we view
> lists, where repetition of elements is somehow acceptable, as a
> fundamental construct. Either we have to invent indeces or we seem to
> have a problem with set representation.
>

I'm suspicious as well, but my suspicions are at the semantic level. The above is not a list of Prime ministers,
but a list of governments. We are using the PM as a token of the government that the PM led.

In the US, if you are building a list of US presidents, Grover Cleveland appears once in the list. If you are building a list of presidencies, Cleveland appears twice.

Off topic: Isn't it in "The Mikado" where there's a song "I have a little List"? Received on Sat May 13 2006 - 14:05:31 CEST

Original text of this message