Algebra of sets

It also provides systematic procedures for evaluating expressions, and performing calculations, involving these operations and relations.

Any set of sets closed under the set-theoretic operations forms a Boolean algebra with the join operator being union, the meet operator being intersection, the complement operator being set complement, the bottom being ⁠

⁠ and the top being the universe set under consideration.

Just as arithmetic addition and multiplication are associative and commutative, so are set union and intersection; just as the arithmetic relation "less than or equal" is reflexive, antisymmetric and transitive, so is the set relation of "subset".

It is the algebra of the set-theoretic operations of union, intersection and complementation, and the relations of equality and inclusion.

The binary operations of set union (⁠

Several of these identities or "laws" have well established names.

[2] The union and intersection of sets may be seen as analogous to the addition and multiplication of numbers.

Like addition and multiplication, the operations of union and intersection are commutative and associative, and intersection distributes over union.

However, unlike addition and multiplication, union also distributes over intersection.

⁠ are the identity elements for union and intersection, respectively.

Unlike addition and multiplication, union and intersection do not have inverse elements.

However the complement laws give the fundamental properties of the somewhat inverse-like unary operation of set complementation.

The preceding five pairs of formulae—the commutative, associative, distributive, identity and complement formulae—encompass all of set algebra, in the sense that every valid proposition in the algebra of sets can be derived from them.

Note that if the complement formulae are weakened to the rule ⁠

⁠, then this is exactly the algebra of propositional linear logic[clarification needed].

These are examples of an extremely important and powerful property of set algebra, namely, the principle of duality for sets, which asserts that for any true statement about sets, the dual statement obtained by interchanging unions and intersections, interchanging ⁠

A statement is said to be self-dual if it is equal to its own dual.

The following proposition states six more important laws of set algebra, involving unions and intersections.

⁠, the following identities hold: As noted above, each of the laws stated in proposition 3 can be derived from the five fundamental pairs of laws stated above.

As an illustration, a proof is given below for the idempotent law for union.

Proof: Intersection can be expressed in terms of set difference: The following proposition states five more important laws of set algebra, involving complements.

⁠, then: Notice that the double complement law is self-dual.

⁠, then: The following proposition says that inclusion, that is the binary relation of one set being a subset of another, is a partial order.

⁠ are sets then the following hold: The following proposition says that for any set S, the power set of S, ordered by inclusion, is a bounded lattice, and hence together with the distributive and complement laws above, show that it is a Boolean algebra.

⁠ is equivalent to various other statements involving unions, intersections and complements.

The following proposition lists several identities concerning relative complements and set-theoretic differences.