Intuition for the "Flip Flop Formula" for the generalized inverse of non-decreasing functions

In our lecture, the generalized inverse of a function $$F$$ is defined as $$$$F^{-}(u) := \inf_x \{ F(x) \ge u \}.$$$$

Then we are introduced to the so-called "Flip Flop Formula", i.e. for a non-decreasing function $$F$$ and its generalized inverse $$F^{-}$$, $$x < F^{-}(u) \Leftrightarrow F(x) < u, \forall x, u.$$

Here is the proof: since $$F$$ is non-decreasing, \begin{aligned} & x < F^{-}(u) = \inf_x \{ F(x) \ge u \} \\ \Leftrightarrow & x \notin \{ F(x) \ge u \} \\ \Leftrightarrow & F(x) < u. \end{aligned}

The proof is straightforward, but the formula itself is somewhat abstract. What's the intuition behind it? It would be great if someone could provide something like a graphical illustration.

• I believe I have a counterexample to the formula: let $F(x) = \lceil x \rceil$. Then $F^-(u) = \operatorname{inf} \{x : \lceil x \rceil \geq u \}$, which equals $u - 1$ if $u$ is an integer and $\lfloor u \rfloor$ otherwise. Let $u$ be a non-integer and $x = \lfloor u \rfloor$: then $x < F^-(u)$ is false (the two are equal), but $F(x) < u$ is true (as $F(x) = x < u$. Sep 29, 2021 at 17:54
• If $A$ is a real interval with right endpoint at $\infty$, then the inference from $x \notin A$ to $x < \inf A$ is not valid, as $A$ might be open at its left endpoint. Was the formula defined only for a specific class of functions (e.g. continuous functions, or functions with discrete domains) such that $\{x : F(x) \geq u\}$ is guaranteed to be a closed set? Sep 29, 2021 at 17:58
• @ConnorHarris Actually, yes! The course I'm taking is named Distribution Theory, so it's likely that every $F$ is implicitly assumed to be a cumulative distribution function. Oct 3, 2021 at 2:39
• OK, in that case, the formula is valid for continuous distributions, or for discrete distributions with the convention that an integral over a delta function $\int_{-\infty}^x \delta(t)\, dt$ is $1$ if $t \geq 0$ and $0$ if $t < 0$. Oct 3, 2021 at 15:01

I have found a counterexample to the formula as stated, but it is valid if the case $$x = F^-(u)$$ is excluded.
Graphically, $$F^-(u_0)$$ is the point $$x_0$$ chosen so that the graph of $$F$$ to the left of $$x_0$$ is strictly below $$u_0$$, and the graph to the right of $$x_0$$ is non-strictly above $$u_0$$. That is, for any point $$x \neq x_0$$, then either $$x < x_0$$ and $$F(x) < u_0$$, or $$x > x_0$$ and $$F(x) \geq u_0$$.
$$F(x_0)$$ itself can be either below or above $$u_0$$: consider the functions $$F_1(x) = \lceil x \rceil$$ and $$F_2(x) = \lfloor x + 1 \rfloor$$, which have the same inverse $$F^-(u) = \lceil u - 1 \rceil$$. Thus, if $$u$$ is a non-integer, then $$x = F^-(u) = \lfloor u \rfloor$$ and so $$F_1(x) = x < u < F_2(x) = x + 1$$.
(I believe the formula is valid as written if the graph of $$F$$ has no segments with an open left endpoint: that is, if the right-handed limit $$\lim_{x' \to x^+} F(x') = x$$ for all $$x$$. This guarantees that $$\{x: F(x) \geq u\}$$ is topologically closed. Note that $$F_1$$ above violates this criterion.)