Talk:Set (abstract data type)

From Wikipedia, the free encyclopedia
Jump to: navigation, search
WikiProject Computer science (Rated Start-class, High-importance)
WikiProject icon This article is within the scope of WikiProject Computer science, a collaborative effort to improve the coverage of Computer science related articles on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Start-Class article Start  This article has been rated as Start-Class on the project's quality scale.
 High  This article has been rated as High-importance on the project's importance scale.
 

Contains vs. Belongs[edit]

In set theory, the terms "contains" and "belongs" have well-established, non-overlapping standard meanings. The predicate "contains" (\supseteq) is strictly a relation between two subsets of the same set: "A contains B" means "B is a subset of A". The relationship between a set and its elements (\in) is read either "belongs" or "is in": "x belongs to A" is the same as "x is an element of A". The symmetric predicate (\ni) is rarely used, and may be read "has" or "owns", never "contains". So, to avoid conflict with the mathematical tradition, methinks that the best choice for the abstract set type operations would be

belongs(x,S)x \in S, and
subset(S,T)S\subseteq T.

All the best, --Jorge Stolfi (talk) 23:58, 22 May 2009 (UTC)


Setoids[edit]

What is a setoid? Is this appropriate for the page that is linked to describe std::set?