Re: More on lists and sets

From: Mikito Harakiri <mikharakiri_nospaum_at_yahoo.com>
Date: 20 Mar 2006 18:59:22 -0800
Message-ID: <1142909961.901329.295930_at_e56g2000cwe.googlegroups.com>


Mikito Harakiri wrote:
> Mikito Harakiri wrote:
> > Definition. List intersection is a cartesian product with equijoin of
> > the list nodes and lexicographic order. Example: 1->2->1 /\ 2->1->2 =
> > 2->1->1->2
> >
> > 2 2
> > ^ ^
> > | \
> > 1 1 ------> 1
> > ^ ^
> > | \
> > 2 2
> > 1 -> 2 -> 1
> >
>
> This is actually amusing. Selection from list is join of two lists.

It just occured to me that conventional meaning of join of two lists is their concatenation. The conventional terminology is absurd, of course. Join is intersection and list intersection is quite different from list concatenation.

> As
> join/intersection is noncommutative, we have left selection and right
> selection. Example:

>

> Select all the elements greater than one from list
>

> 1->2->1->3->2
>

> Formally we evaluate either
>

> 1->2->1->3->2 /\ 'x>1'
>

> or
>

> 'x>1' /\ 1->2->1->3->2
>

> The "list predicate" `x>1' evaluates to infinite list 2->3->4->5->...
>

> Therefore:
>

> 1->2->1->3->2 /\ 'x>1' = 2->2->3
>
> 'x>1' /\ 1->2->1->3->2 = 2->3->2

To add to this, list selection with equality predicate is commutative. Received on Tue Mar 21 2006 - 03:59:22 CET

Original text of this message