# Almost all

In mathematics, the term "almost all" means "all but a negligible amount". More precisely, if ${\displaystyle A}$ is a set and ${\displaystyle B}$ is a subset of ${\displaystyle A}$ whose complement in ${\displaystyle A}$ is negligible, then almost all elements of ${\displaystyle A}$ are in ${\displaystyle B}$. The meaning of "negligible" depends on the mathematical context: for instance, it can mean finite, null, or meagre.

## Prevalent meaningEdit

Across mathematics, when referring to a subset of an infinite set, "almost all" is sometimes used to mean "all but finitely many".[1][2][3] This use occurs in philosophy as well.[4]

Examples:

• Almost all positive integers are greater than 1,000,000,000,000.[5]:293
• Almost all prime numbers are odd, as 2 is the only exception.
• Almost all polyhedra are irregular, as there are only nine exceptions: the five platonic solids and the four Kepler-Poinsot polyhedra.
• If ${\displaystyle m}$  and ${\displaystyle n}$  are coprime positive integers, almost all positive integers can be expressed as ${\displaystyle am+bn}$  where ${\displaystyle a}$  and ${\displaystyle b}$  are positive integers.
• If ${\displaystyle P}$  is a nonzero polynomial, ${\displaystyle P(x)\neq 0}$  for almost all ${\displaystyle x}$ .

## Meaning in measure theoryEdit

The Cantor function

When speaking about the reals, sometimes "almost all" means "all reals but a null set". Similarly, if ${\displaystyle S}$  is some set of real numbers, "almost all numbers in ${\displaystyle S}$ " can mean "all numbers in ${\displaystyle S}$  but those in a null set".[6][7][8]

The real line can be thought of as a one-dimensional Euclidean space. In the more general case of an ${\displaystyle n}$ -dimensional space (where ${\displaystyle n}$  is a positive integer), the definition can be generalised to "all points in ${\displaystyle S}$  but those in a null set" (this time, ${\displaystyle S}$  is a set of points in the space).[9][7]

Even more generally, "almost all" is sometimes used in the sense of "almost everywhere" in measure theory,[10][11] or in the closely related sense of "almost surely" in probability theory.[11]

Examples:

## Meaning in number theoryEdit

In number theory, "almost all positive integers" can mean "a set of positive integers whose natural density is 1". That is, if ${\displaystyle A}$  is a set of positive integers, and if the proportion of positive integers below ${\displaystyle n}$  that are in ${\displaystyle A}$  tends to 1 as ${\displaystyle n}$  tends to infinity (see limit), then almost all positive integers are in ${\displaystyle A}$ .[16][17][18]

More generally, let ${\displaystyle S}$  be an infinite set of positive integers, such as the set of even positive numbers or of prime numbers. If ${\displaystyle A}$  is a subset of ${\displaystyle S}$ , and if the proportion of elements of ${\displaystyle S}$  below ${\displaystyle n}$  that are in ${\displaystyle A}$  tends to 1 as ${\displaystyle n}$  tends to infinity, then it can be said that almost all elements of ${\displaystyle S}$  are in ${\displaystyle A}$ .

Examples:

• Almost all positive integers are composite. [proof 1]
• Almost all even positive numbers can be expressed as the sum of two primes.[5]:489
• Almost all primes are isolated. Moreover, if ${\displaystyle g}$  is an arbitrary positive integer, then almost all primes have prime gaps of more than ${\displaystyle g}$  both to their left and to their right (no other primes between ${\displaystyle p+g}$  and ${\displaystyle p-g)}$ .[19]

## Meaning in topologyEdit

In general topology, subset of a topological space contains "almost all" of its points if the subset is open and dense, or more generally, if it is comeagre.[citation needed] In the latter case, it can be said to have "Baire-almost all" of the space's points. This term is used, for instance, in the context of certain topological spaces that arise in set theory,[20] and certain function spaces in functional analysis.[21]

## Meaning in algebraEdit

In abstract algebra, if ${\displaystyle U}$  is an ultrafilter on a set ${\displaystyle X}$ , "almost all elements of ${\displaystyle X}$ " means "the elements of some element of ${\displaystyle U}$ ".[22][23] If ${\displaystyle X}$  is divided into two disjoint sets, no matter how, one of them will contain almost all elements of ${\displaystyle X}$ .

## GeneralisationsEdit

### ContentsEdit

Given a set ${\displaystyle X}$  and a content on it, a subset of ${\displaystyle X}$  can be said to contain "almost all elements of ${\displaystyle X}$ " if the content of its complement is 0 (the complement is null). This is a generalisation of the meanings in measure theory (all measures are contents), number theory (natural density is a content), and algebra (if the content of a set in the ultrafilter is defined to be 1 and the content of a set not in the ultrafilter is defined to be 0).

### FiltersEdit

Given a set ${\displaystyle X}$  and a filter on it, a subset of ${\displaystyle X}$  can be said to contain "almost all elements of ${\displaystyle X}$ " if it is an element of the filter. This is a generalisation of all meanings illustrated here (the filter comprises the subsets that contain "almost all" elements of ${\displaystyle X}$ ).

## ProofsEdit

1. ^ According to the prime number theorem, the number of prime numbers less than or equal to ${\displaystyle n}$  is asymptotically equal to ${\displaystyle n/\ln n}$ . Therefore, the proportion of primes is roughly ${\displaystyle 1/\ln n}$ , which tends to 0 as ${\displaystyle n}$  tends to infinity, so the proportion of composite numbers less than or equal to ${\displaystyle n}$  tends to 1 as ${\displaystyle n}$  tends to infinity.[18]

## ReferencesEdit

1. ^ Cahen, Paul-Jean; Chabert, Jean-Luc (3 December 1996). Integer-Valued Polynomials. Mathematical Surveys and Monographs. 48. American Mathematical Society. p. xix. ISBN 978-0-8218-0388-2. ISSN 0076-5376.
2. ^ Cahen, Paul-Jean; Chabert, Jean-Luc (7 December 2010) [First published 2000]. "Chapter 4: What's New About Integer-Valued Polynomials on a Subset?". In Hazewinkel, Michiel. Non-Noetherian Commutative Ring Theory. Mathematics and Its Applications. 520. Dordrecht: Springer. p. 85. doi:10.1007/978-1-4757-3180-4. ISBN 978-1-4419-4835-9.
3. ^ Halmos, Paul R. (1962). Algebric Logic. New York: Chelsea Publishing Company. p. 114.
4. ^ Gärdenfors, Peter (22 August 2005). The Dynamics of Thought. Synthese Library. 300. Dordrecht: Springer. pp. 190–191. ISBN 978-1-4020-3398-8.
5. ^ a b Courant, Richard; Robbins, Herbert; Stewart, Ian (18 July 1996). What is Mathematics? An Elementary Approach to Ideas and Methods (PDF) (2nd ed.). Oxford University Press. ISBN 978-0-19-510519-3.
6. ^ a b Korevaar, Jacob (1 January 1968). Mathematical Methods: Linear Algebra / Normed Spaces / Distributions / Integration. 1. New York: Academic Press. pp. 359–360. ISBN 978-1-4832-2813-6.
7. ^ a b Natanson, Isidor P. (1955). Theory of Functions of a Real Variable. 1. Translated by Boron, Leo F. (revised ed.). New York: Frederick Ungar Publishing (published 1983). p. 90. ISBN 978-0-8044-7020-9.
8. ^ Leine, Remco I.; van de Wouw, Nathan (4 March 2008). Stability and Convergence of Mechanical Systems with Unilateral Constraints. Lecture Notes in Applied and Computational Mechanics. 36. Springer. p. 63. ISBN 978-3-540-76974-3.
9. ^ Helmberg, Gilbert (December 1969). Introduction to Spectral Theory in Hilbert Space. North-Holland Series in Applied Mathematics and Mechanics. 6 (1st ed.). Amsterdam: North-Holland Publishing Company (published 1975). p. 320. ISBN 978-0-7204-2356-3.
10. ^ Vestrup, Eric M. (18 September 2003). The Theory of Measures and Integration. Wiley Series in Probability and Statistics. United States: Wiley-Interscience. p. 182. ISBN 978-0-471-24977-1.
11. ^ a b Billingsley, Patrick (1 May 1995). Probability and Measure (PDF). Wiley Series in Probability and Statistics (3rd ed.). United States: Wiley-Interscience. p. 60. ISBN 978-0-471-00710-4. Archived from the original (PDF) on 23 May 2018.
12. ^ Niven, Ivan (1 June 1956). Irrational Numbers. Carus Mathematical Monographs. 11. Rahway: Mathematical Association of America. pp. 2–5. ISBN 978-0-88385-011-4.
13. ^ Baker, Alan (1984). A concise introduction to the theory of numbers. Cambridge University Press. p. 53. ISBN 978-0-521-24383-4.
14. ^ Granville, Andrew; Rudnick, Zeev (7 January 2007). Equidistribution in Number Theory, An Introduction. Nato Science Series II. 237. Dordrecht: Springer. p. 11. ISBN 978-1-4020-5404-4.
15. ^ Burk, Frank (3 November 1997). Lebesgue Measure and Integration: An Introduction. A Wiley-Interscience Series of Texts, Monographs, and Tracts. United States: Wiley-Interscience. p. 260. ISBN 978-0-471-17978-8.
16. ^
17. ^ Hardy, G. H. (1940). Ramanujan: Twelve Lectures on Subjects Suggested by His Life and Work. Cambridge University Press. p. 50.
18. ^ a b Hardy, G. H.; Wright, E. M. (December 1960). Introduction to the Theory of Numbers (4th ed.). Oxford University Press (published 1975). pp. 8–9. ISBN 978-0-19-853310-8.
19. ^ Prachar, Karl (1957). Primzahlverteilung. Grundlehren der mathematischen Wissenschaften (in German). 91. Berlin: Springer. p. 164. Cited in Grosswald, Emil (1 January 1984). Topics from the Theory of Numbers (2nd ed.). Boston: Birkhäuser. p. 30. ISBN 978-0-8176-3044-7.
20. ^ Hinman, Peter G. (11 July 1978). Recursion-Theoretic Hierarchies. Perspectives in Mathematical Logic. Würzburg: Springer. p. 220. ISBN 978-3-540-07904-0.
21. ^ Brown, B. Malcolm; Eastham, Michael S. P.; Schmidt, Karl Michael (30 October 2012). Periodic Differential Operators. Operator Theory: Advances and Applications. 230. Basel: Birkhäuser. p. 105. doi:10.1007/978-3-0348-052. ISBN 978-3-0348-0527-8.
22. ^ Salzmann, Helmut; Grundhöfer, Theo; Hähl, Hermann; Löwen, Rainer (24 September 2007). The Classical Fields: Structural Features of the Real and Rational Numbers. Encyclopedia of Mathematics and Its Applications. 112. Cambridge University Press. p. 155. ISBN 978-0-521-86516-6.
23. ^ Schoutens, Hans (2 August 2010). The Use of Ultraproducts in Commutative Algebra. Lecture Notes in Mathematics. 1999. Springer. p. 8. doi:10.1007/978-3-642-13368-8. ISBN 978-3-642-13367-1.