Set (source code)

= Set
{wiki=Set_(mathematics)}

A set is a collection of distinct objects regarded as its <set elements>. Membership, written $a\in A$, is the basic question: is $a$ one of the objects in $A$? For example, $\{1,2,2\}=\{1,2\}=\{2,1\}$: repeated entries and their written order do not change a <set>. A <multiset> retains multiplicities, while a <tuple> retains positions as well. Choosing the right object therefore determines which distinctions the mathematics remembers.

A <set> can collect possible outcomes of a <probability space>, vertices of a <graph>, or allowed inputs of a <function>. The <empty set> contains none; a <subset> selects members of a previously given <set>; the <power set> collects every such selection. These constructions are useful because they can be stated once and reused regardless of what the members represent. In an axiomatic account, rules such as the <axiom schema of separation> specify which collections exist as <sets>.