Re: More on lists and sets
- From: "Mikito Harakiri" <mikharakiri_nospaum@xxxxxxxxx>
- Date: 20 Mar 2006 18:59:22 -0800
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.
.
- References:
- More on lists and sets
- From: David Cressey
- Re: More on lists and sets
- From: Mikito Harakiri
- Re: More on lists and sets
- From: Mikito Harakiri
- More on lists and sets
- Prev by Date: Re: More on lists and sets
- Next by Date: Re: More on lists and sets
- Previous by thread: Re: More on lists and sets
- Next by thread: Re: More on lists and sets
- Index(es):
Relevant Pages
|
|