A
partial function from a
set X (called the
domain) to a set
Y (called the
codomain) is a
binary relation over
X and
Y that is
functional, that is, associates with every element in
X at most one element in
Y. If a partial function is
total, that is, it is defined for every element in the domain, then it is called a
total function or simply
function.