Here is a definition comes from my calculus book:
For convenience, let's agree to say that the interval $[a,b]$ has the property $P_{\epsilon}$ if there exist sequences $x_{1}, x_{2}, x_{3}, ...$ and $y_{1}, y_{2}, y_{3}, ...$ with $$x_{n},y_{n} \in [a,b],\quad|x_{n} - y_{n}| \lt \frac{1}{n},\quad |f(x_{n}) - f(y_{n})| \gt \epsilon$$ for all indices n.
If I change the last inequality to $$|f(x_{n}) - f(y_{n})| \ge \epsilon,$$
and call it $\tilde{P_{\epsilon}}$, then it's more convenient to prove both lemma. The definition of f is uniformly continuous on $[a,b]$ is equivalent to [a,b] has $\lnot \tilde{P_{\epsilon}}$, both are the same: $$\forall \epsilon \gt 0, \exists \delta \gt 0, \forall x,y \in [a,b] : |x - y| \lt \delta \Rightarrow |f(x) - f(y)| \lt \epsilon.$$
I prove the following lemma using this new definition $\tilde{P_{\epsilon}}$.
To prove $lemma_{1}$:
if $f$ is not uniformly continuous on [a,b], then [a,b] has the property $\tilde{P_{\epsilon}}$ for some $\epsilon \gt 0$.
Assume $f$ is not uniformly continuous on [a,b], which implies $\lnot(\lnot \tilde{P_{\epsilon}}) = \tilde{P_{\epsilon}}$.
To prove $lemma_{2}$, which is designed for proving the Heine–Cantor theorem:
Let $f$ be continuous on $[a,b]$. If $[a,b]$ has the property $\tilde{P_{\epsilon}}$, then at least one of the subintervals $[a,c], [c,b]$, which $c = \frac{a + b}{2}$, has the property $\tilde{P_{\epsilon}}$.
Suppose the $lemma_{2}$ is false. which means:
$[a,b]$ has $\tilde{P_{\epsilon}}$, and both $[a,c], [c,b]$ don't have $\tilde{P_{\epsilon}}$, which means $f$ is uniformly continuous on $[a,c]$ and $[c,b]$.
Now, given an arbitrary $\epsilon \gt 0$, compute $\frac{\epsilon}{2}$, and since $f$ is continuous at c, there exists three integers $p, q, r \gt 0$:
$$\forall x,y \in [a,c]: |x-y| \lt \frac{1}{p} \Rightarrow |f(x)-f(y)| \lt \epsilon. \\ \forall x,y \in [c,b]: |x-y| \lt \frac{1}{q} \Rightarrow |f(x)-f(y)| \lt \epsilon. \\ |x - c| \lt \frac{1}{r} \Rightarrow |f(x) - f(c)| \lt \frac{\epsilon}{2}.$$
Assume $x,y \in [a,b]$, $|x - y| \lt \frac{1}{s}$, $s = \max\{p,q,r\}$. Since the last possible case: $$x \in [a,c], y \in [c,b], |x - c| \lt \frac{1}{r}, |y - c| \lt \frac{1}{r},$$
which implies: $$|f(x) - f(c)| \lt \frac{\epsilon}{2}, \quad |f(x) - f(c)| \lt \frac{\epsilon}{2}$$
For any $\epsilon \gt 0$, there exists $\delta = \frac{1}{s}$, $s = \max\{p,q,r\}$, for any $x,y \in [a,b]$, $$|x - y| \lt \delta \Rightarrow |f(x) - f(y)| \lt \epsilon,$$ which contradicts the assumption: $lemma_{2}$ is false.
Please help me to check whether there is an error in the proof.
By the way, I use $\tilde P_{\epsilon}$ is because the negation of the $P_{\epsilon}$ will end up with: $$|f(x_{n}) - f(y_{n})| \le \epsilon.$$
But I'm not sure: $$|f(x_{n}) - f(y_{n})| \le \epsilon \Rightarrow |f(x_{n}) - f(y_{n})| \lt \epsilon.$$