I had a fun talk about this with an interviewer once when they asked me about the runtime complexity of some algorithm.
Let and be eventually positive functions from to . Pick an unlimited hypernatural (we write for short), and look directly at the ratio
Then the big O relations become simple checks on , and we require that the condition holds for every unlimited :
We have if and only if there exists a standard constant such that . In math:
We have if and only if there exists a standard constant such that . In math:
We have if and only if there exist standard constants such that . In math:
We have if and only if (that is, the ratio is infinitesimal). In math:
We have if and only if is unlimited. In math:
Examples
For and , we compute , which is infinitesimal. Therefore . In math:
For and , we compute , which is unlimited. Therefore , and hence . In math:
For , where is any standard real number, and , we compute . Since is infinitesimal, we have . Therefore . In math:
The "for every unlimited " condition encodes the usual "for all sufficiently large " via transfer. A single infinite index can be fooled by oscillations; checking every unlimited gives you the uniformity you need.
For example, let and define by parity of the integer part:
- if is even, set ;
- if is odd, set .
Then is eventually positive, and the ratio oscillates between (on even blocks) and (on odd blocks). A single check at an even unlimited gives and could tempt you to say . But along odd unlimited we have , so and hence , even though . In math: along even , ; along odd , . Requiring the condition for every unlimited prevents this mistake.