Disjoint union
In mathematics, a disjoint union (or discriminated union) of a family of sets formula_1 is a set formula_2 often denoted by formula_3 with an injection of each formula_4 into formula_2 such that the images of these injections form a partition of formula_6 (that is, each element of formula_6 belongs to exactly one of these images). The disjoint union of a family of pairwise disjoint sets is their union. In terms of category theory, the disjoint union is the coproduct of the category of sets, and thus defined up to a bijection. A standard way for building the disjoint  union is to define formula_6 as the set of ordered pairs formula_9 such that formula_10 and the injection formula_11 as formula_12 Example. Consider the sets formula_13 and formula_14 It is possible to index the set elements according to set origin by forming the associated sets formula_15 where the second element in each pair matches the subscript of the origin set (for example, the formula_16 in formula_17 matches the subscript in formula_18 etc.). The disjoint union formula_19 can then be calculated as follows: formula_20 Set theory definition. Formally, let formula_21 be a family of sets indexed by formula_22 The disjoint union  of this family is the set formula_23 The elements of the disjoint union are ordered pairs formula_24 Here formula_25 serves as an auxiliary index that indicates which formula_4 the element formula_27 came from. Each of the sets formula_4 is canonically isomorphic to the set formula_29 Through this isomorphism, one may consider that formula_4 is canonically embedded in the disjoint union. For formula_31 the sets formula_32 and formula_33 are disjoint even if the sets formula_4 and formula_35 are not. In the extreme case where each of the formula_4 is equal to some fixed set formula_6 for each formula_38 the disjoint union  is the Cartesian product of formula_6 and formula_40: formula_41 Occasionally, the notation formula_42 is used for the disjoint union of a family of sets, or the notation formula_43 for the disjoint union of two sets. This notation is meant to be suggestive of the fact that the cardinality of the disjoint union is the sum of the cardinalities of the terms in the family. Compare this to the notation for the Cartesian product of a family of sets. Disjoint unions are also sometimes written formula_44 or formula_45 In the language of category theory, the disjoint union is the coproduct in  the category of sets. It therefore satisfies the associated universal property. This also means that the disjoint union is the categorical dual of the Cartesian product construction. See coproduct for more details. For many purposes, the particular choice of auxiliary index is unimportant, and in a simplifying abuse of notation, the indexed family can be treated simply as a collection of sets. In this case formula_32 is referred to as a of formula_4 and the notation formula_48 is sometimes used. Category theory point of view. In category theory the disjoint union is defined as a coproduct in the category of  sets. As such, the disjoint union is defined up to an isomorphism, and the above definition is just one realization of the coproduct, among others. When the sets are pairwise disjoint, the usual union is another realization of the coproduct. This justifies the second definition in the lead. This categorical aspect of the disjoint union explains why formula_49 is frequently used, instead of formula_50 to denote "coproduct".