[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-developer] Set Any and SXHASH
From: |
Waldek Hebisch |
Subject: |
Re: [Axiom-developer] Set Any and SXHASH |
Date: |
Thu, 5 Apr 2007 15:37:04 +0200 (CEST) |
> In http://wiki.axiom-developer.org/347BugInMapSet
>
> 'oklhazi' reported that "map confuses sets" and gives
> the example
>
> A:=set [-2,-1,0]
> B:=set [0,1,4]
> C:=map(x +-> x^2,A)
> test(C=B)
>
> where the map operation produces a "Set" C with the same
> elements as B but which is not equal to B, thus violating
> a major axiom of set theory.
>
> The documentation for Set
>
> http://wiki.axiom-developer.org/axiom--test--1/src/algebra/SetsSpad
>
> says, (in part):
>
> ++ In our implementation, \Language{} maintains the entries
> ++ in sorted order. Specifically, the parts function returns
> ++ the entries as a list in ascending order and the extract
> ++ operation returns the maximum entry.
>
> but the example shows that this is not true even if the Set
> is composed of elements from a domain which has OrderedSet.
> In the #347 I proposed a simple patch to correct this
> behaviour but it is easy to show that it still fails if the
> element domain is not an OrderedSet.
>
I would say that sorting elements of Set is a design bug.
Namely, without any support form domain specific code it is
hard to define linear order. AFAICS in Axiom only domains
which have OrderedSet are eqipped with linear order.
> So my question for Axiom Developers and Lisp aficionados is
> what is your opinion of the use of SXHASH? How well does SXHASH
> behave in GCL? What might be a reasonable alternative for
> defining a total ordering on the elements of a Set given the
> possibility of the type 'Set Any'?
>
Hashing allows reasonably efficient implementation of set
operations.
--
Waldek Hebisch
address@hidden
- [Axiom-developer] Set Any and SXHASH, Bill Page, 2007/04/04
- Re: [Axiom-developer] Set Any and SXHASH,
Waldek Hebisch <=
- RE: [Axiom-developer] Set Any and SXHASH, Bill Page, 2007/04/05
- Re: [Axiom-developer] Set Any and SXHASH, Waldek Hebisch, 2007/04/05
- RE: [Axiom-developer] Set Any and SXHASH, Bill Page, 2007/04/05
- Re: [Axiom-developer] Set Any and SXHASH, Waldek Hebisch, 2007/04/05
- RE: [Axiom-developer] Set Any and SXHASH, Bill Page, 2007/04/05
- Re: [Axiom-developer] Set Any and SXHASH, Waldek Hebisch, 2007/04/06
- RE: [Axiom-developer] Set Any and SXHASH, Bill Page, 2007/04/06
- Re: [Axiom-developer] Set Any and SXHASH, Martin Rubey, 2007/04/06