Q:

Pointwise Lipschitz constant and exchanging supremum and limit

I have come across the following definition:
Let $(X, d)$ be a metric space . Given a function $f \colon X \to \mathbb{R}$, the pointwise Lipschitz constant of $f$ at a non isolated point $x \in X$ is defined as 
$$Lipf(x)=\limsup_{y \to x} |f(x)-f(y)|/d(x,y)$$
I am not quite sure how this definition is supposed to work. Do you take the supremum of that ratio over all $y$ which would then depend on $y$ and afterwards  you take the limit as $y \to  \infty$ ? I would really appreciate it if someone could give a (non-trivial) example of finding the constant. The definition also made me wonder when can you exchange $\sup$ and $\lim$ in the above definition and how the following theorem can be proved
If $f\in C^{1}(\Omega)$ where $\Omega$ is an open subset of Euclidean space, then $Lipf(x)=|\nabla f|$. 
Source: https://www.ipam.ucla.edu/publications/iagws1/iagws1_11193.pdf (slide 7)

A:

These are not lim and sup taken separately, "lim sup" is a notation for the upper limit, a.k.a. limit superior, alternatively denoted $\overline{\lim}$. It's the supremum of the limit points, in this case it's $\lim_{\varepsilon\to0}\sup_{|y-x|\leq\varepsilon}|f(x)-f(y)|/d(x,y)$. If the limit exists the upper limit coincides with it, but the upper limit always exists if $\infty$ is allowed as a value. 
In a Euclidean space $d(x,y)=|x-y|$ and for a $C^1$ function $f(y)-f(x)=\nabla f(x)\cdot(y-x)+o(|x-y|)$, so $$|f(y)-f(x)|\leq|\nabla f(x)||y-x|+o(|x-y|).$$
Dividing both sides by $|x-y|$ and taking the upper limit we get that Lip$f(x)\leq|\nabla f(x)|$ since $o(|x-y|)/|x-y|$ converges to $0$ by definition of $o$ notation. Choosing $y$ so that $y-x$ stays parallel to $\nabla f(x)$ as $y$ approaches $x$ shows that the equality can be attained, so Lip$f(x)=|\nabla f(x)|$.

