Lipschitz function or not? Consider segment f defined on $[a,b]$ and for any countable set of segments(which could intersects) $\{[a_{i},b_{i}]\}_{i=0}^{\infty} \subset [a,b]$ such that $\sum |b_{i}-a_{i}| < \infty$ we have $\sum |f(b_{i}) - f(a_{i})| < \infty$. Can we say that such function is Lipschitz function? 
 A: Let me prove that the assumption is enough to conclude that $f$ is Lipschitz.
The main idea is to realize that, in a very loose sense, $f$ preserves integrable functions. Then a form of duality between $L^1$ and $L^{\infty}$ will allow to conclude that $f$ is Lipschitz.
Step 1. Preliminary
We formalize the property in question as follows:

Definition. A function $f : [a, b] \to \mathbb{R}$ is said to have property $\mathscr{P}$ if for any family $\{[a_n, b_n]\}_{n\in\mathbb{N}}$ of subintervals of $[a, b]$, the following implication is true:
$$\sum_{n=1}^{\infty} (b_n - a_n) < \infty \qquad \Rightarrow \qquad \sum_{n=1}^{\infty} |f(b_n) - f(a_n)| < \infty. \tag{*} $$

Next, we call the definition of total variation of a one-variable function on $\mathbb{R}$. For $f : [a, b] \to \mathbb{R}$ and a partition $\mathcal{P} = \{a = x_0 < x_1 < \cdots < x_n = b \}$ we define the variation $V(f, \mathcal{P})$ by
$$ V(f, \mathcal{P}) = \sum_{k=1}^{n} |f(x_k) - f(x_{k-1})| $$
and the total variation $V_{a}^{b}(f)$ of $f$ by
$$ V_a^b(f) = \sup \{ V(f, \mathcal{P}) : \text{$\mathcal{P}$ is a partition of $[a, b]$} \}.$$
It is routine to prove that $V$ has additivity: if $a < c < b$, then $V_{a}^{b}(f) = V_{a}^{c}(f) + V_{c}^{b}(f)$. Now we prove the following lemma.

Lemma. Assume that $f : [a, b] \to \mathbb{R}$ has property $\mathscr{P}$. Then
  
  
*
  
*$f$ is of bounded variation, i.e., $V_a^b(f) < \infty$, and
  
*The function $F(x) = V_{a}^{x}(f)$ has property $\mathscr{P}$.
  

For 1, assume otherwise. Then $V_{a}^{b}(f) = \infty$. We write $[a_0, b_0] = [a, b]$ and we recursively define $[a_n, b_n]$ by the usual bisection argument as follows:
Assume that $V_{a_n}^{b_n}(f) = \infty$ and let $c_n = (a_n + b_n)/2$ denote the middle point of $[a_n, b_n]$. Then by the additivity of $V$, either $V_{a_n}^{c_n}(f) = \infty$ or $V_{c_n}^{b_n}(f) = \infty$. Choose $[a_{n+1}, b_{n+1}]$ as any $[a_n, c_n]$ or $[c_n, b_n]$ on which $V$ attains value $\infty$.
Now for each chosen interval $[a_n, b_n]$, we pick a partition $\mathcal{P}_n = \{a_n = x_{n,0} < \cdots < x_{n,K_n} = b_n \}$ such that $V(f, \mathcal{P}_n) \geq 1$. Then
$$ \sum_{n=1}^{\infty} \sum_{k=1}^{K_n} |x_{n,k} - x_{n,k-1}| = 2(b-a) < \infty $$
while
$$ \sum_{n=1}^{\infty} \sum_{k=1}^{K_n} |f(x_{n,k}) - f(x_{n,k-1})| = \sum_{n=1}^{\infty} V(f, \mathcal{P}_n) = \infty,$$
contradicting the assumption that $f$ has property $\mathscr{P}$. The second part can be proved in a similar spirit. Let $\{[a_n, b_n]\}_{n\in\mathbb{N}}$ be a family of interval such that $\sum_{n=1}^{\infty}(b_n - a_n) < \infty$. From part 1, we know that $V_{a_n}^{b_n}(f) < \infty$. So we choose a partition $\mathcal{P}_n = \{a_n = x_{n,0} < \cdots < x_{n,K_n} = b_n\}$ of $[a_n, b_n]$ such that $V(f, \mathcal{P}_n) \geq \frac{1}{2}V_{a_n}^{b_n}(f)$. Then
$$ \sum_{n=1}^{\infty} |F(b_n) - F(a_n)|
= \sum_{n=1}^{\infty} V_{a_n}^{b_n}(f)
\leq 2 \sum_{n=1}^{\infty} \sum_{k=1}^{K_n} |f(x_{n,k}) - f(x_{n,k-1})|
< \infty. $$
Therefore $F$ satisfies $\text{(*)}$ and hence the conclusion follows. ////
Step 2. Proof of Claim
Now we prove that $f$ is Lipschitz. We will accomplish this by proving that $F$ is Lipschitz. The advantage of considering $F$ is that it is an increasing function, hence defines a finite Borel measure on $[a, b]$ via Lebesgue-Stieltjes integration. The following extension of the property $\mathscr{P}$ is a convenient tool for our quest:

Lemma. Let $\{E_n\}_{n\in\mathbb{N}}$ be a sequence of Borel subsets of $[a, b]$ such that $\sum_{n=1}^{\infty} \operatorname{Leb}(E_n) < \infty$. Then we have
$$ \sum_{n=1}^{\infty} \int \mathbf{1}_{E_n} (x) \, dF(x) < \infty. $$

Indeed, for each $E_n$ we choose a countable family of intervals $\{I_{n,k}\}_{k\in\mathbb{N}}$ such that
$$ E_n \subseteq \bigcup_{k=1}^{\infty} I_{n,k} \quad \text{and} \quad \sum_{k=1}^{\infty} \operatorname{Leb}(I_{n,k}) < \operatorname{Leb}(E_n) + 2^{-n}$$
Then it follows that $ \sum_{n=1}^{\infty} \mathbf{1}_{E_n}(x)
\leq \sum_{n=1}^{\infty} \sum_{k=1}^{\infty} \mathbf{1}_{I_{n,k}}(x) $ and $\sum_{n=1}^{\infty} \sum_{k=1}^{\infty} \operatorname{Leb}(I_{n,k}) < \infty$. Therefore
$$ \sum_{n=1}^{\infty} \int \mathbf{1}_{E_n}(x) \, dF(x)
= \sum_{n=1}^{\infty} \sum_{k=1}^{\infty} \int \mathbf{1}_{I_{n,k}}(x) \, dF(x)
< \infty,$$
completing the proof of Lemma. ////
Now it is time to harvest its consequences.
First, let $E$ be a Borel subset of $[a, b]$ which has zero Lebesgue measure. Then by setting $E_n = E$ for all $n \in \mathbb{N}$ and applying Lemma, we have $\int \mathbf{1}_{E}(x) \, dF(x) = 0$. It follows that $dF$ is absolutely continuous w.r.t. the Lesbesgue measure and hence $F$ has the Radon-Nikodym derivative, which we deonte by $F'$.
Next, for each non-negative Borel function $\varphi : [a, b] \to [0,\infty)$ such that $\int \varphi(x) \, dx < \infty$, we set $E_n = \{ x \in [a, b] : \varphi(x) \leq n \}$. Then $\sum_{n=1}^{\infty} \operatorname{Leb}(E_n) < \infty$ and hence by Lemma,
$$ \int \varphi(x) F'(x) \, dx \leq \sum_{n=1}^{\infty} \int \mathbf{1}_{E_n}(x) F'(x) \, dx < \infty $$
Now it is an exercise to prove that this condition forces $F'$ to be in $L^{\infty}$. (See Addendum for the proof.) Therefore for any $[p, q]\subseteq [a, b]$ we have
$$ |f(q) - f(p)| \leq \int_{p}^{q} F'(x) \, dx \leq \|F'\|_{L^{\infty}} |q - p| $$
and the proof is done.
Addendum. Proof of the skipped part

Proposition. Let $g : [a, b] \to [0, \infty)$ be Borel measurable and $\|g\|_{L^{\infty}} = \infty$. Then there exists a Borel-measurable function $f : [a, b] \to [0,\infty)$ such that
  $$ \int_{[a,b]} f(x) \, dx < \infty \quad \text{but} \quad \int_{[a,b]} f(x)g(x) \, dx = \infty. $$

Proof. Choose $a_n \uparrow \infty$ such that $E_n = \{ x \in [a, b] : a_{n-1} < g(x) \leq a_n \}$ has positive Lebesgue measure for all $n \geq 1$. Set $f$ by
$$ f = \sum_{n=1}^{\infty} \left( \frac{1}{a_{n-1}} - \frac{1}{a_n} \right) \frac{1}{\operatorname{Leb}(E_n)} \mathbb{1}_{E_n}. $$
Then
$$ \int f(x) \, dx = \sum_{n=1}^{\infty} \left( \frac{1}{a_{n-1}} - \frac{1}{a_n} \right) = \frac{1}{a_1} < \infty $$
while
$$ \int f(x)g(x) \, dx
\geq \sum_{n=1}^{\infty} \left( \frac{1}{a_{n-1}} - \frac{1}{a_n} \right) a_{n-1}
= \sum_{n=1}^{\infty} \left( 1 - \frac{a_{n-1}}{a_n} \right). $$
Now if $a_{n-1}/a_n \not\to 1$ then the RHS of the inequality diverges. On the other hand, if $a_{n-1}/a_n \to 1$,
$$ \lim_{n\to\infty} \frac{1 - \frac{a_{n-1}}{a_n}}{\log a_n - \log a_{n-1}} = 1 $$
and hence the conclusion follows from the Stolz–Cesàro theorem.
