"Options", Partial Functions, Pointed Sets in Undergraduate Mahtematics?

42 Views Asked by At

As a mathematics undergrad, one is usually taught with basic set theory the notion of direct product $A \times B$ and disjoint union $A \sqcup B$. But however common, I never encountered "Option(A)" (It has many names) with $Opt(A) = A \sqcup \{\blacksquare\}$ where $\blacksquare$ is disjoint from $A$ and is thought of as perhaps "No A" or "None".

For example, a careless mathematician or software engineer may imagine a function $FirstElement : FiniteSeqOf(A) \rightarrow A$ failing to consider how one would define $FirstElement$ on the list of length $0$. But wrapping the domain with $Opt$ saves the day: $FirstElement: FiniteSeqOf(A) \rightarrow Opt(A)$ with $FirstElement([]) = \blacksquare$.

The construction $Opt(A)$ is a functor, of course. It can also be seen as associating a set $A$ with subsets / finite sequences of $A$ if size $0$ or $1$.

Closely related: partial functions, categories of pointed sets.

Given the simplicity of this construct compare to others commonly seen, where does this show up, explicitly, in undergraduate mathematics?

1

There are 1 best solutions below

0
On

I think that the sense you're talking about isn't used a lot in pure math, since we generally get better behavior by simply dropping the bad things from the domain rather than trying to account for them using partial functions. (For instance we tend to use fields rather than wheels.)

The coverage of this object on nlab seems to confirm this; if there were such applications in elementary mathematics, we might expect to see them pointed out there.

Pointed objects, of course, appear in algebraic topology and friends.