set

A set is a collection of objects, called elements or members of the set.

Formally, a set S is constructed

S={s1,s2,}

where si are the elements of S.


If an element a is a member of set A, we say aA.

Sets are uniquely characterized by their elements; two sets that have precisely the same elements are equal as sets (they are the same set). In defining a set, ordering of elements does not matter.

The number of elements in a set is its cardinality.
There is a unique set with no elements called the empty set (written ).
A set may be finite or infinite.


In set-builder notation, a set S is constructed

S={x:Φ(x)}

where the colon is read as "such that", "for which", or "with the property that";
the formula Φ(x) is the indicator function, where all values of x for which Φ(x)=true have set membership, and any value of x for which Φ(x)=false does not have set membership.

In general, it is good practice to establish a universe that serves as the domain for our indicator function. However, it is also good practice to specify the domain explicitly when defining a set.

We typically write, for a domain E,

S={xE:Φ(x)}

which is equivalent to

S={x:xE AND Φ(x)}

An extension of set-builder notation replaces the single variable x with a formula f(x):

S={f(x):Φ(x)}

which should be read as

S={y:x(y=f(x)Φ(x)}

i.e. "the set of values y output by f(x) for each input x which satisfies Φ(x)"

Example 1

{2n:nN} is the set of all even natural numbers

Example 2

Q={pq:p,qZ,q0} is the set of rational numbers


Powered by Forestry.md