Ordered pair (source code)

= Ordered pair
{wiki}

An <ordered pair> $(a,b)$ records two elements together with their positions. Its defining equality rule is $(a,b)=(c,d)$ exactly when $a=c$ and $b=d$. Thus $(1,2)\ne(2,1)$, and repeated entries such as $(a,a)$ are allowed.

The <Cartesian product> $A\times B$ consists of the <ordered pairs> with first entry in $A$ and second entry in $B$. A <function> can be represented by a <set> of such pairs with exactly one output for each input. In <set theory>, a <Kuratowski ordered pair> realizes the equality rule using ordinary <sets>.