In [[mathematics]], the phrase '''almost all''' has a number of specialised uses.
"Almost all" is sometimes used synonymously with "all but [[finite set|finite]]ly many" or "all but a [[countable set]]"; see [[almost]]. An example of this usage is the ''Frivolous Theorem of Arithmetic'', which states that ''almost all natural numbers are very, very, very large''.<ref>{{MathWorld|urlname=FrivolousTheoremofArithmetic|title=Frivolous Theorem of Arithmetic}}</ref>
When speaking about the [[real number|reals]], sometimes it means "all reals but a set of [[Lebesgue measure]] zero". In this sense we can say "almost all reals are not a member of the [[Cantor set]]".
In [[number theory]], if ''P''(''n'') is a property of positive [[integer]]s, and if ''p''(''N'') denotes the number of [[positive integers]] ''n'' less than ''N'' for which ''P''(''n'') holds, and if
:''p''(''N'')/''N'' → 1 as ''N'' → ∞
(see [[Limit (mathematics)|limit]]), then we say that "''P''(''n'') holds for almost all positive integers ''n''" and write
:<math>(\forall^\infty n) P(n)</math>.
For example, the [[prime number theorem]] states that the number of [[prime numbers]] less than or equal to ''N'' is asymptotically equal to ''N''/ln ''N''. Therefore the proportion of prime integers is roughly 1/ln ''N'', which tends to 0. Thus, ''almost all'' positive integers are [[composite number|composite]] (not prime), however there are still an infinite number of primes.
Occasionally, "almost all" is used in the sense of "[[almost everywhere]]" in [[measure theory]], or in the closely related sense of "[[almost surely]]" in [[probability theory]].
==See also==
*[[Sufficiently large]]
==References==
<references/>
[[Category:Mathematical terminology]]
[[Category:Mathematical notation]]
[[de:Fast alle]]
[[he:כמעט כל (מתמטיקה)]]