| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: A Logical Model for Lists as Relations
vc wrote:
> Jay Dee wrote:
>
>>vc wrote:
>>>data Nat = Zero | Succ Nat >> >>Others might write `0, nat+1: nat'
You're making my point...
[snip]
> I am sorry but the 'bunch' vs. set juxtaposition just does not make any
> obvious sense. As soon as you talk about a 'bunch', 'herd', 'pack' of
> 'set', the intuition is the same: a collection of some elements. It's
> not important whether or not you use the pretty curly brackets.
>
>>The empty bunch is null and the empty set is {null}.
>>Strings consist of items which may be any boolean, number, character, >>non-empty bunch, or set. Strings are catenated with ; (semicolon). >>So >> 17; 42; A; 17 >>is a string of length 4.
As above, ; and [] are operators, not merely punctuation, and when items are packaged, more operators can be defined.
>> Items in a string can be referred to by >>their 0-origin ordinal position. Ordering is defined as lexical and >>the < = > &c operators are defined. Indexing? You bet! Slicing? >>Of course! >> >>Lists are to strings as sets are to bunches. >> 17; 42; A; 17 is a string >> [17; 42; A; 17] is a list
In the full description there are significant differences. {} is an operator that constructs sets; there is a symmetric operator that turns them into bunches. The point is that there are more operators available for sets than there are bunches -- just as there are more operators available on lists than there are on strings.
>>Catenation can be defined on lists: >> [A] + [B] = [A; B] >>So can mapping, composition, &c -- all it takes is definition. >> >>Empty strings and empty lists? Call 'em nil and [nil].
Well, sure: once you've got sets you can have subsets and powersets and intersections and union on sets rather than union on elements.
Lists provide operators for composition and modification via indices -- what the perl crowd likes to call slicing.
There is more to all these -- and I'm not trying to convert anyone or preach my religion. The point is that there are other welldeveloped theories that use the same word to mean different things.
Remember Kenneth Iverson? I used his notation for quite a while -- still do, as a matter of fact -- and it ain't like very many other things. Received on Thu May 11 2006 - 21:09:12 CDT
![]() |
![]() |