0 for almost all numbers in the unit interval. It follows from the previous example because the Cantor function is locally constant, and thus has derivative 0 outside the Cantor set. Meaning in number theory In number theory, "almost all positive integers" can mean "the positive integers in a set whose natural density is 1". That is, if A is a set of positive integers, and if the proportion of positive integers in A below n (out of all positive integers below n) tends to 1 as n tends to infinity, then almost all positive integers are in A. More generally, let S be an infinite set of positive integers, such as the set of even positive numbers or the set of primes, if A is a subset of S, and if the proportion of elements of S below n that are in A (out of all elements of S below n) tends to 1 as n tends to infinity, then it can be said that almost all elements of S are in A. Examples: The natural density of cofinite sets of positive integers is 1, so each of them contains almost all positive integers. Almost all positive integers are composite. Almost all even positive numbers can be expressed as the sum of two primes. Almost all primes are isolated. Moreover, for every positive integer , almost all primes have prime gaps of more than both to their left and their right; that is, there is no other prime between and . Meaning in graph theory In graph theory, if A is a set of (finite labelled) graphs, it can be said to contain almost all graphs, if the proportion of graphs with n vertices that are in A tends to 1 as n tends to infinity. However, it is sometimes easier to work with probabilities, so the definition is reformulated as follows. The proportion of graphs with n vertices that are in A equals the probability that a random graph with n vertices (chosen with the uniform distribution) is in A, and choosing a graph in this way has the same outcome as generating a graph by flipping a coin for each pair of vertices to decide whether to connect them. Therefore, equivalently to the preceding definition, the set A contains almost all graphs if the probability that a coin flip-generated graph with n vertices is in A tends