In probability theory, an event happens almost surely if it happens with probability one. The concept is analogous to the concept of "almost everywhere" in measure theory. It is often encountered in questions that involve infinite time, infinite-dimensional spaces such as function spaces, or infinitesimals.