Cauchy sequence

In mathematics, a Cauchy sequence (; ), named after Augustin-Louis Cauchy, is a sequence whose elements become arbitrarily close to each other as the sequence progresses. More precisely, given any small positive distance, all but a finite number of elements of the sequence are less than that given distance from each other.
It is not sufficient for each term to become arbitrarily close to the term. For instance, in the sequence of square roots of natural numbers:
the consecutive terms become arbitrarily close to each other:
However, with growing values of the index , the terms become arbitrarily large. So, for any index and distance , there exists an index big enough such that . (Actually, any suffices.) As a result, despite how far one goes, the remaining terms of the sequence never get close to , hence the sequence is not Cauchy.
The utility of Cauchy sequences lies in the fact that in a complete metric space (one where all such sequences are known to converge to a limit), the criterion for convergence depends only on the terms of the sequence itself, as opposed to the definition of convergence, which uses the limit value as well as the terms. This is often exploited in algorithms, both theoretical and applied, where an iterative process can be shown relatively easily to produce a Cauchy sequence, consisting of the iterates, thus fulfilling a logical condition, such as termination. 
Generalizations of Cauchy sequences in more abstract uniform spaces exist in the form of Cauchy filters and Cauchy nets.
In real numbers.
A sequence
of real numbers is called a Cauchy sequence if for every positive real number "ε", there is a positive integer "N" such that for all natural numbers "m", "n" > "N"
where the vertical bars denote the absolute value. In a similar way one can define Cauchy sequences of rational or complex numbers. Cauchy formulated such a condition by requiring formula_5 to be infinitesimal for every pair of infinite "m", "n".
For any real number "r", the sequence of truncated decimal expansions of "r" forms a Cauchy sequence. For example, when "r" = "π", this sequence is (3, 3.1, 3.14, 3.141, ...). The "m"th and "n"th terms differ by at most 101−"m" when "m" < "n", and as "m" grows this becomes smaller than any fixed positive number ε.
Modulus of Cauchy convergence.
If formula_6 is a sequence in the set formula_7, then a "modulus of Cauchy convergence" for the sequence is a function formula_8 from the set of natural numbers to itself, such that for all natural numbers formula_9 and natural numbers formula_10, formula_11.
Any sequence with a modulus of Cauchy convergence is a Cauchy sequence. The existence of a modulus for a Cauchy sequence follows from the well-ordering property of the natural numbers (let formula_12 be the smallest possible formula_13 in the definition of Cauchy sequence, taking formula_14 to be formula_15). The existence of a modulus also follows from the principle of dependent choice, which is a weak form of the axiom of choice, and it also follows from an even weaker condition called AC00. "Regular Cauchy sequences" are sequences with a given modulus of Cauchy convergence (usually formula_16 or formula_17). Any Cauchy sequence with a modulus of Cauchy convergence is equivalent to a regular Cauchy sequence; this can be proven without using any form of the axiom of choice.
Moduli of Cauchy convergence are used by constructive mathematicians who do not wish to use any form of choice. Using a modulus of Cauchy convergence can simplify both definitions and theorems in constructive analysis. Regular Cauchy sequences were used by Errett Bishop in his Foundations of Constructive Analysis, and by Douglas Bridges in a non-constructive textbook ().
In a metric space.
Since the definition of a Cauchy sequence only involves metric concepts, it is straightforward to generalize it to any metric space "X". 
To do so, the absolute value is replaced by the distance "d"("x""m", "x""n") (where "d" denotes a metric) between "x""m" and "x""n".
Formally, given a metric space , a sequence
is Cauchy, if for every positive real number there is a positive integer such that for all positive integers , the distance
Roughly speaking, the terms of the sequence are getting closer and closer together in a way that suggests that the sequence ought to have a limit in "X". 
Nonetheless, such a limit does not always exist within "X": the property of a space that every Cauchy sequence converges in the space is called "completeness", and is detailed below.
Completeness.
A metric space ("X", "d") in which every Cauchy sequence converges to an element of "X" is called complete.
Examples.
The real numbers are complete under the metric induced by the usual absolute value, and one of the standard constructions of the real numbers involves Cauchy sequences of rational numbers. In this construction, each equivalence class of Cauchy sequences of rational numbers with a certain tail behavior—that is, each class of sequences that get arbitrarily close to one another— is a real number.
A rather different type of example is afforded by a metric space "X" which has the discrete metric (where any two distinct points are at distance 1 from each other). Any Cauchy sequence of elements of "X" must be constant beyond some fixed point, and converges to the eventually repeating term.
Non-example: rational numbers.
The rational numbers Q are not complete (for the usual distance):
There are sequences of rationals that converge (in R) to irrational numbers; these are Cauchy sequences having no limit in Q. In fact, if a real number "x" is irrational, then the sequence ("x""n"), whose "n"-th term is the truncation to "n" decimal places of the decimal expansion of "x", gives a Cauchy sequence of rational numbers with irrational limit "x". Irrational numbers certainly exist in R, for example:
Non-example: open interval.
The open interval formula_23 in the set of real numbers with an ordinary distance in R is not a complete space: there is a sequence formula_24 in it, which is Cauchy (for arbitrarily small distance bound formula_25 all terms formula_26 of formula_27 fit in the formula_28 interval), however does not converge in formula_29 — its 'limit', number formula_30, does not belong to the space formula_29.
Other properties.
These last two properties, together with the Bolzano–Weierstrass theorem, yield one standard proof of the completeness of the real numbers, closely related to both the Bolzano–Weierstrass theorem and the Heine–Borel theorem. Every Cauchy sequence of real numbers is bounded, hence by Bolzano–Weierstrass has a convergent subsequence, hence is itself convergent. This proof of the completeness of the real numbers implicitly makes use of the least upper bound axiom. The alternative approach, mentioned above, of the real numbers as the completion of the rational numbers, makes the completeness of the real numbers tautological.
One of the standard illustrations of the advantage of being able to work with Cauchy sequences and make use of completeness is provided by consideration of the summation of an infinite series of real numbers
(or, more generally, of elements of any complete normed linear space, or Banach space). Such a series 
formula_32 is considered to be convergent if and only if the sequence of partial sums formula_33 is convergent, where 
formula_34. It is a routine matter 
to determine whether the sequence of partial sums is Cauchy or not,
since for positive integers "p" > "q", 
If formula_36 is a uniformly continuous map between the metric spaces "M" and "N" and ("x""n") is a Cauchy sequence in "M", then formula_37 is a Cauchy sequence in "N". If formula_38 and formula_39 are two Cauchy sequences in the rational, real or complex numbers, then the sum formula_40 and the product formula_41 are also Cauchy sequences.
Generalizations.
In topological vector spaces.
There is also a concept of Cauchy sequence for a topological vector space formula_7: Pick a local base formula_43 for formula_7 about 0; then (formula_45) is a Cauchy sequence if for each member formula_46, there is some number formula_13 such that whenever 
formula_48 is an element of formula_49. If the topology of formula_7 is compatible with a translation-invariant metric formula_51, the two definitions agree.
In topological groups.
Since the topological vector space definition of Cauchy sequence requires only that there be a continuous "subtraction" operation, it can just as well be stated in the context of a topological group: A sequence formula_52 in a topological group formula_53 is a Cauchy sequence if for every open neighbourhood formula_54 of the identity in formula_53 there exists some number formula_13 such that whenever formula_57 it follows that formula_58. As above, it is sufficient to check this for the neighbourhoods in any local base of the identity in formula_53.
As in the construction of the completion of a metric space, one can furthermore define the binary relation on Cauchy sequences in formula_53 that formula_52 and formula_62 are equivalent if for every open neighbourhood formula_54 of the identity in formula_53 there exists some number formula_13 such that whenever formula_57 it follows that formula_67. This relation is an equivalence relation: It is reflexive since the sequences are Cauchy sequences. It is symmetric since formula_68 which by continuity of the inverse is another open neighbourhood of the identity. It is transitive since formula_69 where formula_70 and formula_71 are open neighbourhoods of the identity such that formula_72; such pairs exist by the continuity of the group operation.
In groups.
There is also a concept of Cauchy sequence in a group formula_53:
Let formula_74 be a decreasing sequence of normal subgroups of formula_53 of finite index.
Then a sequence formula_38 in formula_53 is said to be Cauchy (w.r.t. formula_78) if and only if for any formula_14 there is formula_13 such that formula_81.
Technically, this is the same thing as a topological group Cauchy sequence for a particular choice of topology on formula_53, namely that for which formula_78 is a local base.
The set formula_84 of such Cauchy sequences forms a group (for the componentwise product), and the set formula_85 of null sequences (s.th. formula_86) is a normal subgroup of formula_84. The factor group formula_88 is called the completion of formula_53 with respect to formula_78.
One can then show that this completion is isomorphic to the inverse limit of the sequence formula_91.
An example of this construction, familiar in number theory and algebraic geometry is the construction of the "p"-adic completion of the integers with respect to a prime "p". In this case, "G" is the integers under addition, and "H""r" is the additive subgroup consisting of integer multiples of "p""r".
If formula_78 is a cofinal sequence (i.e., any normal subgroup of finite index contains some formula_93), then this completion is canonical in the sense that it is isomorphic to the inverse limit of formula_94, where formula_78 varies over normal subgroups of finite index. For further details, see ch. I.10 in Lang's "Algebra".
In a hyperreal continuum.
A real sequence formula_96 has a natural hyperreal extension, defined for hypernatural values "H" of the index "n" in addition to the usual natural "n". The sequence is Cauchy if and only if for every infinite "H" and "K", the values formula_97 and formula_98 are infinitely close, or adequal, i.e. 
where "st" is the standard part function.
Cauchy completion of categories.
 introduced a notion of Cauchy completion of a category. Applied to Q (the category whose objects are rational numbers, and there is a morphism from "x" to "y" if and only if "x" ≤ "y"), this Cauchy completion yields R (again interpreted as a category using its natural ordering).