Alphabeta Math
Session-authored (Fable 5 assisted)
How statement and proof provenance work

The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.

  • Literature-sourced — the exact statement appears in a cited source; only wording and notation differ.
  • AI-adapted — a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
  • AI-generated — a genuinely novel statement formulated by AI, with no source for the claim itself.

These labels describe origin, not correctness: citations and verification chips remain separate evidence.

11 results · all verified · 8 also independently AI-judged
Every result on this page is machine-checked by a proof checker and read in full and owner-audited; the judge is an additional, independent cross-model AI review of the proofs. The 3 not AI-judged were verified by owner audit (typically over a confirmed judge false positive), not failures.

Compactness in Metric Spaces: Examples and Counterexamples

1 · Prerequisites

2 · Summary

3 · Logical flowchart

4 · Definitions, theorems and proofs

None yet.

5 · Examples, counterexamples and false statements

ExampleConstruction: AI-adaptedVerification: AI-generatedprecheck passjudge pass (z-ai/glm-5.2)audited 2026-07-27Open item page →

With the discrete metric d(x,y)=1d(x,y) = 1 for xyx \ne y, a space is compact iff it is totally bounded iff it is finite, and it is complete whatever its size

Example

Let SS be a set and define d:S×SRd : S \times S \to \mathbb{R} by d(x,y)=0d(x,y) = 0 when x=yx = y and d(x,y)=1d(x,y) = 1 when xyx \ne y: the discrete metric on SS. Then:

  1. dd is a metric (Metric space: d(x,y)=0d(x,y) = 0 iff x=yx = y, symmetry, and the triangle inequality; pseudometric and ultrametric), B(x,r)={x}B(x,r) = \{x\} for 0<r10 < r \le 1 and B(x,r)=SB(x,r) = S for r>1r > 1 (Open ball, closed ball and sphere in a metric space), and every subset of SS is both open and closed (The metric topology: a set is open when every one of its points has a ball around it inside the set; closed means open complement).
  2. (S,d)(S,d) is complete (Complete metric space: every Cauchy sequence converges in the space), whatever SS is: a Cauchy sequence in it is eventually constant.
  3. The following are equivalent: (S,d)(S,d) is compact (Open cover, subcover, compact metric space, and compact subset of a metric space); (S,d)(S,d) is totally bounded (Finite ε\varepsilon-net and totally bounded metric space); SS is finite (Finite, countably infinite, countable, uncountable).

So the discrete metric separates the two halves of "complete and totally bounded": it is always complete, and it is totally bounded only in the trivial case.

Facts & Assumptions

Given: A set SS and the discrete metric dd on it, with d(x,y)=0d(x,y) = 0 for x=yx = y and d(x,y)=1d(x,y) = 1 otherwise.

[L1]

A metric satisfies (M1) d(x,y)=0d(x,y) = 0 exactly when x=yx = y, (M2) symmetry, (M3) the triangle inequality (Metric space: d(x,y)=0d(x,y) = 0 iff x=yx = y, symmetry, and the triangle inequality; pseudometric and ultrametric).

[L2]

B(x,r)={y:d(x,y)<r}B(x,r) = \{y : d(x,y) < r\}; a set is open when every point of it has a ball around it inside it, and closed when its complement is open (Open ball, closed ball and sphere in a metric space, The metric topology: a set is open when every one of its points has a ball around it inside the set; closed means open complement).

[L3]

(xk)(x_k) is Cauchy when for every rational ε>0\varepsilon > 0 there is KK with d(xm,xn)<εd(x_m,x_n) < \varepsilon for m,nKm,n \ge K; it converges to pp when for every rational ε>0\varepsilon > 0 there is KK with d(xk,p)<εd(x_k,p) < \varepsilon for kKk \ge K; the space is complete when every Cauchy sequence converges in it (Cauchy sequence in a metric space, Convergence of a sequence in a metric space: xkxx_k \to x iff d(xk,x)0d(x_k, x) \to 0 in R\mathbb{R}, Complete metric space: every Cauchy sequence converges in the space).

[L4]

(S,d)(S,d) is compact when every family of open subsets with union SS has a finite subfamily with union SS; a finite set is empty or listable as {s0,,sp}\{s_0, \dots, s_p\} (Open cover, subcover, compact metric space, and compact subset of a metric space, Finite, countably infinite, countable, uncountable).

[L5]

A finite ε\varepsilon-net is a finite FSF \subseteq S with S=yFB(y,ε)S = \bigcup_{y \in F} B(y,\varepsilon), and total boundedness asks for one at every real ε>0\varepsilon > 0 (Finite ε\varepsilon-net and totally bounded metric space).

[L7]

A function with domain a natural number all of whose values are nonempty sets has a choice function, in ZF (Every natural-number-indexed list of nonempty sets has a choice function on its family of values).

Verification

technique · direct
1.1

dd is a metric: (M1) holds by definition; (M2) because the condition xyx \ne y is symmetric; and (M3) because d(x,z)d(x,z) is 00 or 11, and when it is 11 one has xzx \ne z, so yy differs from at least one of xx and zz and d(x,y)+d(y,z)1d(x,y) + d(y,z) \ge 1.

L1
2.1

For 0<r10 < r \le 1, d(x,y)<r1d(x,y) < r \le 1 forces d(x,y)=0d(x,y) = 0 and y=xy = x, so B(x,r)={x}B(x,r) = \{x\}; for r>1r > 1 every yy has d(x,y)1<rd(x,y) \le 1 < r, so B(x,r)=SB(x,r) = S. Hence every ASA \subseteq S is open, each xAx \in A having B(x,1)={x}AB(x,1) = \{x\} \subseteq A, and every subset is closed as well, its complement being open: claim 1.

L2step 1.1
2.2

Claim 2: let (xk)(x_k) be Cauchy and take KK with d(xm,xn)<1d(x_m,x_n) < 1 for m,nKm,n \ge K; then d(xm,xK)=0d(x_m,x_K) = 0, that is xm=xKx_m = x_K, for every mKm \ge K, so d(xk,xK)=0<εd(x_k, x_K) = 0 < \varepsilon for kKk \ge K and every rational ε>0\varepsilon > 0, and xkxKSx_k \to x_K \in S.

L1L3step 1.1
3.1

For claim 3, suppose SS is finite. If S=S = \emptyset then the empty subfamily of any family covers it; otherwise list S={s0,,sp}S = \{s_0, \dots, s_p\}, let U\mathcal{U} be a family of open sets with union SS, and note that for each ipi \le p the set {UU:siU}\{U \in \mathcal{U} : s_i \in U\} is nonempty, so finite choice supplies U0,,UpUU_0, \dots, U_p \in \mathcal{U} with siUis_i \in U_i; their union contains every sis_i and hence is SS. So (S,d)(S,d) is compact.

L4L7step 2.2
4.1

If (S,d)(S,d) is compact it is totally bounded.

L6step 3.1
5.1

If (S,d)(S,d) is totally bounded, take a finite (1/2)(1/2)-net FF; then S=yFB(y,1/2)=yF{y}=FS = \bigcup_{y \in F} B(y,1/2) = \bigcup_{y \in F} \{y\} = F by step 2.1, so SS is finite.

L5step 2.1step 4.1
6.1

Steps 3.1, 4.1 and 5.1 close the cycle finite \Rightarrow compact \Rightarrow totally bounded \Rightarrow finite, so the three conditions of claim 3 are equivalent.

step 3.1step 4.1step 5.1

Remarks

This is the standard witness for two of the false statements of the A page. Taking S=NS = \mathbb{N} gives a bounded space that is not totally bounded (FALSE: a bounded metric space is totally bounded, N\mathbb{N} with the discrete metric is bounded and is not totally bounded) and a closed bounded subset of a metric space that is not compact (FALSE: a closed and bounded subset of a metric space is compact).

Completeness is not what compactness adds. Claim 2 holds for every SS, including infinite ones, so completeness alone is very far from compactness. What the discrete metric lacks is total boundedness, and by For a metric space, compact, countably compact, limit point compact, sequentially compact, and complete together with totally bounded are all equivalent, given countable choice and dependent choice it is exactly the pair of conditions that is equivalent to compactness.

Boundedness of the space is unconditional too. Every discrete space is contained in B(x,2)B(x,2) for any of its points, so, for infinite SS, it is bounded, complete, and not compact all at once (Bounded subset, diameter, distance from a point to a set, and distance between two sets in a metric space).

ExampleConstruction: AI-adaptedVerification: AI-adaptedprecheck passverified 2026-08-04 (gpt-5.6-sol-codex-subscription)Open item page →

The cube [M,M]n[-M,M]^n in Rn\mathbb{R}^n is totally bounded, with an explicit finite ε\varepsilon-net of grid points and no appeal to the integer part

Example

Let nNn \in \mathbb{N} with n1n \ge 1, let MRM \in \mathbb{R} with M>0M > 0, and let (Rn,d2)(\mathbb{R}^n, d_2) carry the Euclidean metric (Rn\mathbb{R}^n as the set of functions nRn \to \mathbb{R}, and d1d_1, d2d_2, dd_\infty are metrics on it). The cube

Q  :=  {xRn:MxkM  for every k<n}Q \;:=\; \{\, x \in \mathbb{R}^n : -M \le x_k \le M \ \text{ for every } k < n \,\}

is a totally bounded metric subspace of (Rn,d2)(\mathbb{R}^n,d_2) (Finite ε\varepsilon-net and totally bounded metric space, Isometry, isometric embedding, and the subspace metric on a subset), and a finite ε\varepsilon-net can be written down: choose a natural m1m \ge 1 with 1/m<ε/(2Mι(n))1/m < \varepsilon/(2M\iota(n)), put h:=2M/mh := 2M/m, and take the grid

G  :=  {gQ:each gk=M+jkh for some natural jkm}.G \;:=\; \{\, g \in Q : \text{each } g_k = -M + j_k h \text{ for some natural } j_k \le m \,\}.

No integer part and no floor function is used: the index jkj_k attached to a point of QQ is produced as a least natural meeting an inequality (The well-ordering principle).

Facts & Assumptions

Given: n1n \ge 1, a real M>0M > 0, the cube QRnQ \subseteq \mathbb{R}^n with the metric d2d_2 restricted to it, and a real ε>0\varepsilon > 0.

[L1]

d2(x,y)=k<n(xkyk)2d_2(x,y) = \sqrt{\sum_{k<n}(x_k-y_k)^2} is a metric on Rn\mathbb{R}^n, and d(x,y)=max{xkyk:k<n}d_\infty(x,y) = \max\{|x_k-y_k| : k<n\} is another (Rn\mathbb{R}^n as the set of functions nRn \to \mathbb{R}, and d1d_1, d2d_2, dd_\infty are metrics on it, Finite sums and finite products, by recursion, Absolute value in an ordered field).

[L2]

d2(x,y)ι(n)d(x,y)d_2(x,y) \le \iota(n)\, d_\infty(x,y), since each (xkyk)2d(x,y)2(x_k-y_k)^2 \le d_\infty(x,y)^2 gives d2(x,y)2ι(n)d(x,y)2(ι(n)d(x,y))2d_2(x,y)^2 \le \iota(n) d_\infty(x,y)^2 \le (\iota(n)d_\infty(x,y))^2 using ι(n)1\iota(n) \ge 1, and squaring is monotone on the nonnegatives (Laws of finite sums and finite products, Squaring is monotone on the nonnegatives, Square roots exist: a unique a0\sqrt{a} \ge 0 with (a)2=a(\sqrt{a})^2 = a; the positives are {x2:x0}\{x^2 : x \neq 0\}, The canonical natural ι(n)=n1F\iota(n) = n \cdot 1_F of a field).

[L3]

A finite ε\varepsilon-net for a metric space is a finite subset FF of it with the balls B(y,ε)B(y,\varepsilon), yFy \in F, covering the space, and total boundedness asks for one at every real ε>0\varepsilon > 0; balls of a subspace are traces of ambient balls (Finite ε\varepsilon-net and totally bounded metric space, Open ball, closed ball and sphere in a metric space, Isometry, isometric embedding, and the subspace metric on a subset).

[L4]

A set listed as {a0,,ap}\{a_0, \dots, a_p\}, that is the image of a function whose domain is a natural number, is finite (Open cover, subcover, compact metric space, and compact subset of a metric space).

[L5]

Every nonempty subset of N\mathbb{N} has a least element (The well-ordering principle).

[L6]

For every real η>0\eta > 0 there is a natural m1m \ge 1 with 1/m<η1/m < \eta; reciprocals of positives are positive and reverse the order; and integer powers are those of Integer powers ama^m (For every ε>0\varepsilon > 0 in a complete ordered field there is a natural n1n \ge 1 with 1/n<ε1/n < \varepsilon, Every complete ordered field is Archimedean, Inverses of positives are positive, and reciprocation reverses order).

Verification

technique · direct
1.1

Take a natural m1m \ge 1 with 1/m<ε/(2Mι(n))1/m < \varepsilon/(2M\iota(n)), which exists because 2Mι(n)>02M\iota(n) > 0, and put h:=2M/m>0h := 2M/m > 0, so that ι(n)h=2Mι(n)/m<ε\iota(n) h = 2M\iota(n)/m < \varepsilon.

L6
2.1

Let GG be the set of points of Rn\mathbb{R}^n each of whose coordinates is M+jh-M + jh for some natural jmj \le m; every such point lies in QQ, since 0jhmh=2M0 \le jh \le mh = 2M gives MM+jhM-M \le -M + jh \le M.

L1step 1.1
3.1

GG is finite: writing a natural t<(m+1)nt < (m+1)^n in base m+1m+1 gives digits t0,,tn1t_0, \dots, t_{n-1}, each a natural m\le m, and tt \mapsto the point with kk-th coordinate M+tkh-M + t_k h is a function from the natural number (m+1)n(m+1)^n onto GG, so GG is listed by that function.

L4step 2.1
3.2

Let yQy \in Q and k<nk < n; the set of naturals jmj \le m with ykM+jhy_k \le -M + jh is nonempty, containing mm because ykM=M+mhy_k \le M = -M + mh, so it has a least element jkj_k.

L5step 2.1
4.1

Then yk(M+jkh)h|y_k - (-M + j_k h)| \le h: if jk=0j_k = 0 then ykMy_k \le -M and also ykMy_k \ge -M, so the difference is 00; and if jk1j_k \ge 1 then minimality gives yk>M+(jk1)hy_k > -M + (j_k-1)h, so h<yk(M+jkh)0-h < y_k - (-M+j_k h) \le 0.

step 3.2
5.1

Writing gg for the point of GG with kk-th coordinate M+jkh-M + j_k h, step 4.1 gives d(y,g)hd_\infty(y,g) \le h, hence d2(y,g)ι(n)h<εd_2(y,g) \le \iota(n)h < \varepsilon by step 1.1, so yy lies in the ball of radius ε\varepsilon about gg in the subspace QQ.

L1L2L3step 1.1step 4.1
6.1

So GG is a finite ε\varepsilon-net for QQ; as ε>0\varepsilon > 0 was arbitrary, QQ is totally bounded.

L3step 3.1step 5.1

Remarks

A second proof, and why the explicit one is worth having. QQ is closed and bounded in Rn\mathbb{R}^n, hence compact (Heine-Borel in Rn\mathbb{R}^n: with the Euclidean metric a subset of Rn\mathbb{R}^n is compact if and only if it is closed and bounded, and the proof by bisection uses no choice principle; the same holds on the real line), hence totally bounded (A compact metric space is complete and totally bounded, and neither implication uses any choice principle), which proves the same statement in one line. The explicit grid is given because it exhibits the net rather than asserting that one exists, and because the count of grid points, (m+1)n(m+1)^n, shows how the size of a net grows with the dimension — the feature that makes total boundedness a genuinely metric notion rather than a consequence of boundedness (FALSE: a bounded metric space is totally bounded).

Why the least index and not the integer part. The natural choice of jkj_k is the integer part of (yk+M)/h(y_k+M)/h, and this library has no integer-part function at this point in the reading order. Taking the least jmj \le m with ykM+jhy_k \le -M + jh produces the same index, using only that a nonempty set of naturals has a least element.

ExampleConstruction: AI-adaptedVerification: AI-generatedprecheck passjudge pass (z-ai/glm-5.2)audited 2026-07-27Open item page →

In any metric space the range of a convergent sequence together with its limit is compact, worked out for {0}{1/(k+1):kN}\{0\} \cup \{1/(k+1) : k \in \mathbb{N}\} in R\mathbb{R}

Example

Let (X,d)(X,d) be a metric space (Metric space: d(x,y)=0d(x,y) = 0 iff x=yx = y, symmetry, and the triangle inequality; pseudometric and ultrametric), let (xk)(x_k) be a sequence in XX converging to pXp \in X (Convergence of a sequence in a metric space: xkxx_k \to x iff d(xk,x)0d(x_k, x) \to 0 in R\mathbb{R}, Sequences of reals: bounded, eventually, frequently, tails, subsequences), and put

K  :=  {xk:kN}{p}.K \;:=\; \{\, x_k : k \in \mathbb{N} \,\} \cup \{p\}.

Then KK is a compact subset of XX (Open cover, subcover, compact metric space, and compact subset of a metric space).

In R\mathbb{R} with the usual metric (The absolute value makes R\mathbb{R} a metric space: d(x,y)=xyd(x,y) = |x-y| is a metric, its open balls are the intervals (xr,x+r)(x-r, x+r), and it is unbounded) the sequence xk:=1/(k+1)x_k := 1/(k+1) converges to 00, so {0}{1/(k+1):kN}\{0\} \cup \{\, 1/(k+1) : k \in \mathbb{N} \,\} is compact. The index is written k+1k+1 because N\mathbb{N} contains 00 and 1/01/0 is undefined (Sequences of reals: bounded, eventually, frequently, tails, subsequences).

Dropping the limit destroys compactness: the range alone is not closed in R\mathbb{R}, and a compact subset is closed (A compact subset of a metric space is closed and bounded).

Facts & Assumptions

Given: A metric space (X,d)(X,d), a sequence (xk)(x_k) in XX with xkpXx_k \to p \in X, and K:={xk:kN}{p}K := \{x_k : k \in \mathbb{N}\} \cup \{p\}.

[L1]

AXA \subseteq X is compact exactly when every family (Ui)iI(U_i)_{i \in I} of open subsets of XX with AiIUiA \subseteq \bigcup_{i \in I}U_i has finitely many members whose union contains AA, or A=A = \emptyset (A subset of a metric space is open in the subspace metric exactly when it is the trace of an open set of the ambient space, and it is compact as a metric space in its own right exactly when every family of open subsets of the ambient space covering it, indexed or not, has finitely many members covering it, Open cover, subcover, compact metric space, and compact subset of a metric space).

[L2]

xkpx_k \to p means: for every rational ε>0\varepsilon > 0 there is K0NK_0 \in \mathbb{N} with d(xk,p)<εd(x_k,p) < \varepsilon for all kK0k \ge K_0 (Convergence of a sequence in a metric space: xkxx_k \to x iff d(xk,x)0d(x_k, x) \to 0 in R\mathbb{R}).

[L4]

A function with domain a natural number all of whose values are nonempty sets has a choice function, in ZF (Every natural-number-indexed list of nonempty sets has a choice function on its family of values).

Verification

technique · direct
1.1

Let (Ui)iI(U_i)_{i \in I} be a family of open subsets of XX with KiIUiK \subseteq \bigcup_{i \in I} U_i.

L1
2.1

Since pKp \in K there is iIi^{\ast} \in I with pUip \in U_{i^{\ast}}, and openness gives a real r>0r > 0 with B(p,r)UiB(p,r) \subseteq U_{i^{\ast}}.

L3step 1.1
3.1

Taking a positive rational below rr, for instance 1/N1/N with N1N \ge 1 a natural and 1/N<r1/N < r, convergence supplies K0NK_0 \in \mathbb{N} with d(xk,p)<1/N<rd(x_k,p) < 1/N < r for every kK0k \ge K_0, so xkB(p,r)Uix_k \in B(p,r) \subseteq U_{i^{\ast}} for every kK0k \ge K_0.

L2L5step 2.1
4.1

For each j<K0j < K_0 the set {iI:xjUi}\{\, i \in I : x_j \in U_i \,\} is nonempty, since xjKx_j \in K; finite choice applied to jj \mapsto that set gives indices i0,,iK01Ii_0, \dots, i_{K_0-1} \in I with xjUijx_j \in U_{i_j} for every j<K0j < K_0, this list being empty when K0=0K_0 = 0.

L4step 3.1
5.1

Then KUiUi0UiK01K \subseteq U_{i^{\ast}} \cup U_{i_0} \cup \dots \cup U_{i_{K_0-1}}: the point pp and every xkx_k with kK0k \ge K_0 lie in UiU_{i^{\ast}} by steps 2.1 and 3.1, and every xjx_j with j<K0j < K_0 lies in UijU_{i_j}. So finitely many members of the family cover KK, and KK is compact.

L1step 2.1step 3.1step 4.1
6.1

For the instance in R\mathbb{R}, the terms 1/(k+1)1/(k+1) satisfy 1/(k+1)0=1/(k+1)<ε|1/(k+1) - 0| = 1/(k+1) < \varepsilon for every kk with k+1Nk+1 \ge N, where N1N \ge 1 is a natural with 1/N<ε1/N < \varepsilon; so 1/(k+1)01/(k+1) \to 0 and {0}{1/(k+1):kN}\{0\} \cup \{1/(k+1) : k \in \mathbb{N}\} is compact by the general claim.

L2L5step 5.1

Remarks

Finitely many exceptional terms is the whole idea. All but finitely many terms are captured by the single member containing the limit, and the remaining ones are finitely many points, each needing one member. That is why the selection at step 4.1 is over a finite index set and costs nothing (Every natural-number-indexed list of nonempty sets has a choice function on its family of values).

Without the limit point the set is not compact. In R\mathbb{R} the set {1/(k+1):kN}\{1/(k+1) : k \in \mathbb{N}\} has 00 in its closure and does not contain it, so it is not closed and hence not compact (A compact subset of a metric space is closed and bounded).

ExampleConstruction: AI-adaptedVerification: AI-generatedprecheck passjudge pass (z-ai/glm-5.2)audited 2026-07-27Open item page →

The distance from a point to a nonempty compact set is attained at a point of that set, and two disjoint compact sets are at positive distance

Example

Let (X,d)(X,d) be a metric space (Metric space: d(x,y)=0d(x,y) = 0 iff x=yx = y, symmetry, and the triangle inequality; pseudometric and ultrametric), with d(x,A)d(x,A) and d(A,B)d(A,B) the distances from a point to a nonempty set and between two nonempty sets (Bounded subset, diameter, distance from a point to a set, and distance between two sets in a metric space). Then:

  1. If KXK \subseteq X is nonempty and compact (Open cover, subcover, compact metric space, and compact subset of a metric space) and xXx \in X, there is aKa \in K with d(x,a)=d(x,K)d(x,a) = d(x,K): the infimum defining the distance is attained.
  2. If K,LXK, L \subseteq X are nonempty, compact and disjoint, then d(K,L)>0d(K,L) > 0, and again the value is attained at a point of KK.

Neither statement holds for arbitrary closed sets, and neither uses a choice principle.

Facts & Assumptions

Given: A metric space (X,d)(X,d), nonempty compact subsets KK and LL of XX, and a point xXx \in X.

[L1]

For nonempty AXA \subseteq X, d(x,A)=inf{d(x,y):yA}d(x,A) = \inf\{d(x,y) : y \in A\} and d(A,B)=inf{d(u,v):uA, vB}d(A,B) = \inf\{d(u,v) : u \in A,\ v \in B\}; an infimum is a lower bound of its set and is at least every lower bound (Bounded subset, diameter, distance from a point to a set, and distance between two sets in a metric space, Greatest lower bound (infimum), Epsilon characterisation of the infimum).

[L5]

A minimum of a set of reals is a member of it and bounds it below (Maximum and minimum of a set).

Verification

technique · direct
1.1

The map f:KRf : K \to \mathbb{R}, f(u):=d(x,{u})=d(x,u)f(u) := d(x,\{u\}) = d(x,u), is the restriction to KK of ud(u,{x})u \mapsto d(u,\{x\}), which is Lipschitz with constant 11 and hence continuous; KK with the restricted metric is a nonempty compact metric space.

L2L3
2.1

So ff attains a least value at some aKa \in K: d(x,a)d(x,u)d(x,a) \le d(x,u) for every uKu \in K.

L3L5step 1.1
3.1

Hence d(x,a)d(x,a) is a lower bound of {d(x,u):uK}\{d(x,u) : u \in K\} that belongs to the set, so it is the infimum: d(x,a)=d(x,K)d(x,a) = d(x,K), which is claim 1.

L1L5step 2.1
4.1

For claim 2, the map g:KRg : K \to \mathbb{R}, g(u):=d(u,L)g(u) := d(u,L), is continuous by the same argument, so it attains a least value at some bKb \in K.

L2L3step 3.1
5.1

g(b)>0g(b) > 0: otherwise d(b,L)=0d(b,L) = 0 would put bb in the closure of LL, which equals LL because LL is compact and hence closed, contradicting KL=K \cap L = \emptyset.

L4step 4.1
6.1

d(K,L)=g(b)d(K,L) = g(b): every uKu \in K and vLv \in L satisfy d(u,v)d(u,L)g(b)d(u,v) \ge d(u,L) \ge g(b), so g(b)g(b) is a lower bound of {d(u,v):uK,vL}\{d(u,v) : u \in K, v \in L\}; and d(K,L)d(b,v)d(K,L) \le d(b,v) for every vLv \in L, so d(K,L)d(K,L) is a lower bound of {d(b,v):vL}\{d(b,v) : v \in L\} and therefore d(K,L)d(b,L)=g(b)d(K,L) \le d(b,L) = g(b).

L1L5step 4.1step 5.1
7.1

Combining, d(K,L)=g(b)>0d(K,L) = g(b) > 0 and the value is attained at bKb \in K: claim 2.

step 5.1step 6.1

Remarks

Compactness is what makes the infimum a minimum. For a merely closed set the infimum need not be attained and disjoint closed sets can be at distance zero; what claim 1 uses is the extreme value theorem, and claim 2 additionally uses that a compact set is closed (A compact subset of a metric space is closed and bounded).

Only one of the two sets has to be compact for the attainment in claim 1, the point xx playing the role of a one-point compact set. In claim 2 compactness of KK gives the attainment and closedness of LL gives the positivity, which is why the proof calls on the two properties in different places.

ExampleConstruction: AI-generatedVerification: AI-generatedprecheck passjudge pass (z-ai/glm-5.2)audited 2026-07-27Open item page →

The cover of [0,1][0,1] by (1,2/3)(-1, 2/3) and (1/3,2)(1/3, 2) has Lebesgue number 1/31/3, and no larger one

Example

Work in R\mathbb{R} with its usual metric d(x,y)=xyd(x,y) = |x-y| (The absolute value makes R\mathbb{R} a metric space: d(x,y)=xyd(x,y) = |x-y| is a metric, its open balls are the intervals (xr,x+r)(x-r, x+r), and it is unbounded) and let [0,1][0,1] carry the restricted metric (Isometry, isometric embedding, and the subspace metric on a subset, Intervals of R\mathbb{R}: the nine order-convex forms, nondegeneracy, and length). Put

U:=(1, 2/3)[0,1]=[0, 2/3),V:=(1/3, 2)[0,1]=(1/3, 1],U := (-1,\ 2/3) \cap [0,1] = [0,\ 2/3), \qquad V := (1/3,\ 2) \cap [0,1] = (1/3,\ 1],

so that {U,V}\{U,V\} is an open cover of the compact metric space [0,1][0,1] (Open cover, subcover, compact metric space, and compact subset of a metric space, Heine-Borel in Rn\mathbb{R}^n: with the Euclidean metric a subset of Rn\mathbb{R}^n is compact if and only if it is closed and bounded, and the proof by bisection uses no choice principle; the same holds on the real line). Then:

  1. δ=1/3\delta = 1/3 is a Lebesgue number for {U,V}\{U,V\} (Every open cover of a compact metric space has a Lebesgue number: a δ>0\delta > 0 such that every nonempty subset of diameter less than δ\delta lies inside a single member of the cover): every nonempty A[0,1]A \subseteq [0,1] with diam(A)<1/3\operatorname{diam}(A) < 1/3 (Bounded subset, diameter, distance from a point to a set, and distance between two sets in a metric space) is contained in UU or in VV.
  2. No larger δ\delta works: for every real δ>1/3\delta' > 1/3 the set A:=[1/3, 2/3]A := [1/3,\ 2/3] is nonempty with diam(A)=1/3<δ\operatorname{diam}(A) = 1/3 < \delta' and is contained in neither UU nor VV.

Facts & Assumptions

Given: The compact metric space [0,1][0,1] with d(x,y)=xyd(x,y) = |x-y|, and the sets U=[0,2/3)U = [0,2/3) and V=(1/3,1]V = (1/3,1].

[L3]

diam(A)=sup{uv:u,vA}\operatorname{diam}(A) = \sup\{|u-v| : u,v \in A\} for nonempty bounded AA, so uvdiam(A)|u - v| \le \operatorname{diam}(A) for all u,vAu,v \in A (Bounded subset, diameter, distance from a point to a set, and distance between two sets in a metric space).

[L4]

A Lebesgue number for an open cover of a compact metric space is a real δ>0\delta > 0 such that every nonempty subset of diameter less than δ\delta lies in a single member of the cover; one exists (Every open cover of a compact metric space has a Lebesgue number: a δ>0\delta > 0 such that every nonempty subset of diameter less than δ\delta lies inside a single member of the cover).

Verification

technique · direct
1.1

UU and VV are open in [0,1][0,1], being the traces of (1,2/3)(-1,2/3) and (1/3,2)(1/3,2), and UV=[0,1]U \cup V = [0,1], because a point of [0,1][0,1] is either below 2/32/3, and then in UU, or at least 2/3>1/32/3 > 1/3, and then in VV.

L1L2
2.1

Let A[0,1]A \subseteq [0,1] be nonempty with diam(A)<1/3\operatorname{diam}(A) < 1/3, and suppose first that every yAy \in A satisfies y<2/3y < 2/3; then AUA \subseteq U.

L3step 1.1
3.1

Otherwise some aAa \in A has a2/3a \ge 2/3, and then every yAy \in A satisfies yaayadiam(A)>2/31/3=1/3y \ge a - |a - y| \ge a - \operatorname{diam}(A) > 2/3 - 1/3 = 1/3, so A(1/3,1]=VA \subseteq (1/3,1] = V.

L3step 2.1
4.1

In both cases AA lies in a single member of {U,V}\{U,V\}, so 1/31/3 is a Lebesgue number: claim 1.

L4step 2.1step 3.1
5.1

For claim 2 let δ>1/3\delta' > 1/3 be real and put A:=[1/3,2/3]A := [1/3, 2/3], a nonempty subset of [0,1][0,1] with uv1/3|u-v| \le 1/3 for u,vAu,v \in A and with 2/31/3=1/3|2/3 - 1/3| = 1/3 attained, so diam(A)=1/3<δ\operatorname{diam}(A) = 1/3 < \delta'.

L3step 4.1
6.1

A⊈UA \not\subseteq U because 2/3A2/3 \in A and 2/3[0,2/3)2/3 \notin [0,2/3), and A⊈VA \not\subseteq V because 1/3A1/3 \in A and 1/3(1/3,1]1/3 \notin (1/3,1]; so no δ>1/3\delta' > 1/3 is a Lebesgue number for this cover, and 1/31/3 is the largest one: claim 2.

L4step 5.1

Remarks

The number is exactly the overlap. UV=(1/3,2/3)U \cap V = (1/3, 2/3) has length 1/31/3, and that is the Lebesgue number: a set of diameter below the overlap cannot straddle both ends. The example shows that the conclusion of Every open cover of a compact metric space has a Lebesgue number: a δ>0\delta > 0 such that every nonempty subset of diameter less than δ\delta lies inside a single member of the cover is sharp, the lemma asserting only that some positive δ\delta exists.

The strict inequality in the definition matters. The set [1/3,2/3][1/3,2/3] has diameter exactly 1/31/3 and lies in neither member, so a Lebesgue number could not be required to work for subsets of diameter at most δ\delta.

CounterexampleConstruction: AI-adaptedVerification: AI-generatedprecheck passjudge pass (deepseek-v4-pro + gpt-5.6-terra)verified 2026-08-04 (gpt-5.6-sol-codex-subscription)Open item page →

In the bounded real-valued functions on N\mathbb{N} with the supremum metric, the closed unit ball is closed and bounded and is not compact: the indicator functions of the singletons are pairwise at distance 11

Statement refuted

Refuted claim: in every metric space a closed and bounded subset is compact (FALSE: a closed and bounded subset of a metric space is compact).

The witness is the space B(N)\mathcal{B}(\mathbb{N}) of bounded functions NR\mathbb{N} \to \mathbb{R} with the supremum metric d(f,g)=sup{f(s)g(s):sN}d_\infty(f,g) = \sup\{\,|f(s)-g(s)| : s \in \mathbb{N}\,\} (The supremum metric d(f,g)=supxf(x)g(x)d_\infty(f,g) = \sup_x |f(x) - g(x)| is a metric on the bounded real-valued functions on a nonempty set), together with the closed unit ball

K  :=  {fB(N):d(f,0)1}K \;:=\; \{\, f \in \mathcal{B}(\mathbb{N}) : d_\infty(f, \mathbf{0}) \le 1 \,\}

about the zero function 0\mathbf{0}. The set KK is closed in B(N)\mathcal{B}(\mathbb{N}) (The metric topology: a set is open when every one of its points has a ball around it inside the set; closed means open complement) and bounded (Bounded subset, diameter, distance from a point to a set, and distance between two sets in a metric space), and it is not compact (Open cover, subcover, compact metric space, and compact subset of a metric space): the indicator functions ene_n of the singletons {n}\{n\} lie in KK and satisfy d(em,en)=1d_\infty(e_m,e_n) = 1 whenever mnm \ne n, so no finite 1/21/2-net for KK can exist.

This is the same failure as in FALSE: a closed and bounded subset of a metric space is compact, in the space where it matters analytically: closed bounded sets of a function space are routinely not compact.

Facts & Assumptions

Given: The set B(N)\mathcal{B}(\mathbb{N}) of bounded functions NR\mathbb{N} \to \mathbb{R} with the supremum metric dd_\infty, the zero function 0\mathbf{0}, the closed unit ball KK, and for nNn \in \mathbb{N} the function ene_n with en(n)=1e_n(n) = 1 and en(s)=0e_n(s) = 0 for sns \ne n.

[L1]

d(f,g)=sup{f(s)g(s):sN}d_\infty(f,g) = \sup\{|f(s)-g(s)| : s \in \mathbb{N}\} is a metric on B(N)\mathcal{B}(\mathbb{N}), and the supremum is a member-free upper bound that is least among upper bounds (The supremum metric d(f,g)=supxf(x)g(x)d_\infty(f,g) = \sup_x |f(x) - g(x)| is a metric on the bounded real-valued functions on a nonempty set, Lower bound, bounded below, bounded set, Metric space: d(x,y)=0d(x,y) = 0 iff x=yx = y, symmetry, and the triangle inequality; pseudometric and ultrametric).

[L4]

Every nonempty subset of N\mathbb{N} has a least element (The well-ordering principle).

Counterexample

technique · direct
1.1

Each ene_n is a bounded function NR\mathbb{N} \to \mathbb{R}, its range being contained in {0,1}\{0,1\}, so enB(N)e_n \in \mathcal{B}(\mathbb{N}); and d(en,0)=sup{en(s):sN}=1d_\infty(e_n,\mathbf{0}) = \sup\{|e_n(s)| : s \in \mathbb{N}\} = 1, so enKe_n \in K.

L1
2.1

For mnm \ne n the set {em(s)en(s):sN}\{|e_m(s) - e_n(s)| : s \in \mathbb{N}\} is {0,1}\{0,1\}, since the value is 11 at s=ms = m and at s=ns = n and 00 elsewhere; hence d(em,en)=1d_\infty(e_m,e_n) = 1.

L1step 1.1
2.2

KK is the closed ball Bˉ(0,1)\bar B(\mathbf{0},1), hence closed in B(N)\mathcal{B}(\mathbb{N}), and it is contained in B(0,2)B(\mathbf{0},2), hence bounded.

L2step 1.1
2.3

Suppose KK had a finite 1/21/2-net FF; then FF is empty or listable as {y0,,yp}\{y_0, \dots, y_p\}, and it is not empty because KK contains e0e_0. Define φ:Nσ(p)\varphi : \mathbb{N} \to \sigma(p) by letting φ(n)\varphi(n) be the least ipi \le p with d(en,yi)<1/2d_\infty(e_n, y_i) < 1/2, which exists because the 1/21/2-balls about the yiy_i cover KK and enKe_n \in K.

L3L4step 1.1
3.1

φ\varphi is injective: if φ(m)=φ(n)=i\varphi(m) = \varphi(n) = i with mnm \ne n, then d(em,en)d(em,yi)+d(yi,en)<1/2+1/2=1d_\infty(e_m,e_n) \le d_\infty(e_m,y_i) + d_\infty(y_i,e_n) < 1/2 + 1/2 = 1, contradicting step 2.1.

L1step 2.1step 2.3
4.1

So N\mathbb{N} is in bijection with φ[N]\varphi[\mathbb{N}], a subset of N\mathbb{N} bounded above by pp and therefore finite, making N\mathbb{N} equinumerous with a natural number, which is false.

L5step 3.1
5.1

Hence KK has no finite 1/21/2-net, so KK is not totally bounded and therefore not compact, while being closed and bounded by step 2.2; the claim of FALSE: a closed and bounded subset of a metric space is compact is refuted.

L3step 2.2step 4.1

Remarks

What goes wrong is room, not size. The ball KK has diameter 22, so it is small in the metric sense; but it contains infinitely many points that are pairwise at distance 11, so no finite family of small balls reaches all of them. That is exactly the failure of total boundedness, and it is one of the two conditions that, by For a metric space, compact, countably compact, limit point compact, sequentially compact, and complete together with totally bounded are all equivalent, given countable choice and dependent choice, are together equivalent to compactness once the Axiom of Countable Choice and the Axiom of Dependent Choice are assumed.

What the argument does and does not settle. It shows that KK fails total boundedness, and that alone rules out compactness by [L3]. Nothing above is claimed about whether KK is complete; the point of the witness is that closedness and boundedness, the two conditions that suffice in Rn\mathbb{R}^n (Heine-Borel in Rn\mathbb{R}^n: with the Euclidean metric a subset of Rn\mathbb{R}^n is compact if and only if it is closed and bounded, and the proof by bisection uses no choice principle; the same holds on the real line), do not suffice here.

CounterexampleConstruction: AI-adaptedVerification: AI-adaptedprecheck passverified 2026-08-04 (gpt-5.6-sol-codex-subscription)Open item page →

N\mathbb{N} with the discrete metric is bounded and is not totally bounded

Statement refuted

Refuted claim: every bounded metric space is totally bounded (FALSE: a bounded metric space is totally bounded).

The witness is N\mathbb{N} (The natural numbers N\mathbb{N} (von Neumann)) with the discrete metric d(m,n)=0d(m,n) = 0 for m=nm = n and d(m,n)=1d(m,n) = 1 for mnm \ne n (With the discrete metric d(x,y)=1d(x,y) = 1 for xyx \ne y, a space is compact iff it is totally bounded iff it is finite, and it is complete whatever its size). It is bounded (Bounded subset, diameter, distance from a point to a set, and distance between two sets in a metric space), lying inside the ball B(0,2)B(0,2); it is not totally bounded (Finite ε\varepsilon-net and totally bounded metric space), because a finite 1/21/2-net would have to be the whole of N\mathbb{N}, which is not finite.

The full verification is carried out in FALSE: a bounded metric space is totally bounded, where the metric axioms, the identity B(y,1/2)={y}B(y,1/2) = \{y\} and the impossibility of listing N\mathbb{N} are all checked. This item records the witness and says what makes it work.

Facts & Assumptions

Given: The set N\mathbb{N} with the discrete metric dd, and the false claim that every bounded metric space is totally bounded.

[A1]

The refuted claim: every bounded metric space is totally bounded.

[L2]

A finite 1/21/2-net is a finite FNF \subseteq \mathbb{N} with the balls B(y,1/2)B(y,1/2), yFy \in F, covering N\mathbb{N}; a nonempty finite set can be listed (Finite ε\varepsilon-net and totally bounded metric space, Open cover, subcover, compact metric space, and compact subset of a metric space, Finite, countably infinite, countable, uncountable).

[L3]

A nonempty finite set of reals has a maximum, one of its members, and for every real MM there is a natural N1N \ge 1 with M<ι(N)M < \iota(N), ι\iota being the canonical natural of R\mathbb{R} (Every nonempty finite set of reals has a maximum and a minimum, Maximum and minimum of a set, Every complete ordered field is Archimedean, The canonical natural ι(n)=n1F\iota(n) = n \cdot 1_F of a field).

Counterexample

technique · direct
1.1

(N,d)(\mathbb{N},d) is a bounded metric space, since d(0,n)1<2d(0,n) \le 1 < 2 for every nn gives N=B(0,2)\mathbb{N} = B(0,2).

L1
2.1

If FF were a finite 1/21/2-net, then N=yFB(y,1/2)=yF{y}=F\mathbb{N} = \bigcup_{y \in F} B(y,1/2) = \bigcup_{y \in F}\{y\} = F, so N\mathbb{N} would be finite and, being nonempty, listable as {n0,,nk}\{n_0, \dots, n_k\}.

L1L2step 1.1
3.1

The reals ι(n0),,ι(nk)\iota(n_0), \dots, \iota(n_k) then have a maximum MM, while a natural N1N \ge 1 with M<ι(N)M < \iota(N) satisfies ι(N)ι(ni)\iota(N) \ne \iota(n_i), hence NniN \ne n_i, for every iki \le k; so NN is a natural number outside N\mathbb{N}, which is impossible.

L3step 2.1
4.1

So no finite 1/21/2-net exists and (N,d)(\mathbb{N},d) is not totally bounded, while being bounded by step 1.1; the claim [A1] is refuted.

A1L2step 1.1step 3.1

Remarks

The implication that does hold is the converse. A totally bounded metric space is bounded (A totally bounded metric space is bounded, every subspace of a totally bounded space is totally bounded, and the closure of a totally bounded subset is totally bounded), so this witness also shows that claim 1 of that lemma does not reverse.

The same space refutes more. It is closed in itself and bounded and not compact, which is the witness recorded in FALSE: a closed and bounded subset of a metric space is compact, and it is complete, so no one of boundedness, closedness and completeness, nor all three together, implies compactness (With the discrete metric d(x,y)=1d(x,y) = 1 for xyx \ne y, a space is compact iff it is totally bounded iff it is finite, and it is complete whatever its size).

CounterexampleConstruction: AI-adaptedVerification: AI-adaptedprecheck passverified 2026-08-04 (gpt-5.6-sol-codex-subscription)Open item page →

The open interval (0,1)(0,1) is totally bounded and not compact, the cover by the intervals (1/(k+2),1)(1/(k+2), 1) having no finite subcover

Statement refuted

Refuted claim: every totally bounded metric space is compact (FALSE: a totally bounded metric space is compact).

The witness is the interval (0,1)(0,1) (Intervals of R\mathbb{R}: the nine order-convex forms, nondegeneracy, and length) as a metric subspace of (R,dR)(\mathbb{R}, d_{\mathbb{R}}), dR(x,y)=xyd_{\mathbb{R}}(x,y) = |x-y| (The absolute value makes R\mathbb{R} a metric space: d(x,y)=xyd(x,y) = |x-y| is a metric, its open balls are the intervals (xr,x+r)(x-r, x+r), and it is unbounded, Isometry, isometric embedding, and the subspace metric on a subset). It is totally bounded (Finite ε\varepsilon-net and totally bounded metric space), the points j/(m+1)j/(m+1) for 1jm1 \le j \le m forming a finite net of mesh 1/(m+1)1/(m+1); and it is not compact (Open cover, subcover, compact metric space, and compact subset of a metric space), the family

Uk  :=  (1k+2, 1),kN,U_k \;:=\; \Big(\tfrac{1}{k+2},\ 1\Big), \qquad k \in \mathbb{N},

having union (0,1)(0,1) and no finite subfamily with that union. The index is written k+2k+2 because N\mathbb{N} contains 00, so that 1/(k+2)1/2<11/(k+2) \le 1/2 < 1 for every kk and each UkU_k is a nonempty subinterval of (0,1)(0,1).

The full verification is carried out in FALSE: a totally bounded metric space is compact; this item records the witness and says what makes it work.

Facts & Assumptions

Given: The interval (0,1)(0,1) with the metric xy|x-y| restricted to it, and the sets Uk=(1/(k+2),1)U_k = (1/(k+2), 1) for kNk \in \mathbb{N}.

[A1]

The refuted claim: every totally bounded metric space is compact.

[L3]

A nonempty finite set of reals has a minimum, one of its members (Every nonempty finite set of reals has a maximum and a minimum, Maximum and minimum of a set).

[L4]

For every real η>0\eta > 0 there is a natural m1m \ge 1 with 1/m<η1/m < \eta, and reciprocals of positives are positive and reverse the order (For every ε>0\varepsilon > 0 in a complete ordered field there is a natural n1n \ge 1 with 1/n<ε1/n < \varepsilon, Every complete ordered field is Archimedean, Inverses of positives are positive, and reciprocation reverses order).

Counterexample

technique · direct
1.1

(0,1)(0,1) with the restricted metric is a totally bounded metric space.

L1
2.1

The family (Uk)kN(U_k)_{k \in \mathbb{N}} consists of open subsets of R\mathbb{R} and has union (0,1)(0,1): given x(0,1)x \in (0,1), a natural m1m \ge 1 with 1/m<x1/m < x gives 1/(m+2)<1/m<x<11/(m+2) < 1/m < x < 1, so xUmx \in U_m.

L1L4step 1.1
3.1

Given finitely many members Uk0,,UkpU_{k_0}, \dots, U_{k_p}, put t:=min{1/(ki+2):ip}t := \min\{1/(k_i+2) : i \le p\}, a positive real; each UkiU_{k_i} is contained in (t,1)(t,1) because 1/(ki+2)t1/(k_i+2) \ge t, so the union of the finite subfamily lies in (t,1)(t,1), while x:=min{t,1/2}/2x := \min\{t,1/2\}/2 satisfies 0<x<10 < x < 1 and xtx \le t, so x(0,1)x \in (0,1) lies in no UkiU_{k_i}.

L3L4step 2.1
4.1

Hence no finitely many of the UkU_k have union containing (0,1)(0,1), so (0,1)(0,1) is not a compact subset of R\mathbb{R}, that is not a compact metric space, while being totally bounded by step 1.1; the claim [A1] is refuted.

A1L2step 1.1step 2.1step 3.1

Remarks

What the witness lacks is completeness. A compact metric space is complete (A compact metric space is complete and totally bounded, and neither implication uses any choice principle, Complete metric space: every Cauchy sequence converges in the space), and (0,1)(0,1) is not: the terms 1/(k+2)1/(k+2) form a Cauchy sequence in it whose only candidate limit in R\mathbb{R} is 00, a point the space omits. Adding completeness to total boundedness does restore compactness, at the cost of the Axiom of Countable Choice (A complete, totally bounded metric space is compact, proved from countable choice used exactly once).

The same cover fails to have a Lebesgue number, which is the other thing compactness would have supplied (The cover of (0,1)(0,1) by the intervals (1/(k+2),1)(1/(k+2), 1) has no Lebesgue number, so the Lebesgue number lemma needs compactness).

CounterexampleConstruction: AI-adaptedVerification: AI-generatedprecheck passjudge pass (z-ai/glm-5.2)audited 2026-07-27Open item page →

On (0,1)(0,1) the identity is bounded with no greatest value and x1/xx \mapsto 1/x is continuous and unbounded, so the extreme value theorem needs compactness and not merely boundedness of the domain

Statement refuted

Refuted claim: a continuous real-valued function on a nonempty bounded metric space is bounded and attains a greatest value.

The true statement replaces bounded by compact (A continuous real-valued function on a nonempty compact metric space is bounded and attains a greatest and a least value), and the difference is not cosmetic. The witness is the interval (0,1)(0,1) (Intervals of R\mathbb{R}: the nine order-convex forms, nondegeneracy, and length) as a metric subspace of R\mathbb{R} (The absolute value makes R\mathbb{R} a metric space: d(x,y)=xyd(x,y) = |x-y| is a metric, its open balls are the intervals (xr,x+r)(x-r, x+r), and it is unbounded), which is bounded (Bounded subset, diameter, distance from a point to a set, and distance between two sets in a metric space) and not compact (The open interval (0,1)(0,1) is totally bounded and not compact, the cover by the intervals (1/(k+2),1)(1/(k+2), 1) having no finite subcover), together with two continuous functions on it (Continuity of a map between metric spaces, at a point and globally, in the ε\varepsilon-δ\delta form):

  • the identity f(x)=xf(x) = x, which is bounded, has supremum 11, and attains no greatest value;
  • the map g(x)=1/xg(x) = 1/x, which is continuous and unbounded.

So on a merely bounded domain a continuous function may fail to attain its supremum, and may fail to be bounded at all.

Facts & Assumptions

Given: The interval (0,1)(0,1) with the metric xy|x-y| restricted to it, and the functions f(x)=xf(x) = x and g(x)=1/xg(x) = 1/x on it.

[A1]

The refuted claim: a continuous real-valued function on a nonempty bounded metric space is bounded and attains a greatest value.

[L2]

hh is continuous at cc when for every real ε>0\varepsilon > 0 there is a real δ>0\delta > 0 with h(x)h(c)<ε|h(x) - h(c)| < \varepsilon whenever xc<δ|x - c| < \delta (Continuity of a map between metric spaces, at a point and globally, in the ε\varepsilon-δ\delta form).

[L3]

u=supSu = \sup S for a nonempty SS bounded above exactly when uu is an upper bound and for every real ε>0\varepsilon > 0 some sSs \in S has uε<su - \varepsilon < s; a maximum is a member of the set that bounds it above (Epsilon characterisation of the supremum, Maximum and minimum of a set, Lower bound, bounded below, bounded set, Complete ordered field (least-upper-bound property)).

[L4]

For every real MM there is a natural N1N \ge 1 with M<ι(N)M < \iota(N), for every real η>0\eta > 0 a natural N1N \ge 1 with 1/N<η1/N < \eta, and reciprocals of positives are positive and reverse the order (Every complete ordered field is Archimedean, For every ε>0\varepsilon > 0 in a complete ordered field there is a natural n1n \ge 1 with 1/n<ε1/n < \varepsilon, Inverses of positives are positive, and reciprocation reverses order).

[L5]

A continuous real-valued function on a nonempty compact metric space is bounded and attains a greatest and a least value (A continuous real-valued function on a nonempty compact metric space is bounded and attains a greatest and a least value).

Counterexample

technique · direct
1.1

The identity ff is continuous on (0,1)(0,1), δ:=ε\delta := \varepsilon serving at every point, and its image is (0,1)(0,1), which is bounded above by 11 and below by 00.

L1L2
2.1

supf[(0,1)]=1\sup f[(0,1)] = 1: the value 11 is an upper bound, and for a real ε>0\varepsilon > 0 the point x:=max{1ε/2, 1/2}x := \max\{1-\varepsilon/2,\ 1/2\} lies in (0,1)(0,1) and satisfies x>1εx > 1 - \varepsilon.

L3step 1.1
3.1

ff attains no greatest value: for x(0,1)x \in (0,1) the point (x+1)/2(x+1)/2 lies in (0,1)(0,1) and satisfies (x+1)/2>x(x+1)/2 > x, so no member of the image bounds the image above.

L3step 2.1
4.1

g(x)=1/xg(x) = 1/x is defined on (0,1)(0,1), every xx there being positive, and it is continuous at each c(0,1)c \in (0,1): given a real ε>0\varepsilon > 0, the choice δ:=min{c/2, εc2/2}\delta := \min\{c/2,\ \varepsilon c^2/2\} gives, for xc<δ|x-c| < \delta, first x>c/2>0x > c/2 > 0 and then 1/x1/c=cx/(xc)<(2/c2)xc<ε|1/x - 1/c| = |c-x|/(xc) < (2/c^2)|x - c| < \varepsilon.

L2L4step 3.1
5.1

gg is unbounded on (0,1)(0,1): given a real MM, take a natural N1N \ge 1 with M<ι(N)M < \iota(N); the point x:=1/ι(N+1)x := 1/\iota(N+1) lies in (0,1)(0,1) and g(x)=ι(N+1)>ι(N)>Mg(x) = \iota(N+1) > \iota(N) > M.

L4step 4.1
6.1

So on the nonempty bounded non-compact space (0,1)(0,1) the continuous function ff is bounded and attains no greatest value, and the continuous function gg is not even bounded; the claim [A1] is refuted, and the compactness hypothesis of the extreme value theorem cannot be weakened to boundedness.

A1L1L5step 1.1step 3.1step 5.1

Remarks

Which hypothesis each failure isolates. The identity shows that the attainment half of A continuous real-valued function on a nonempty compact metric space is bounded and attains a greatest and a least value fails on a bounded non-compact domain even for a bounded function; the map 1/x1/x shows that the boundedness half fails too. Compactness is what supplies both, through the image being closed and bounded (The image of a compact metric space under a continuous map is compact, and so is the image of any compact subset, A compact subset of a metric space is closed and bounded).

Closing the interval repairs the first example and rules out the second. On [0,1][0,1], which is compact (Heine-Borel in Rn\mathbb{R}^n: with the Euclidean metric a subset of Rn\mathbb{R}^n is compact if and only if it is closed and bounded, and the proof by bisection uses no choice principle; the same holds on the real line), the identity attains the value 11. The map 1/x1/x has no continuous extension to [0,1][0,1] at all: such an extension would be bounded by [L5], whereas its restriction to (0,1)(0,1) is unbounded by step 5.1. So the failure of the second example is a failure of the domain, not of the theorem.

CounterexampleConstruction: AI-adaptedVerification: AI-generatedprecheck passjudge pass (z-ai/glm-5.2)audited 2026-07-27Open item page →

x1/xx \mapsto 1/x is continuous on (0,1)(0,1) and not uniformly continuous, so Heine-Cantor needs compactness of the domain

Statement refuted

Refuted claim: a continuous map from a bounded metric space to a metric space is uniformly continuous.

The true statement replaces bounded by compact (Heine-Cantor: a continuous map from a compact metric space to any metric space is uniformly continuous). The witness is g(x)=1/xg(x) = 1/x on the interval (0,1)(0,1) (Intervals of R\mathbb{R}: the nine order-convex forms, nondegeneracy, and length), a metric subspace of R\mathbb{R} (The absolute value makes R\mathbb{R} a metric space: d(x,y)=xyd(x,y) = |x-y| is a metric, its open balls are the intervals (xr,x+r)(x-r, x+r), and it is unbounded) that is bounded and not compact (The open interval (0,1)(0,1) is totally bounded and not compact, the cover by the intervals (1/(k+2),1)(1/(k+2), 1) having no finite subcover). The map is continuous (Continuity of a map between metric spaces, at a point and globally, in the ε\varepsilon-δ\delta form) and is not uniformly continuous (Uniform continuity of a map of metric spaces: one δ\delta serving every point): the pairs

xk:=1k+2,yk:=1k+3(kN)x_k := \frac{1}{k+2}, \qquad y_k := \frac{1}{k+3} \qquad (k \in \mathbb{N})

lie in (0,1)(0,1), satisfy xkyk0|x_k - y_k| \to 0, and yet g(xk)g(yk)=1|g(x_k) - g(y_k)| = 1 for every kk. The indices are written k+2k+2 and k+3k+3 because N\mathbb{N} contains 00 (Sequences of reals: bounded, eventually, frequently, tails, subsequences), so that both points lie in (0,1)(0,1) already at k=0k = 0.

Facts & Assumptions

Given: The interval (0,1)(0,1) with the metric xy|x-y| restricted to it, the map g(x)=1/xg(x) = 1/x on it, and the points xk=1/ι(k+2)x_k = 1/\iota(k+2) and yk=1/ι(k+3)y_k = 1/\iota(k+3).

[A1]

The refuted claim: a continuous map from a bounded metric space to a metric space is uniformly continuous.

[L2]

gg is continuous at cc when for every real ε>0\varepsilon > 0 there is a real δ>0\delta > 0 with g(x)g(c)<ε|g(x)-g(c)| < \varepsilon whenever xc<δ|x-c| < \delta; it is uniformly continuous when one δ\delta works for all pairs at once (Continuity of a map between metric spaces, at a point and globally, in the ε\varepsilon-δ\delta form, Uniform continuity of a map of metric spaces: one δ\delta serving every point).

[L3]

For every real η>0\eta > 0 there is a natural m1m \ge 1 with 1/m<η1/m < \eta; canonical naturals are positive and increasing, and reciprocals of positives are positive and reverse the order (For every ε>0\varepsilon > 0 in a complete ordered field there is a natural n1n \ge 1 with 1/n<ε1/n < \varepsilon, Every complete ordered field is Archimedean, Inverses of positives are positive, and reciprocation reverses order, The canonical natural ι(n)=n1F\iota(n) = n \cdot 1_F of a field).

[L4]

A continuous map from a compact metric space to a metric space is uniformly continuous (Heine-Cantor: a continuous map from a compact metric space to any metric space is uniformly continuous).

Counterexample

technique · direct
1.1

gg is continuous at each c(0,1)c \in (0,1): given a real ε>0\varepsilon > 0, the choice δ:=min{c/2, εc2/2}\delta := \min\{c/2,\ \varepsilon c^2/2\} gives, for xc<δ|x - c| < \delta with x(0,1)x \in (0,1), first x>c/2>0x > c/2 > 0 and then 1/x1/c=cx/(xc)<(2/c2)xc<ε|1/x - 1/c| = |c-x|/(xc) < (2/c^2)|x-c| < \varepsilon.

L2L3
2.1

For every kNk \in \mathbb{N} the points xk=1/ι(k+2)x_k = 1/\iota(k+2) and yk=1/ι(k+3)y_k = 1/\iota(k+3) lie in (0,1)(0,1), since ι(k+2)2>1\iota(k+2) \ge 2 > 1 and ι(k+3)3>1\iota(k+3) \ge 3 > 1 make both reciprocals positive and below 11.

L3step 1.1
3.1

g(xk)g(yk)=ι(k+2)ι(k+3)=1|g(x_k) - g(y_k)| = |\iota(k+2) - \iota(k+3)| = 1 for every kk, because ι(k+3)=ι(k+2)+1\iota(k+3) = \iota(k+2) + 1.

L3step 2.1
3.2

xkyk=1/ι(k+2)1/ι(k+3)<1/ι(k+2)|x_k - y_k| = 1/\iota(k+2) - 1/\iota(k+3) < 1/\iota(k+2), and given a real δ>0\delta > 0 a natural m1m \ge 1 with 1/m<δ1/m < \delta gives xmym<1/ι(m+2)<1/m<δ|x_m - y_m| < 1/\iota(m+2) < 1/m < \delta.

L3step 2.1
4.1

So no real δ>0\delta > 0 witnesses uniform continuity at ε=1\varepsilon = 1: by step 3.2 some pair xm,ymx_m, y_m of points of (0,1)(0,1) has xmym<δ|x_m - y_m| < \delta, while step 3.1 gives g(xm)g(ym)=1|g(x_m) - g(y_m)| = 1, which is not less than 11.

L2step 3.1step 3.2
5.1

Hence gg is a continuous map on the bounded, non-compact space (0,1)(0,1) that is not uniformly continuous, and the claim [A1] is refuted: the compactness hypothesis of Heine-Cantor cannot be weakened to boundedness.

A1L1L4step 1.1step 4.1

Remarks

Where the argument would break on a compact domain. On [0,1][0,1] the same pairs converge to 00, and any continuous function there is uniformly continuous [L4]; the map 1/x1/x escapes that only because 00 is missing from its domain, so the values are free to run away as the arguments approach the missing point.

The failure is exactly the failure of a Lebesgue number. The proof of Heine-Cantor: a continuous map from a compact metric space to any metric space is uniformly continuous turns pointwise continuity into uniform continuity by producing one radius that works everywhere, and the cover of (0,1)(0,1) used in The cover of (0,1)(0,1) by the intervals (1/(k+2),1)(1/(k+2), 1) has no Lebesgue number, so the Lebesgue number lemma needs compactness shows that no such radius exists here.

CounterexampleConstruction: AI-adaptedVerification: AI-generatedprecheck passjudge pass (z-ai/glm-5.2)audited 2026-07-27Open item page →

The cover of (0,1)(0,1) by the intervals (1/(k+2),1)(1/(k+2), 1) has no Lebesgue number, so the Lebesgue number lemma needs compactness

Statement refuted

Refuted claim: every open cover of a metric space has a Lebesgue number, that is a real δ>0\delta > 0 such that every nonempty subset of diameter less than δ\delta lies inside a single member of the cover.

The true statement carries a compactness hypothesis (Every open cover of a compact metric space has a Lebesgue number: a δ>0\delta > 0 such that every nonempty subset of diameter less than δ\delta lies inside a single member of the cover). The witness is the interval (0,1)(0,1) (Intervals of R\mathbb{R}: the nine order-convex forms, nondegeneracy, and length) as a metric subspace of R\mathbb{R} (The absolute value makes R\mathbb{R} a metric space: d(x,y)=xyd(x,y) = |x-y| is a metric, its open balls are the intervals (xr,x+r)(x-r, x+r), and it is unbounded), which is not compact (The open interval (0,1)(0,1) is totally bounded and not compact, the cover by the intervals (1/(k+2),1)(1/(k+2), 1) having no finite subcover), covered by

Uk  :=  (1k+2, 1),kN.U_k \;:=\; \Big(\tfrac{1}{k+2},\ 1\Big), \qquad k \in \mathbb{N}.

For every real δ>0\delta > 0 the interval A:=(0, t)A := (0,\ t) with t:=min{δ/2, 1/2}t := \min\{\delta/2,\ 1/2\} is a nonempty subset of (0,1)(0,1) of diameter at most t<δt < \delta (Bounded subset, diameter, distance from a point to a set, and distance between two sets in a metric space) that lies inside no UkU_k.

Facts & Assumptions

Given: The interval (0,1)(0,1) with the metric xy|x-y| restricted to it, and the sets Uk=(1/(k+2),1)U_k = (1/(k+2), 1) for kNk \in \mathbb{N}.

[A1]

The refuted claim: every open cover of a metric space has a Lebesgue number.

[L2]

diam(A)=sup{uv:u,vA}\operatorname{diam}(A) = \sup\{|u-v| : u,v \in A\} for nonempty bounded AA, so any upper bound of the distances bounds the diameter (Bounded subset, diameter, distance from a point to a set, and distance between two sets in a metric space).

[L3]

A Lebesgue number for a cover is a real δ>0\delta > 0 such that every nonempty subset of diameter less than δ\delta lies inside a single member of the cover; a compact metric space has one for every open cover (Every open cover of a compact metric space has a Lebesgue number: a δ>0\delta > 0 such that every nonempty subset of diameter less than δ\delta lies inside a single member of the cover).

[L4]

For every real η>0\eta > 0 there is a natural m1m \ge 1 with 1/m<η1/m < \eta, and reciprocals of positives are positive and reverse the order (For every ε>0\varepsilon > 0 in a complete ordered field there is a natural n1n \ge 1 with 1/n<ε1/n < \varepsilon, Every complete ordered field is Archimedean, Inverses of positives are positive, and reciprocation reverses order).

Counterexample

technique · direct
1.1

The family (Uk)kN(U_k)_{k \in \mathbb{N}} is an open cover of (0,1)(0,1): each UkU_k is the trace on (0,1)(0,1) of an open subset of R\mathbb{R} and is contained in (0,1)(0,1), and any x(0,1)x \in (0,1) admits a natural m1m \ge 1 with 1/m<x1/m < x, whence 1/(m+2)<1/m<x<11/(m+2) < 1/m < x < 1 and xUmx \in U_m.

L1L4
2.1

Let δ>0\delta > 0 be real, put t:=min{δ/2, 1/2}t := \min\{\delta/2,\ 1/2\} and A:=(0,t)A := (0,t); then t>0t > 0, AA is a nonempty subset of (0,1)(0,1), and every u,vAu,v \in A satisfy uv<t|u - v| < t, so diam(A)tδ/2<δ\operatorname{diam}(A) \le t \le \delta/2 < \delta.

L2step 1.1
3.1

AA is contained in no UkU_k: for a given kk the real x:=min{t, 1/(k+2)}/2x := \min\{t,\ 1/(k+2)\}/2 satisfies 0<xt/2<t0 < x \le t/2 < t, so xAx \in A, and it satisfies x(1/(k+2))/2<1/(k+2)x \le \big(1/(k+2)\big)/2 < 1/(k+2), so xUkx \notin U_k.

L4step 2.1
4.1

So no real δ>0\delta > 0 is a Lebesgue number for this cover, and the claim [A1] is refuted; since (0,1)(0,1) is not compact, the compactness hypothesis of the Lebesgue number lemma is not removable.

A1L1L3step 1.1step 2.1step 3.1

Remarks

What goes wrong. The members of the cover grow towards (0,1)(0,1) but none of them reaches down to 00, so a set clinging to 00 of any positive diameter is never captured whole. On a compact space the finitely many members of a subcover put a uniform floor under this, and that floor is the Lebesgue number (Every open cover of a compact metric space has a Lebesgue number: a δ>0\delta > 0 such that every nonempty subset of diameter less than δ\delta lies inside a single member of the cover).

The same cover shows non-compactness directly, having no finite subcover (The open interval (0,1)(0,1) is totally bounded and not compact, the cover by the intervals (1/(k+2),1)(1/(k+2), 1) having no finite subcover), and the failure of uniform continuity of 1/x1/x on (0,1)(0,1) is the analytic face of the same phenomenon (x1/xx \mapsto 1/x is continuous on (0,1)(0,1) and not uniformly continuous, so Heine-Cantor needs compactness of the domain).

Sources