Partial function (source code)

= Partial function
{title2=$f:X\rightharpoonup Y$}
{wiki}

A <partial function> from a <set> $X$ to a <set> $Y$ assigns at most one <function output> in $Y$ to each <function input> in $X$. It can be treated as an ordinary <function> $D\to Y$ on a specified <subset> $D\subseteq X$, its <domain of a partial function>. The surrounding source <set> $X$ can contain points at which no value is defined.

For example, real division by the argument gives the <partial function> $x\mapsto1/x$ on $X=\mathbb R$ with $D=\mathbb R\setminus\{0\}$. Being undefined at zero is different from assigning a default value there. A <partial function> with $D=X$ is defined at every allowed input.