[proofplan]
Let $A:=\{x\in\mathbb R:F(x)\ge p\}$ be the threshold set whose infimum defines the quantile. The limits of a distribution function at $-\infty$ and $+\infty$ imply that $A$ is nonempty and bounded below, so $q=\inf A$ is a real number. Points strictly below $q$ cannot lie in $A$, which gives $F(x)<p$ for $x<q$ and hence $F(q-)\le p$. Points strictly above $q$ dominate some point of $A$, which gives $F(y)\ge p$ for $y>q$; right-continuity of $F$ at $q$ then yields $p\le F(q)$.
[/proofplan]
[step:Show the threshold set has a finite infimum]
Define the threshold set $A\subset\mathbb R$ by
\begin{align*}
A:=\{x\in\mathbb R:F(x)\ge p\}.
\end{align*}
Since $F$ is a distribution function, $\lim_{x\to\infty}F(x)=1$ and $\lim_{x\to-\infty}F(x)=0$. Because $p<1$, there exists $b\in\mathbb R$ such that $F(b)>p$, and hence $b\in A$. Thus $A$ is nonempty. Because $p>0$, there exists $c\in\mathbb R$ such that $F(c)<p$. Since $F$ is nondecreasing, every $x\le c$ satisfies $F(x)\le F(c)<p$, so $x\notin A$. Therefore $c$ is a lower bound for $A$.
The least lower bound property of $\mathbb R$ now gives a finite real number
\begin{align*}
q=\inf A\in\mathbb R.
\end{align*}
[guided]
The definition of $q$ only makes sense as a real number once we know that the threshold set is neither empty nor unbounded below. We therefore introduce the set being thresholded:
\begin{align*}
A:=\{x\in\mathbb R:F(x)\ge p\}.
\end{align*}
First, $A$ is nonempty. Since $F$ is a distribution function, its limit at $+\infty$ is $1$. Because $p<1$, the definition of the limit gives a point $b\in\mathbb R$ such that
\begin{align*}
F(b)>p.
\end{align*}
In particular $F(b)\ge p$, so $b\in A$.
Second, $A$ is bounded below. Since the limit of $F$ at $-\infty$ is $0$ and $p>0$, there exists $c\in\mathbb R$ such that
\begin{align*}
F(c)<p.
\end{align*}
Now use monotonicity, which is part of the definition of a distribution function. If $x\le c$, then
\begin{align*}
F(x)\le F(c)<p.
\end{align*}
Thus no such $x$ belongs to $A$. Equivalently, every element of $A$ is strictly larger than $c$, so $c$ is a lower bound for $A$.
We have proved that $A$ is a nonempty subset of $\mathbb R$ bounded below. The least lower bound property of the [real numbers](/page/Real%20Numbers) therefore gives
\begin{align*}
q=\inf A\in\mathbb R.
\end{align*}
This is the point where the endpoint limits in the definition of distribution function are essential.
[/guided]
[/step]
[step:Bound the left limit of $F$ at the quantile by $p$]
Let $x\in\mathbb R$ satisfy $x<q$. Since $q=\inf A$, the point $x$ cannot belong to $A$; otherwise $x$ would be an element of $A$ strictly smaller than its greatest lower bound. Hence
\begin{align*}
F(x)<p.
\end{align*}
Because $F$ is nondecreasing, the left limit
\begin{align*}
F(q-)=\lim_{x\uparrow q}F(x)
\end{align*}
exists in $[0,1]$ and equals the supremum of the values $F(x)$ over $x<q$. Since each of these values is at most $p$, we obtain
\begin{align*}
F(q-)\le p.
\end{align*}
[/step]
[step:Use right-continuity to bound $F(q)$ from below by $p$]
Let $y\in\mathbb R$ satisfy $y>q$. Since $q=\inf A$, the number $y$ is not a lower bound for $A$. Therefore there exists $a_y\in A$ such that
\begin{align*}
a_y<y.
\end{align*}
By the definition of $A$,
\begin{align*}
F(a_y)\ge p.
\end{align*}
Since $F$ is nondecreasing and $a_y<y$, it follows that
\begin{align*}
F(y)\ge F(a_y)\ge p.
\end{align*}
Thus $F(y)\ge p$ for every $y>q$.
For each $n\in\mathbb N$, define
\begin{align*}
y_n:=q+\frac{1}{n}.
\end{align*}
Then $y_n>q$ for every $n\in\mathbb N$, so
\begin{align*}
F(y_n)\ge p.
\end{align*}
Also $y_n\downarrow q$. Since $F$ is right-continuous at $q$,
\begin{align*}
F(q)=\lim_{n\to\infty}F(y_n).
\end{align*}
Taking limits in the inequality $F(y_n)\ge p$ gives
\begin{align*}
F(q)\ge p.
\end{align*}
Combining this with the previous step yields
\begin{align*}
F(q-)\le p\le F(q).
\end{align*}
This proves the asserted threshold bounds.
[/step]