Home

dunion

Dunion is a term used in mathematics and computer science to denote the disjoint union of a family of sets. Given a family of sets {X_i} indexed by i in I, the dunion ⊎_{i∈I} X_i is the set of pairs (i, x) with i∈I and x∈X_i. This construction separates elements coming from different X_i by tagging them with their index, ensuring that the same element value from different X_i's are treated as distinct elements in the dunion.

In set theory, this is also called the disjoint sum; in category theory, the coproduct. The term

Example: X_1 = {a,b}, X_2 = {a,c}. The dunion is {(1,a),(1,b),(2,a),(2,c)}. If the X_i are already pairwise disjoint

Applications include the design of sum types in programming languages, data schemas for heterogeneous records, and

dunion
emphasizes
the
disjointness
property.
Notation
varies;
some
writers
write
⊎X_i
or
⊔
with
tagging
for
disambiguation.
subsets
of
a
common
universe,
the
dunion
is
isomorphic
to
the
ordinary
union,
with
the
tags
providing
disambiguation.
Cardinality
satisfies
|⊎_{i∈I}
X_i|
=
sum_{i∈I}
|X_i|.
The
construction
is
associative
and
commutative
up
to
natural
isomorphism.
theoretical
frameworks
in
algebra
and
topology.
In
programming,
a
tagged
union
or
variant
type
implements
a
dunion
by
combining
possibilities
into
one
type
with
an
explicit
tag
for
the
originating
case.
See
also
disjoint
union,
coproduct,
sum
type,
and
tagged
union.