An element of a Set can be identified with the Function sending . The three functions correspond to the three elements. Given , evaluating at is the composite .
Sources: 7 Sketches Example 1.29; DaoFP §1.3 (“Elements”), §2.2; Kittenlab Lecture 12; CTfS Exercise 2.1.2.13, Example 2.4.1.12
The set with this property is exactly the one-element set: for all iff (CTfS Exercise 2.1.2.13). Pairing two elements by the universal property of the Product gives the element — e.g. the origin of the plane from the origin of the line (CTfS Example 2.4.1.12).
In an arbitrary Category with a Terminal Object , an arrow is called a global element of ; DaoFP calls any arrow a generalized element of shape (“we can only learn about an object by probing it with arrows”). In , — a triviality that is the seed of the Yoneda Lemma (Kittenlab Lecture 12: ""). In a Topos, global elements of the Subobject Classifier are the truth values. For C-sets the analogue is a morphism out of a representable , which picks out an element of .
Docs: FinSets — Kittenlab Lecture 12
using Catlab
X = FinSet(3)
x = FinFunction([2], X) # the element 2 as a map 1 → X
F = FinFunction([5, 6, 7], 7)
compose(x, F) # evaluates F at 2: FinFunction([6], 7)-- elements of X ↔ functions PUnit → X
example (X : Type) : X ≃ (PUnit → X) :=
⟨fun x _ => x, fun f => f PUnit.unit, fun _ => rfl, fun _ => rfl⟩elemAsArrow :: a -> (() -> a)
elemAsArrow x = const x
arrowAsElem :: (() -> a) -> a
arrowAsElem f = f ()