Skip to content
Prev 47593 / 63424 Next

suggestion for "sets" tools upgrade

As a mathematician by training (and a former practicing mathematician, 
both of which qualifications I rarely feel compelled to pull out of the 
closet), I have to agree with Michael's challenge to the original 
assertion about the "mathematical concept of sets".

Sets are collections of distinct objects (at least in Cantors' original 
naive definition) and do not have a notion of "duplicate values".  In 
the modern axiomatic definition, one axiom is that "two sets are equal 
if and only if they contain the same members". To expand on Michael's 
example, the union of {1, 2} with {1, 3} is {1, 2, 3}, not {1, 2, 1, 3} 
since there is only one distinct object designated by the value "1".

A computer programming language could choose to use the ordered vector 
(or list) [1, 2, 1, 3] as an internal representation of the union of 
[1,2], and [1,3], but it would then have to work hard to perform every 
other meaningful set operation.  For instance, the cardinality of the 
union still has to equal three (not four, which is the length of the 
list), since there are exactly three distinct objects that are members. 
And, as Michael points out, the set represented by [1,2,3] has to be 
equal to the set represented by [1,2,1,3] since they contain exactly the 
same members.

   Kevin
On 2/6/2014 9:39 PM, R. Michael Weylandt wrote: