Pairing function: Difference between revisions

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
imported>Sheddow
Undid revision 1290358908 by Abductive (talk) It says "can *only* be [...] if", which means that linear multiplication is a necessary condition. I think writing "if and only if" is overly pedantic
 
imported>EmilJ
Other pairing functions: “Real-time” just means that it takes O(1) time to generate each successive bit of the output. Every FST is real-time, so this designation is redundant, and it only serves to confuse readers unfamiliar with the term.
 
Line 11: Line 11:


===Generalization===
===Generalization===
More generally, a pairing function on a set <math>A</math> is a function that maps each pair of elements from <math>A</math> into an element of <math>A</math>, such that any two pairs of elements of <math>A</math> are associated with different elements of <math>A</math>,{{sfn|Szudzik|2006}}{{efn|That is, an [[Injective function|injection]] from <math>A^2 \rightarrow A</math>.}} or a bijection from <math>A^2</math> to <math>A</math>.{{sfn|Szudzik|2017}}
More generally, a pairing function on a set <math>A</math> is a function that maps each pair of elements from <math>A</math> into an element of <math>A</math>, such that distinct pairs of elements of <math>A</math> are associated with distinct elements of <math>A</math>,{{sfn|Szudzik|2006}}{{efn|That is, an [[Injective function|injection]] from <math>A^2 \rightarrow A</math>.}} or a bijection from <math>A^2</math> to <math>A</math>.{{sfn|Szudzik|2017}}


Instead of abstracting from the domain, the arity of the pairing function can also be generalized: there exists an n-ary generalized Cantor pairing function on <math>\mathbb{N}</math>.{{sfn|Lisi|2007}}
Instead of abstracting from the domain, the [[arity]] of the pairing function can also be generalized: there exists an ''n''-ary generalized Cantor pairing function on <math>\mathbb{N}</math>.{{sfn|Lisi|2007}}


== Cantor pairing function ==
== Cantor pairing function ==
Line 21: Line 21:
:<math>\pi:\mathbb{N} \times \mathbb{N} \to \mathbb{N}</math>
:<math>\pi:\mathbb{N} \times \mathbb{N} \to \mathbb{N}</math>
defined by  
defined by  
:<math>\pi(k_1,k_2) := \frac{1}{2}(k_1 + k_2)(k_1 + k_2 + 1)+k_2</math>
:<math>\pi(k_1,k_2) := \frac{1}{2}(k_1 + k_2)(k_1 + k_2 + 1)+k_2=\binom{k_1+k_2+1}{2}+k_2</math>
where <math>k_1, k_2\in\{0, 1, 2, 3, \dots\}</math>.{{sfn|Pigeon|loc=Equation 8}}{{bsn|date=November 2024}}
where <math>k_1, k_2\in\{0, 1, 2, 3, \dots\}</math>.{{sfn|Pigeon|loc=Equation 8}}{{bsn|date=November 2024}}


It can also be expressed as <math>\pi(x, y) := \frac{x^2 + x + 2xy + 3y + y^2}{2}</math>.{{sfn|Szudzik|2006}}
It can also be expressed as <math>\pi(x, y) := \frac{x^2 + x + 2xy + 3y + y^2}{2}</math>.{{sfn|Szudzik|2006}}


It is also strictly monotonic w.r.t. each argument, that is, for all <math>k_1, k_1', k_2, k_2' \in \mathbb{N}</math>, if <math>k_1 < k_{1}'</math>, then <math>\pi(k_1, k_2) < \pi(k_1', k_2)</math>; similarly, if <math>k_2 < k_{2}'</math>, then <math>\pi(k_1, k_2) < \pi(k_1, k_2')</math>.{{Citation needed|date=August 2021}}
It is also strictly monotonic with respect to each argument, that is, for all <math>k_1, k_1', k_2, k_2' \in \mathbb{N}</math>, if <math>k_1 < k_{1}'</math>, then <math>\pi(k_1, k_2) < \pi(k_1', k_2)</math>; similarly, if <math>k_2 < k_{2}'</math>, then <math>\pi(k_1, k_2) < \pi(k_1, k_2')</math>.{{Citation needed|date=August 2021}}


The statement that this is the only quadratic pairing function is known as the [[Fueter–Pólya theorem]].<ref>{{harvtxt|Stein|1999|pp=448-452}} cited in {{harvtxt|Pigeon}}.</ref> Whether this is the only polynomial pairing function is still an open question. When we apply the pairing function to {{math|''k''<sub>1</sub>}} and {{math|''k''<sub>2</sub>}} we often denote the resulting number as {{math|⟨''k''<sub>1</sub>, ''k''<sub>2</sub>⟩}}.{{Citation needed|date=August 2021}}
The statement that this is the only quadratic pairing function is known as the [[Fueter–Pólya theorem]].<ref>{{harvtxt|Stein|1999|pp=448-452}} cited in {{harvtxt|Pigeon}}.</ref> Whether this is the only polynomial pairing function is still an open question. When we apply the pairing function to {{math|''k''<sub>1</sub>}} and {{math|''k''<sub>2</sub>}} we often denote the resulting number as {{math|⟨''k''<sub>1</sub>, ''k''<sub>2</sub>⟩}}.{{Citation needed|date=August 2021}}
Line 35: Line 35:
:<math>\pi^{(n)}(k_1, \ldots, k_{n-1}, k_n) := \pi ( \pi^{(n-1)}(k_1, \ldots, k_{n-1}) , k_n)</math>
:<math>\pi^{(n)}(k_1, \ldots, k_{n-1}, k_n) := \pi ( \pi^{(n-1)}(k_1, \ldots, k_{n-1}) , k_n)</math>
with the base case defined above for a pair: <math>\pi^{(2)}(k_1,k_2) := \pi(k_1,k_2).</math>{{sfn|Pigeon|loc=Equations 13-7}}
with the base case defined above for a pair: <math>\pi^{(2)}(k_1,k_2) := \pi(k_1,k_2).</math>{{sfn|Pigeon|loc=Equations 13-7}}
Another generalization of the Cantor pairing function to a bijection <math>\pi^{(n)}\colon\mathbb{N}^n \to \mathbb{N}</math> is provided by the [[combinatorial number system]]:
:<math>\pi^{(n)}(x_1,\dots,x_n)=\binom{x_1+\dots+x_n+n-1}{n}+\binom{x_1+\dots+x_{n-1}+n-2}{n-1}+\dots+\binom{x_1+x_2+1}{2}+\binom{x_1}1.</math>


=== Inverting the Cantor pairing function ===
=== Inverting the Cantor pairing function ===
Line 52: Line 55:
:<math> w = \frac{\sqrt{8t + 1} - 1}{2} </math>
:<math> w = \frac{\sqrt{8t + 1} - 1}{2} </math>


which is a strictly increasing and continuous function when {{math|''t''}} is non-negative real. Since  
which is a strictly increasing and [[continuous function]] when {{math|''t''}} is non-negative real. Since  
:<math> t \leq z = t + y < t + (w + 1) =  \frac{(w + 1)^2 + (w + 1)}{2} </math>
:<math> t \leq z = t + y < t + (w + 1) =  \frac{(w + 1)^2 + (w + 1)}{2} </math>


Line 146: Line 149:
The function <math>P_2(x, y):= 2^x(2y + 1) - 1</math> is a pairing function.
The function <math>P_2(x, y):= 2^x(2y + 1) - 1</math> is a pairing function.


In 1990, Regan proposed the first known pairing function that is computable in [[linear time]] and with constant space (as the previously known examples can only be computed in linear time if [[Fast multiplication|multiplication can be too]], which is doubtful). In fact, both this pairing function and its inverse can be computed with finite-state transducers that run in real time.{{Clarify|date=August 2021}} In the same paper, the author proposed two more monotone pairing functions that can be [[Online algorithm|computed online]] in linear time and with [[logarithmic space]]; the first can also be computed offline with zero space.{{sfn|Regan|1992}}{{Clarify|reason=What is "zero space"?|date=August 2021}}
In 1990, Regan proposed the first known pairing function that is computable in [[linear time]] and with constant space (as the previously known examples can only be computed in linear time if [[Fast multiplication|multiplication can be too]], which is doubtful). In fact, both this pairing function and its inverse can be computed with [[finite-state transducer]]s. In the same paper, the author proposed two more monotone pairing functions that can be [[Online algorithm|computed online]] in linear time and with [[logarithmic space]]; the first can also be computed offline with constant space.{{sfn|Regan|1992}}


In 2001, Pigeon proposed a pairing function based on [[bit-interleaving]], defined recursively as:
In 2001, Pigeon proposed a pairing function based on [[bit-interleaving]], defined recursively as:
Line 171: Line 174:
\end{cases}</math>
\end{cases}</math>
(Qualitatively, it assigns consecutive numbers to pairs along the edges of squares.) This pairing function orders [[SK combinator calculus]] expressions by depth.{{sfn|Szudzik|2006}}{{Clarify|date=August 2021}}
(Qualitatively, it assigns consecutive numbers to pairs along the edges of squares.) This pairing function orders [[SK combinator calculus]] expressions by depth.{{sfn|Szudzik|2006}}{{Clarify|date=August 2021}}
This method is the mere application to <math>\N</math> of the idea, found in most textbooks on Set Theory,<ref>See for instance {{harvtxt|Jech|2006|p=30}}.</ref>
This method is the application to <math>\N</math> of the idea, found in set theory textbooks,<ref>See for instance {{harvtxt|Jech|2006|p=30}}.</ref>
used to establish <math>\kappa^2=\kappa</math> for any infinite cardinal <math>\kappa</math> in [[Zermelo–Fraenkel set theory|ZFC]].
used to establish <math>\kappa^2=\kappa</math> for any infinite cardinal <math>\kappa</math> in [[Zermelo–Fraenkel set theory|ZFC]].
Define on <math>\kappa\times\kappa</math> the binary relation
Define on <math>\kappa\times\kappa</math> the binary relation
Line 180: Line 183:
\max(\alpha,\beta) = \max(\gamma,\delta)\ \text{and}\ \alpha=\gamma\ \text{and}\ \beta<\delta.
\max(\alpha,\beta) = \max(\gamma,\delta)\ \text{and}\ \alpha=\gamma\ \text{and}\ \beta<\delta.
\end{cases}</math>
\end{cases}</math>
<math>\preccurlyeq</math> is then shown to be a well-ordering such that every element has <math>{}<\kappa</math> predecessors, which implies that <math>\kappa^2=\kappa</math>.
<math>\preccurlyeq</math> is then shown to be a [[Well-order|well-ordering]] such that every element has <math>{}<\kappa</math> predecessors, which implies that <math>\kappa^2=\kappa</math>.
It follows that <math>(\N\times\N,\preccurlyeq)</math> is isomorphic to <math>(\N,\leqslant)</math> and the pairing function above is nothing more than the enumeration of integer couples in increasing order.{{efn|See also [[Talk:Tarski's theorem about choice#Proof of the converse]].}}
It follows that <math>(\N\times\N,\preccurlyeq)</math> is isomorphic to <math>(\N,\leqslant)</math> and the pairing function above is nothing more than the enumeration of integer couples in increasing order.{{efn|See also [[Talk:Tarski's theorem about choice#Proof of the converse]].}}


Line 192: Line 195:
===References===
===References===
* {{MathWorld|urlname=PairingFunction|author=Steven Pigeon|title=Pairing Function|ref={{SfnRef|Pigeon}}}}{{Sfn whitelist|CITEREFPigeon}}
* {{MathWorld|urlname=PairingFunction|author=Steven Pigeon|title=Pairing Function|ref={{SfnRef|Pigeon}}}}{{Sfn whitelist|CITEREFPigeon}}
* {{cite journal|journal=Le Matematiche |first=Meri |last=Lisi |title=Some Remarks on the Cantor Pairing Function |volume=LXII |year=2007 |pp=55-65 |url=https://lematematiche.dmi.unict.it/index.php/lematematiche/article/view/14/13}}
* {{cite journal|journal=Le Matematiche |first=Meri |last=Lisi |title=Some Remarks on the Cantor Pairing Function |volume=LXII |year=2007 |pages=55–65 |url=https://lematematiche.dmi.unict.it/index.php/lematematiche/article/view/14/13}}
* {{Cite journal|date=December 1992 |title=Minimum-Complexity Pairing Functions|journal=Journal of Computer and System Sciences|language=en|volume=45|issue=3|pages=285–295|doi=10.1016/0022-0000(92)90027-G|issn=0022-0000|doi-access=free|last1=Regan|first1=Kenneth W.}}
* {{Cite journal|date=December 1992 |title=Minimum-Complexity Pairing Functions|journal=[[Journal of Computer and System Sciences]]|language=en|volume=45|issue=3|pages=285–295|doi=10.1016/0022-0000(92)90027-G|issn=0022-0000|doi-access=free|last1=Regan|first1=Kenneth W.}}
* {{Cite web|last=Szudzik|first=Matthew|year=2006|title=An Elegant Pairing Function|url=http://szudzik.com/ElegantPairing.pdf|url-status=live|archive-url=https://web.archive.org/web/20111125104326/http://szudzik.com/ElegantPairing.pdf|archive-date=25 November 2011|access-date=16 August 2021|website=szudzik.com}}
* {{Cite web|last=Szudzik|first=Matthew|year=2006|title=An Elegant Pairing Function|url=http://szudzik.com/ElegantPairing.pdf|url-status=live|archive-url=https://web.archive.org/web/20111125104326/http://szudzik.com/ElegantPairing.pdf|archive-date=25 November 2011|access-date=16 August 2021|website=szudzik.com}}
* {{cite arXiv|last=Szudzik|first=Matthew P.|date=1 June 2017|title=The Rosenberg-Strong Pairing Function|class=cs.DM|eprint=1706.04129}}
* {{cite arXiv|last=Szudzik|first=Matthew P.|date=1 June 2017|title=The Rosenberg-Strong Pairing Function|class=cs.DM|eprint=1706.04129}}
* {{cite book |first=Thomas |last=Jech |date=2006 |title=Set Theory |edition=The Third Millennium |series=Springer Monographs in Mathematics |doi=10.1007/3-540-44761-X |publisher=Springer-Verlag |isbn=3-540-44085-2}}
* {{cite book |first=Thomas |last=Jech |authorlink = Thomas Jech|date=2006 |title=Set Theory |edition=The Third Millennium |series=Springer Monographs in Mathematics |doi=10.1007/3-540-44761-X |publisher=Springer-Verlag |isbn=3-540-44085-2}}
* {{cite book
* {{cite book
   | last1 = Hopcroft
   | last1 = Hopcroft
   | first1 = John E.
   | first1 = John E.
|author1link = John E. Hopcroft
|author2link = Jeffrey D. Ullman
   | last2 = Ullman
   | last2 = Ullman
   | first2 = Jeffrey D.
   | first2 = Jeffrey D.

Latest revision as of 11:08, 15 December 2025

Template:Short description Script error: No such module "Unsubst".

In mathematics, a pairing function is a process to uniquely encode two natural numbers into a single natural number.

Any pairing function can be used in set theory to prove that integers and rational numbers have the same cardinality as natural numbers.[1]

Definition

A pairing function is a bijection

π:×.Template:SfnTemplate:SfnTemplate:Sfn

Generalization

More generally, a pairing function on a set A is a function that maps each pair of elements from A into an element of A, such that distinct pairs of elements of A are associated with distinct elements of A,Template:SfnTemplate:Efn or a bijection from A2 to A.Template:Sfn

Instead of abstracting from the domain, the arity of the pairing function can also be generalized: there exists an n-ary generalized Cantor pairing function on .Template:Sfn

Cantor pairing function

A plot of the Cantor pairing function
The Cantor pairing function assigns one natural number to each pair of natural numbers
A graph of the Cantor pairing function
Graph of the Cantor pairing function

The Cantor pairing function is a primitive recursive pairing function

π:×

defined by

π(k1,k2):=12(k1+k2)(k1+k2+1)+k2=(k1+k2+12)+k2

where k1,k2{0,1,2,3,}.Template:SfnTemplate:Bsn

It can also be expressed as π(x,y):=x2+x+2xy+3y+y22.Template:Sfn

It is also strictly monotonic with respect to each argument, that is, for all k1,k1,k2,k2, if k1<k1, then π(k1,k2)<π(k1,k2); similarly, if k2<k2, then π(k1,k2)<π(k1,k2).Script error: No such module "Unsubst".

The statement that this is the only quadratic pairing function is known as the Fueter–Pólya theorem.[2] Whether this is the only polynomial pairing function is still an open question. When we apply the pairing function to k1Script error: No such module "Check for unknown parameters". and k2Script error: No such module "Check for unknown parameters". we often denote the resulting number as k1, k2Script error: No such module "Check for unknown parameters"..Script error: No such module "Unsubst".

This definition can be inductively generalized to the Template:Citation needed span

π(n):n

for n>2 as

π(n)(k1,,kn1,kn):=π(π(n1)(k1,,kn1),kn)

with the base case defined above for a pair: π(2)(k1,k2):=π(k1,k2).Template:Sfn

Another generalization of the Cantor pairing function to a bijection π(n):n is provided by the combinatorial number system:

π(n)(x1,,xn)=(x1++xn+n1n)+(x1++xn1+n2n1)++(x1+x2+12)+(x11).

Inverting the Cantor pairing function

Let z be an arbitrary natural number. We will show that there exist unique values x,y such that

z=π(x,y)=(x+y+1)(x+y)2+y

and hence that the function π(x, y)Script error: No such module "Check for unknown parameters". is invertible. It is helpful to define some intermediate values in the calculation:

w=x+y
t=12w(w+1)=w2+w2
z=t+y

where tScript error: No such module "Check for unknown parameters". is the triangle number of wScript error: No such module "Check for unknown parameters".. If we solve the quadratic equation

w2+w2t=0

for wScript error: No such module "Check for unknown parameters". as a function of tScript error: No such module "Check for unknown parameters"., we get

w=8t+112

which is a strictly increasing and continuous function when tScript error: No such module "Check for unknown parameters". is non-negative real. Since

tz=t+y<t+(w+1)=(w+1)2+(w+1)2

we get that

w8z+112<w+1

and thus

w=8z+112.

where ⌊ ⌋Script error: No such module "Check for unknown parameters". is the floor function. So to calculate xScript error: No such module "Check for unknown parameters". and yScript error: No such module "Check for unknown parameters". from zScript error: No such module "Check for unknown parameters"., we do:

w=8z+112
t=w2+w2
y=zt
x=wy.

Since the Cantor pairing function is invertible, it must be one-to-one and onto.Template:SfnTemplate:Additional citation needed

Examples

To calculate π(47, 32)Script error: No such module "Check for unknown parameters".:

47 + 32 = 79Script error: No such module "Check for unknown parameters".,
79 + 1 = 80Script error: No such module "Check for unknown parameters".,
79 × 80 = 6320Script error: No such module "Check for unknown parameters".,
6320 ÷ 2 = 3160Script error: No such module "Check for unknown parameters".,
3160 + 32 = 3192Script error: No such module "Check for unknown parameters".,

so π(47, 32) = 3192Script error: No such module "Check for unknown parameters"..

To find xScript error: No such module "Check for unknown parameters". and yScript error: No such module "Check for unknown parameters". such that π(x, y) = 1432Script error: No such module "Check for unknown parameters".:

8 × 1432 = 11456Script error: No such module "Check for unknown parameters".,
11456 + 1 = 11457Script error: No such module "Check for unknown parameters".,
11457 = 107.037Script error: No such module "Check for unknown parameters".,
107.037 − 1 = 106.037Script error: No such module "Check for unknown parameters".,
106.037 ÷ 2 = 53.019Script error: No such module "Check for unknown parameters".,
⌊53.019⌋ = 53Script error: No such module "Check for unknown parameters".,

so w = 53Script error: No such module "Check for unknown parameters".;

53 + 1 = 54Script error: No such module "Check for unknown parameters".,
53 × 54 = 2862Script error: No such module "Check for unknown parameters".,
2862 ÷ 2 = 1431Script error: No such module "Check for unknown parameters".,

so t = 1431Script error: No such module "Check for unknown parameters".;

1432 − 1431 = 1Script error: No such module "Check for unknown parameters".,

so y = 1Script error: No such module "Check for unknown parameters".;

53 − 1 = 52Script error: No such module "Check for unknown parameters".,

so x = 52Script error: No such module "Check for unknown parameters".; thus π(52, 1) = 1432Script error: No such module "Check for unknown parameters"..Script error: No such module "Unsubst".

Derivation

File:Diagonal argument.svg
A diagonally incrementing "snaking" function, from same principles as Cantor's pairing function, is often used to demonstrate the countability of the rational numbers.

The graphical shape of Cantor's pairing function, a diagonal progression, is a standard trick in working with infinite sequences and countability.Template:Efn The algebraic rules of this diagonal-shaped function can verify its validity for a range of polynomials, of which a quadratic will turn out to be the simplest, using the method of induction. Indeed, this same technique can also be followed to try and derive any number of other functions for any variety of schemes for enumerating the plane.

A pairing function can usually be defined inductively – that is, given the nScript error: No such module "Check for unknown parameters".th pair, what is the (n+1)Script error: No such module "Check for unknown parameters".th pair? The way Cantor's function progresses diagonally across the plane can be expressed as

π(x,y)+1=π(x1,y+1).

The function must also define what to do when it hits the boundaries of the 1st quadrant – Cantor's pairing function resets back to the x-axis to resume its diagonal progression one step further out, or algebraically:

π(0,k)+1=π(k+1,0).

Also we need to define the starting point, what will be the initial step in our induction method: π(0, 0) = 0Script error: No such module "Check for unknown parameters"..

Assume that there is a quadratic 2-dimensional polynomial that can fit these conditions (if there were not, one could just repeat by trying a higher-degree polynomial). The general form is then

π(x,y)=ax2+by2+cxy+dx+ey+f.

Plug in our initial and boundary conditions to get f = 0Script error: No such module "Check for unknown parameters". and:

bk2+ek+1=a(k+1)2+d(k+1),

so we can match our kScript error: No such module "Check for unknown parameters". terms to get

b = aScript error: No such module "Check for unknown parameters".
d = 1-aScript error: No such module "Check for unknown parameters".
e = 1+aScript error: No such module "Check for unknown parameters"..

So every parameter can be written in terms of aScript error: No such module "Check for unknown parameters". except for cScript error: No such module "Check for unknown parameters"., and we have a final equation, our diagonal step, that will relate them:

π(x,y)+1=a(x2+y2)+cxy+(1a)x+(1+a)y+1=a((x1)2+(y+1)2)+c(x1)(y+1)+(1a)(x1)+(1+a)(y+1).

Expand and match terms again to get fixed values for aScript error: No such module "Check for unknown parameters". and cScript error: No such module "Check for unknown parameters"., and thus all parameters:

a = Template:Sfrac = b = dScript error: No such module "Check for unknown parameters".
c = 1Script error: No such module "Check for unknown parameters".
e = Template:SfracScript error: No such module "Check for unknown parameters".
f = 0Script error: No such module "Check for unknown parameters"..

Therefore

π(x,y)=12(x2+y2)+xy+12x+32y=12(x+y)(x+y+1)+y,

is the Cantor pairing function, and we also demonstrated through the derivation that this satisfies all the conditions of induction.Script error: No such module "Unsubst".

Shifted Cantor pairing function

The following pairing function: i,j:=12(i+j2)(i+j1)+i, where i,j{1,2,3,}.[3] is the same as the Cantor pairing function, but shifted to exclude 0 (i.e., i=k2+1, j=k1+1, and i,j1=π(k2,k1)).Template:Sfn It was used in the popular computer textbook of Hopcroft and Ullman (1979).

Other pairing functions

The function P2(x,y):=2x(2y+1)1 is a pairing function.

In 1990, Regan proposed the first known pairing function that is computable in linear time and with constant space (as the previously known examples can only be computed in linear time if multiplication can be too, which is doubtful). In fact, both this pairing function and its inverse can be computed with finite-state transducers. In the same paper, the author proposed two more monotone pairing functions that can be computed online in linear time and with logarithmic space; the first can also be computed offline with constant space.Template:Sfn

In 2001, Pigeon proposed a pairing function based on bit-interleaving, defined recursively as:

i,jP={Tif i=j=0;i/2,j/2P:i0:j0otherwise,

where i0 and j0 are the least significant bits of i and j respectively.Template:SfnTemplate:Bsn

In 2006, Szudzik proposed a "more elegant" pairing function defined by the expression:

ElegantPair[x,y]:={y2+xif x<y,x2+x+yif xy.

Which can be unpaired using the expression:

ElegantUnpair[z]:={{zz2,z}if zz2<z,{z,zz2z}if zz2z.

(Qualitatively, it assigns consecutive numbers to pairs along the edges of squares.) This pairing function orders SK combinator calculus expressions by depth.Template:SfnScript error: No such module "Unsubst". This method is the application to of the idea, found in set theory textbooks,[4] used to establish κ2=κ for any infinite cardinal κ in ZFC. Define on κ×κ the binary relation

(α,β)(γ,δ) if either {(α,β)=(γ,δ),max(α,β)<max(γ,δ),max(α,β)=max(γ,δ) and α<γ, ormax(α,β)=max(γ,δ) and α=γ and β<δ.

is then shown to be a well-ordering such that every element has <κ predecessors, which implies that κ2=κ. It follows that (×,) is isomorphic to (,) and the pairing function above is nothing more than the enumeration of integer couples in increasing order.Template:Efn

Citations

Notes

Template:Notelist

Footnotes

<templatestyles src="Reflist/styles.css" />

  1. Script error: No such module "Footnotes".:

    "Pairing functions arise naturally in the demonstration that the cardinalities of the rationals

    and the nonnegative integers

    0

    are the same, i.e.,

    ||=|0|=0

    , originally due to Cantor."

  2. Script error: No such module "Footnotes". cited in Script error: No such module "Footnotes"..
  3. Script error: No such module "Footnotes". cited in Script error: No such module "Footnotes"..
  4. See for instance Script error: No such module "Footnotes"..

Script error: No such module "Check for unknown parameters".

References

  • Script error: No such module "Template wrapper".Template:Sfn whitelist
  • Script error: No such module "Citation/CS1".
  • Script error: No such module "Citation/CS1".
  • Script error: No such module "citation/CS1".
  • Script error: No such module "citation/CS1".
  • Script error: No such module "citation/CS1".
  • Script error: No such module "citation/CS1".
  • Script error: No such module "citation/CS1".