In

_{1}, ''s''_{2}, … , ''s''_{''n''}, … is any enumeration of elements from ''T'', then we can always construct an element ''s'' of ''T'' which doesn't correspond to any ''s''_{''n''} in the enumeration.
The proof starts with an enumeration of elements from ''T'', for example:
:
Next, a sequence ''s'' is constructed by choosing the 1st digit as _{''1''} (swapping 0s for 1s and vice versa), the 2nd digit as complementary to the 2nd digit of ''s''_{''2''}, the 3rd digit as complementary to the 3rd digit of ''s''_{''3''}, and generally for every ''n'', the ''n''^{th} digit as complementary to the ''n''^{th} digit of ''s''_{''n''}. For the example above, this yields:
:
By construction, ''s'' differs from each ''s''_{''n''}, since their ''n''^{th} digits differ (highlighted in the example).
Hence, ''s'' cannot occur in the enumeration.
Based on this theorem, Cantor then uses a _{1}, ''s''_{2}, ... , ''s''_{''n''}, ... .
Applying the previous theorem to this enumeration produces a sequence ''s'' not belonging to the enumeration. However, this contradicts ''s'' being an element of ''T'' and therefore belonging to the enumeration. This contradiction implies that the original assumption is false. Therefore, ''T'' is uncountable.

_{''b''}. This leads to the family of functions: . The functions are injections, except for . This function will be modified to produce a bijection between ''T'' and R.

Choice principles in constructive and classical set theories

, Proceedings of the Logic Colloquium, 2002 In such a context, the subcountability of the real numbers is possible, intuitively making for a thinner set of numbers than in other models.

_{1}(''S'') is the set of one-element subsets of ''S'' and ''f'' is a proposed bijection from ''P''_{1}(''S'') to ''P''(''S''), one is able to use _{1}(''S''), < , ''P''(''S''), .
The proof follows by the fact that if ''f'' were indeed a map ''onto'' ''P''(''S''), then we could find ''r'' in ''S'', such that ''f''() coincides with the modified diagonal set, above. We would conclude that if ''r'' is not in ''f''(), then ''r'' is in ''f''() and vice versa.
It is ''not'' possible to put ''P''_{1}(''S'') in a one-to-one relation with ''S'', as the two have different types, and so any function so defined would violate the typing rules for the comprehension scheme.

Cantor's Diagonal Proof

at MathPages * {{DEFAULTSORT:Cantor's Diagonal Argument Set theory Theorems in the foundations of mathematics Mathematical proofs Infinity Arguments Cardinal numbers Georg Cantor

set theory
Set theory is the branch of mathematical logic that studies Set (mathematics), sets, which can be informally described as collections of objects. Although objects of any kind can be collected into a set, set theory, as a branch of mathematics, i ...

, Cantor's diagonal argument, also called the diagonalisation argument, the diagonal slash argument, the anti-diagonal argument, or the diagonal method, was published in 1891 by Georg Cantor
Georg Ferdinand Ludwig Philipp Cantor ( , ; – January 6, 1918) was a German mathematician
A mathematician is someone who uses an extensive knowledge of mathematics
Mathematics (from Greek: ) includes the study of such topics a ...

as a mathematical proof
A mathematical proof is an inferential argument
In logic
Logic is an interdisciplinary field which studies truth and reasoning
Reason is the capacity of consciously making sense of things, applying logic
Logic (from Ancient Greek ...

that there are infinite set
In set theory
Set theory is the branch of mathematical logic that studies Set (mathematics), sets, which can be informally described as collections of objects. Although objects of any kind can be collected into a set, set theory, as a branch ...

s which cannot be put into one-to-one correspondence
In mathematics, a bijection, bijective function, one-to-one correspondence, or invertible function, is a function (mathematics), function between the elements of two set (mathematics), sets, where each element of one set is paired with exactly on ...

with the infinite set of natural number
In mathematics, the natural numbers are those numbers used for counting (as in "there are ''six'' coins on the table") and total order, ordering (as in "this is the ''third'' largest city in the country"). In common mathematical terminology, w ...

s. Such sets are now known as uncountable set
In mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and ...

s, and the size of infinite sets is now treated by the theory of cardinal number
In mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and ...

s which Cantor began.
The diagonal argument was not Cantor's first proof of the uncountability of the real number
In mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers ( and ), formulas and related structures (), shapes and spaces in which they are contained (), and quantities and their changes ( and ). There is no g ...

s, which appeared in 1874.
However, it demonstrates a general technique that has since been used in a wide range of proofs, including the first of Gödel's incompleteness theorems
Gödel's incompleteness theorems are two theorem
In mathematics, a theorem is a statement (logic), statement that has been Mathematical proof, proved, or can be proved. The ''proof'' of a theorem is a logical argument that uses the inference r ...

and Turing's answer to the ''Entscheidungsproblem
In mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and ...

''. Diagonalization arguments are often also the source of contradictions like Russell's paradox
In mathematical logic
Mathematical logic is the study of formal logic within mathematics. Major subareas include model theory, proof theory, set theory, and recursion theory. Research in mathematical logic commonly addresses the mathematical ...

and Richard's paradox.
Uncountable set

In his 1891 article, Cantor considered the set ''T'' of all infinitesequences
In mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and t ...

of binary digits (i.e. each digit is zero or one).
He begins with a constructive proof
In mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and th ...

of the following theorem:
:If ''s''complementary
A complement is often something that completes something else, or at least adds to it in some useful way. Thus it may be:
* Complement (linguistics), a word or phrase having a particular syntactic role
** Subject complement, a word or phrase add ...

to the 1st digit of ''s''proof by contradiction
In logic
Logic is an interdisciplinary field which studies truth and reasoning. Informal logic seeks to characterize Validity (logic), valid arguments informally, for instance by listing varieties of fallacies. Formal logic represents stateme ...

to show that:
:The set ''T'' is uncountable.
The proof starts by assuming that ''T'' is countable
In mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and ...

.
Then all its elements can be written as an enumeration ''s''Real numbers

The uncountability of thereal number
In mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers ( and ), formulas and related structures (), shapes and spaces in which they are contained (), and quantities and their changes ( and ). There is no g ...

s was already established by Cantor's first uncountability proof
Cantor's first set theory article contains Georg Cantor
Georg Ferdinand Ludwig Philipp Cantor ( , ; – January 6, 1918) was a German mathematician. He created set theory, which has become a fundamental theory in mathematics. Cantor e ...

, but it also follows from the above result. To prove this, an injection
Injection or injected may refer to:
Science and technology
* Injection (medicine)
An injection (often referred to as a "shot" in US English, a "jab" in UK English, or a "jag" in Scottish English and Scots Language, Scots) is the act of adminis ...

will be constructed from the set ''T'' of infinite binary strings to the set R of real numbers. Since ''T'' is uncountable, the image
An image (from la, imago) is an artifact that depicts visual perception
Visual perception is the ability to interpret the surrounding environment (biophysical), environment through photopic vision (daytime vision), color vision, sco ...

of this function, which is a subset of R, is uncountable. Therefore, R is uncountable. Also, by using a method of construction devised by Cantor, a bijection
In mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and ...

will be constructed between ''T'' and R. Therefore, ''T'' and R have the same cardinality, which is called the "cardinality of the continuum
In set theory
Set theory is the branch of that studies , which can be informally described as collections of objects. Although objects of any kind can be collected into a set, set theory, as a branch of , is mostly concerned with those that ar ...

" and is usually denoted by $\backslash mathfrak$ or $2^$.
An injection from ''T'' to R is given by mapping binary strings in ''T'' to decimal fractions
The decimal numeral system (also called the base-ten positional numeral system, and occasionally called denary or decanary) is the standard system for denoting integer and non-integer numbers. It is the extension to non-integer numbers of the H ...

, such as mapping ''t'' = 0111... to the decimal 0.0111.... This function, defined by , is an injection because it maps different strings to different numbers.While 0.0111... and 0.1000... would be equal if interpreted as binary fractions (destroying injectivity), they are different when interpreted as decimal fractions, as is done by ''f''. On the other hand, since ''t'' is a binary string, the equality 0.0999... = 0.1000... of decimal fractions is not relevant here.
Constructing a bijection between ''T'' and R is slightly more complicated.
Instead of mapping 0111... to the decimal 0.0111..., it can be mapped to the base
Base or BASE may refer to:
Brands and enterprises
*Base (mobile telephony provider)
Base (stylized as BASE) is the third largest of Belgium
Belgium ( nl, België ; french: Belgique ; german: Belgien ), officially the Kingdom of Belgium, ...

''b'' number: 0.0111...General sets

A generalized form of the diagonal argument was used by Cantor to proveCantor's theorem
In elementary set theory
illustrating the intersection (set theory), intersection of two set (mathematics), sets.
Set theory is a branch of mathematical logic that studies Set (mathematics), sets, which informally are collections of objects. ...

: for every set ''S'', the power set
In mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities an ...

of ''S''—that is, the set of all subset
In mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities a ...

s of ''S'' (here written as ''P''(''S''))—cannot be in bijection with ''S'' itself. This proof proceeds as follows:
Let ''f'' be any function
Function or functionality may refer to:
Computing
* Function key
A function key is a key on a computer
A computer is a machine that can be programmed to carry out sequences of arithmetic or logical operations automatically. Modern comp ...

from ''S'' to ''P''(''S''). It suffices to prove ''f'' cannot be surjective
In mathematics
Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry), and calculus, change (mathematical analysis, analysis). It ...

. That means that some member ''T'' of ''P''(''S''), i.e. some subset of ''S'', is not in the image
An image (from la, imago) is an artifact that depicts visual perception
Visual perception is the ability to interpret the surrounding environment (biophysical), environment through photopic vision (daytime vision), color vision, sco ...

of ''f''. As a candidate consider the set:
:''T'' = .
For every ''s'' in ''S'', either ''s'' is in ''T'' or not. If ''s'' is in ''T'', then by definition of ''T'', ''s'' is not in ''f''(''s''), so ''T'' is not equal to ''f''(''s''). On the other hand, if ''s'' is not in ''T'', then by definition of ''T'', ''s'' is in ''f''(''s''), so again ''T'' is not equal to ''f''(''s''); cf. picture.
For a more complete account of this proof, see Cantor's theorem
In elementary set theory
illustrating the intersection (set theory), intersection of two set (mathematics), sets.
Set theory is a branch of mathematical logic that studies Set (mathematics), sets, which informally are collections of objects. ...

.
Consequences

Ordering of cardinals

Cantor defines an order relation of cardinalities, e.g. $,\; S,$ and $,\; T,$, in terms of the existence of injections between the underlying sets, $S$ and $T$. The argument in the previous paragraph then proved that sets such as $\backslash to\backslash $ are uncountable, which is to say $\backslash neg(,\; \backslash to\backslash ,\; \backslash le,\; ,\; )$, and we can embed the naturals into the function space, so that we have that $,\; ,\; <,\; \backslash to\backslash ,$. In the context ofclassical mathematics In the foundations of mathematics
Foundations of mathematics is the study of the philosophical
Philosophy (from , ) is the study of general and fundamental questions, such as those about existence
Existence is the ability of an entity to ...

, this exhausts the possibilities and the diagonal argument can thus be used to establish that, for example, although both sets under consideration are infinite, there are actually ''more'' infinite sequences of ones and zeros than there are natural numbers.
This result then also implies that the notion of the set of all sets is inconsistent: If ''S'' were the set of all sets, then ''P''(''S'') would at the same time be bigger than ''S'' and a subset of ''S''.
Assuming the law of excluded middle
In logic
Logic is an interdisciplinary field which studies truth and reasoning
Reason is the capacity of consciously making sense of things, applying logic
Logic (from Ancient Greek, Greek: grc, wikt:λογική, λογική, la ...

, every subcountable
In constructive mathematics, a collection X is subcountable if there exists a partial function, partial surjection from the natural numbers onto it.
This may be expressed as
:\exists (I\subseteq\omega).\, \exists f.\, (f\colon I\twoheadrightarrow ...

set (a property in terms surjections) is also already countable.
In Constructive mathematics
In the philosophy of mathematics, constructivism asserts that it is necessary to find (or "construct") a mathematical object to prove that it exists. In classical mathematics, one can prove the existence of a mathematical object without "finding ...

, it is harder or impossible to order ordinals and also cardinals. For example, the Schröder–Bernstein theoremIn set theory, the Schröder–Bernstein theorem states that, if there exist injective functions and between the Set (mathematics), sets and , then there exists a bijection, bijective function .
In terms of the cardinality of the two sets, this c ...

requires the law of excluded middle. The ordering on the reals (the standard ordering extending that of the rational numbers) is also not necessarily decidable. Neither are most properties of interesting classes of functions decidable, by Rice's theorem
In computability theory, Rice's theorem states that all non-trivial Semantics (computer science), semantic properties of programs are undecidable problem, undecidable. A semantic property is one about the program's behavior (for instance, does the ...

, i.e. the right set of counting numbers for the subcountable sets may not be recursive.
In a set theory, theories of mathematics are modeled. For example, in set theory, "the" set of real numbers is identified as a set that fulfills some axioms of real numbers. Various models have been studied, such as the Dedekind reals or the Cauchy reals. Weaker axioms mean less constraints and so allow for a richer class of models. Consequently, in an otherwise constructive context (law of excluded middle not taken as axiom), it is consistent to adopt non-classical axioms that contradict consequences of the law of excluded middle. For example, the uncountable space of functions $\backslash to\backslash $ may be asserted to be subcountable
In constructive mathematics, a collection X is subcountable if there exists a partial function, partial surjection from the natural numbers onto it.
This may be expressed as
:\exists (I\subseteq\omega).\, \exists f.\, (f\colon I\twoheadrightarrow ...

, a notion of size orthogonal to the statement $,\; ,\; <,\; \backslash to\backslash ,$.Rathjen, M.Choice principles in constructive and classical set theories

, Proceedings of the Logic Colloquium, 2002 In such a context, the subcountability of the real numbers is possible, intuitively making for a thinner set of numbers than in other models.

Open questions

Motivated by the insight that the set of real numbers is "bigger" than the set of natural numbers, one is led to ask if there is a set whosecardinality
In mathematics
Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry), and calculus, change (mathematical analysis, analysis). It ...

is "between" that of the integers and that of the reals. This question leads to the famous continuum hypothesis
In mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities an ...

. Similarly, the question of whether there exists a set whose cardinality is between , ''S'', and , ''P''(''S''), for some infinite ''S'' leads to the generalized continuum hypothesis
In mathematics
Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry), and calculus, change (mathematical analysis, analysis). It ...

.
Diagonalization in broader context

Russell's Paradox
In mathematical logic
Mathematical logic is the study of formal logic within mathematics. Major subareas include model theory, proof theory, set theory, and recursion theory. Research in mathematical logic commonly addresses the mathematical ...

has shown that naive set theory
Naive set theory is any of several theories of sets used in the discussion of the foundations of mathematics
Foundations of mathematics is the study of the philosophical and logical and/or algorithmic basis of mathematics, or, in a broader sens ...

, based on an unrestricted comprehension
In many popular versions of axiomatic set theory, the axiom schema of specification, also known as the axiom schema of separation, subset axiom scheme or axiom schema of restricted comprehension is an axiom schema. Essentially, it says that any ...

scheme, is contradictory. Note that there is a similarity between the construction of ''T'' and the set in Russell's paradox. Therefore, depending on how we modify the axiom scheme of comprehension in order to avoid Russell's paradox, arguments such as the non-existence of a set of all sets may or may not remain valid.
Analogues of the diagonal argument are widely used in mathematics to prove the existence or nonexistence of certain objects. For example, the conventional proof of the unsolvability of the halting problem
In computability theory
Computability theory, also known as recursion theory, is a branch of mathematical logic
Mathematical logic is the study of formal logic within mathematics. Major subareas include model theory, proof theory, set the ...

is essentially a diagonal argument. Also, diagonalization was originally used to show the existence of arbitrarily hard complexity classes
Complexity characterises the behaviour of a system or model (disambiguation), model whose components interaction, interact in multiple ways and follow local rules, meaning there is no reasonable higher instruction to define the various possible i ...

and played a key role in early attempts to prove P does not equal NP.
Version for Quine's New Foundations

The above proof fails for W. V. Quine's "New Foundations
In mathematical logic, New Foundations (NF) is an axiomatic set theory, conceived by Willard Van Orman Quine as a simplification of the Type theory, theory of types of ''Principia Mathematica''. Quine first proposed NF in a 1937 article titled "New ...

" set theory (NF). In NF, the naive axiom scheme of comprehension is modified to avoid the paradoxes by introducing a kind of "local" type theory
In mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers ( and ), formulas and related structures (), shapes and spaces in which they are contained (), and quantities and their changes ( and ). There is no gene ...

. In this axiom scheme,
:
is ''not'' a set — i.e., does not satisfy the axiom scheme. On the other hand, we might try to create a modified diagonal argument by noticing that
:
''is'' a set in NF. In which case, if ''P''proof by contradiction
In logic
Logic is an interdisciplinary field which studies truth and reasoning. Informal logic seeks to characterize Validity (logic), valid arguments informally, for instance by listing varieties of fallacies. Formal logic represents stateme ...

to prove that , ''P''See also

*Cantor's first uncountability proof
Cantor's first set theory article contains Georg Cantor
Georg Ferdinand Ludwig Philipp Cantor ( , ; – January 6, 1918) was a German mathematician. He created set theory, which has become a fundamental theory in mathematics. Cantor e ...

*Controversy over Cantor's theory
In mathematical logic
Mathematical logic, also called formal logic, is a subfield of mathematics
Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (alge ...

* Diagonal lemma
Notes

References

External links

Cantor's Diagonal Proof

at MathPages * {{DEFAULTSORT:Cantor's Diagonal Argument Set theory Theorems in the foundations of mathematics Mathematical proofs Infinity Arguments Cardinal numbers Georg Cantor